pub struct NoopHandler;Expand description
A noop implementation for ErrorHandler.
Trait Implementations§
Source§impl CancelHandler for NoopHandler
impl CancelHandler for NoopHandler
fn on_cancel_request<'life0, 'async_trait>(
&'life0 self,
_cancel_request: CancelRequest,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl CopyHandler for NoopHandler
impl CopyHandler for NoopHandler
fn on_copy_data<'life0, 'life1, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_copy_data: CopyData,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_copy_done<'life0, 'life1, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_done: CopyDone,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_copy_fail<'life0, 'life1, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
fail: CopyFail,
) -> Pin<Box<dyn Future<Output = PgWireError> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Debug for NoopHandler
impl Debug for NoopHandler
Source§impl ErrorHandler for NoopHandler
impl ErrorHandler for NoopHandler
fn on_error<C>(&self, _client: &C, _error: &mut PgWireError)where
C: ClientInfo,
Source§impl ExtendedQueryHandler for NoopHandler
impl ExtendedQueryHandler for NoopHandler
type Statement = String
type QueryParser = NoopQueryParser
Source§fn query_parser(&self) -> Arc<Self::QueryParser>
fn query_parser(&self) -> Arc<Self::QueryParser>
Get a reference to associated
QueryParser implementationSource§fn do_query<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_portal: &'life2 Portal<Self::Statement>,
_max_rows: usize,
) -> Pin<Box<dyn Future<Output = PgWireResult<Response>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_query<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_portal: &'life2 Portal<Self::Statement>,
_max_rows: usize,
) -> Pin<Box<dyn Future<Output = PgWireResult<Response>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
This is the main implementation for query execution. Context has
been provided: Read more
Source§fn do_describe_statement<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_statement: &'life2 StoredStatement<Self::Statement>,
) -> Pin<Box<dyn Future<Output = PgWireResult<DescribeStatementResponse>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_describe_statement<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_statement: &'life2 StoredStatement<Self::Statement>,
) -> Pin<Box<dyn Future<Output = PgWireResult<DescribeStatementResponse>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return resultset metadata without actually executing statement
Source§fn do_describe_portal<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_portal: &'life2 Portal<Self::Statement>,
) -> Pin<Box<dyn Future<Output = PgWireResult<DescribePortalResponse>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_describe_portal<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_portal: &'life2 Portal<Self::Statement>,
) -> Pin<Box<dyn Future<Output = PgWireResult<DescribePortalResponse>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return resultset metadata without actually executing portal
Source§fn on_parse<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Parse,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_parse<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Parse,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
parse command. Read moreSource§fn on_bind<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Bind,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_bind<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Bind,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
bind command. Read moreSource§fn on_execute<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Execute,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_execute<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Execute,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
execute command. Read moreSource§fn _on_execute<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Execute,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn _on_execute<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Execute,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The default implementation of
on_execute. Read moreSource§fn on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
describe command. Read moreSource§fn _on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn _on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The default implementation of
on_describe Read moreSource§fn on_flush<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: Flush,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_flush<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: Flush,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
flush command. Read moreSource§fn on_sync<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: PgSync,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_sync<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: PgSync,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
sync command. Read moreSource§fn on_close<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Close,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_close<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Close,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::PortalStore: PortalStore<Statement = Self::Statement>,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when client sends
close command. Read moreSource§impl NoopStartupHandler for NoopHandler
impl NoopStartupHandler for NoopHandler
fn post_startup<'life0, 'life1, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_message: PgWireFrontendMessage,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl SimpleQueryHandler for NoopHandler
impl SimpleQueryHandler for NoopHandler
Source§fn do_query<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_query: &'life2 str,
) -> Pin<Box<dyn Future<Output = PgWireResult<Vec<Response>>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_query<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
_query: &'life2 str,
) -> Pin<Box<dyn Future<Output = PgWireResult<Vec<Response>>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provide your query implementation using the incoming query string.
Source§fn on_query<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
query: Query,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_query<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
query: Query,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executed on
Query request arrived. This is how postgres respond to
simple query. The default implementation calls do_query with the
incoming query string. Read moreSource§fn _on_query<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
query: Query,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn _on_query<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
query: Query,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This is the default implementation of
on_query. If you want to
override on_query with your own pre/post processing logic, you can
call this function.Auto Trait Implementations§
impl Freeze for NoopHandler
impl RefUnwindSafe for NoopHandler
impl Send for NoopHandler
impl Sync for NoopHandler
impl Unpin for NoopHandler
impl UnwindSafe for NoopHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<H> StartupHandler for Hwhere
H: NoopStartupHandler,
impl<H> StartupHandler for Hwhere
H: NoopStartupHandler,
Source§fn on_startup<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: PgWireFrontendMessage,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
H: 'async_trait,
fn on_startup<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: PgWireFrontendMessage,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
H: 'async_trait,
A generic frontend message callback during startup phase.