Struct DfSessionService

Source
pub struct DfSessionService { /* private fields */ }

Implementations§

Source§

impl DfSessionService

Source

pub fn new( session_context: SessionContext, catalog_name: Option<String>, ) -> DfSessionService

Trait Implementations§

Source§

impl ExtendedQueryHandler for DfSessionService

Source§

type Statement = LogicalPlan

Source§

type QueryParser = Parser

Source§

fn query_parser(&self) -> Arc<Self::QueryParser>

Get a reference to associated QueryParser implementation
Source§

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,

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,

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,

Called when client sends parse command. Read more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

impl NoopStartupHandler for DfSessionService

Source§

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

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,

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,

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 more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<H> StartupHandler for H

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,

A generic frontend message callback during startup phase.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,