pub struct DfSessionService { /* private fields */ }
Implementations§
Source§impl DfSessionService
impl DfSessionService
pub fn new(session_context: Arc<SessionContext>) -> DfSessionService
Trait Implementations§
Source§impl ExtendedQueryHandler for DfSessionService
impl ExtendedQueryHandler for DfSessionService
type Statement = LogicalPlan
type QueryParser = Parser
Source§fn query_parser(&self) -> Arc<Self::QueryParser>
fn query_parser(&self) -> Arc<Self::QueryParser>
Get a reference to associated
QueryParser
implementationSource§fn do_describe_statement<'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
target: &'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,
target: &'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,
target: &'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,
target: &'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 do_query<'a, '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<'a>>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_query<'a, '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<'a>>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'a: '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 on_parse<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Parse,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_parse<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Parse,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: '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 = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_bind<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Bind,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: '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 = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_execute<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Execute,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
Called when client sends
execute
command. Read moreSource§fn on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_describe<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Describe,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
Called when client sends
describe
command. Read moreSource§fn on_flush<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: Flush,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_flush<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: Flush,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: '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: Sync,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_sync<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
_message: Sync,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: '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 = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_close<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: Close,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as ClientPortalStore>::PortalStore: PortalStore<Statement = Self::Statement>,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
Called when client sends
close
command. Read moreSource§impl NoopStartupHandler for DfSessionService
impl NoopStartupHandler for DfSessionService
fn post_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>,
Self: Sync + 'async_trait,
Source§impl SimpleQueryHandler for DfSessionService
impl SimpleQueryHandler for DfSessionService
Source§fn do_query<'a, 'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = PgWireResult<Vec<Response<'a>>>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn do_query<'a, 'life0, 'life1, 'life2, 'async_trait, C>(
&'life0 self,
_client: &'life1 mut C,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = PgWireResult<Vec<Response<'a>>>> + Send + 'async_trait>>where
C: ClientInfo + Unpin + Send + Sync + 'async_trait,
Self: 'async_trait,
'a: '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 = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
fn on_query<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
query: Query,
) -> Pin<Box<dyn Future<Output = Result<(), PgWireError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: ClientInfo + ClientPortalStore + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
<C as Sink<PgWireBackendMessage>>::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: '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 moreAuto Trait Implementations§
impl Freeze for DfSessionService
impl !RefUnwindSafe for DfSessionService
impl Send for DfSessionService
impl Sync for DfSessionService
impl Unpin for DfSessionService
impl !UnwindSafe for DfSessionService
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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.