QueryHook

Trait QueryHook 

Source
pub trait QueryHook: Send + Sync {
    // Required methods
    fn handle_simple_query<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        statement: &'life1 Statement,
        session_context: &'life2 SessionContext,
        client: &'life3 mut (dyn ClientInfo + Send + Sync),
    ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<Response>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn handle_extended_parse_query<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        sql: &'life1 Statement,
        session_context: &'life2 SessionContext,
        client: &'life3 (dyn ClientInfo + Send + Sync),
    ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<LogicalPlan>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn handle_extended_query<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        statement: &'life1 Statement,
        logical_plan: &'life2 LogicalPlan,
        params: &'life3 ParamValues,
        session_context: &'life4 SessionContext,
        client: &'life5 mut (dyn ClientInfo + Send + Sync),
    ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<Response>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait;
}

Required Methods§

Source

fn handle_simple_query<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, statement: &'life1 Statement, session_context: &'life2 SessionContext, client: &'life3 mut (dyn ClientInfo + Send + Sync), ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<Response>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

called in simple query handler to return response directly

Source

fn handle_extended_parse_query<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, sql: &'life1 Statement, session_context: &'life2 SessionContext, client: &'life3 (dyn ClientInfo + Send + Sync), ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<LogicalPlan>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

called at extended query parse phase, for generating LogicalPlanfrom statement

Source

fn handle_extended_query<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, statement: &'life1 Statement, logical_plan: &'life2 LogicalPlan, params: &'life3 ParamValues, session_context: &'life4 SessionContext, client: &'life5 mut (dyn ClientInfo + Send + Sync), ) -> Pin<Box<dyn Future<Output = Option<PgWireResult<Response>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

called at extended query execute phase, for query execution

Implementors§