QueryParser

Trait QueryParser 

Source
pub trait QueryParser {
    type Statement;

    // Required method
    fn parse_sql<'life0, 'life1, 'life2, 'life3, 'async_trait, C>(
        &'life0 self,
        client: &'life1 C,
        sql: &'life2 str,
        types: &'life3 [Type],
    ) -> Pin<Box<dyn Future<Output = PgWireResult<Self::Statement>> + Send + 'async_trait>>
       where C: ClientInfo + Unpin + Send + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Trait for sql parser. The parser transforms string query into its statement type.

Required Associated Types§

Required Methods§

Source

fn parse_sql<'life0, 'life1, 'life2, 'life3, 'async_trait, C>( &'life0 self, client: &'life1 C, sql: &'life2 str, types: &'life3 [Type], ) -> Pin<Box<dyn Future<Output = PgWireResult<Self::Statement>> + Send + 'async_trait>>
where C: ClientInfo + Unpin + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<QP> QueryParser for Arc<QP>
where QP: QueryParser + Send + Sync,

Source§

type Statement = <QP as QueryParser>::Statement

Source§

fn parse_sql<'life0, 'life1, 'life2, 'life3, 'async_trait, C>( &'life0 self, client: &'life1 C, sql: &'life2 str, types: &'life3 [Type], ) -> Pin<Box<dyn Future<Output = PgWireResult<Self::Statement>> + Send + 'async_trait>>
where C: ClientInfo + Unpin + Send + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§