Trait convergence::engine::Engine[][src]

pub trait Engine: Send + Sync {
    type PortalType: Portal;
#[must_use]    fn new<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
    where
        Self: 'async_trait
;
#[must_use] fn prepare<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        stmt: &'life1 Statement
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FieldDescription>, ErrorResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn create_portal<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        stmt: &'life1 Statement
    ) -> Pin<Box<dyn Future<Output = Result<Self::PortalType, ErrorResponse>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

The engine trait is the core of the convergence crate, and is responsible for dispatching most SQL operations.

Each connection is allocated an Engine instance, which it uses to prepare statements, create portals, etc.

Associated Types

type PortalType: Portal[src]

The Portal implementation used by Engine::create_portal.

Loading content...

Required methods

#[must_use]fn new<'async_trait>(
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>> where
    Self: 'async_trait, 
[src]

Create a new instance of this engine type.

#[must_use]fn prepare<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    stmt: &'life1 Statement
) -> Pin<Box<dyn Future<Output = Result<Vec<FieldDescription>, ErrorResponse>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Prepares a statement, returning a vector of field descriptions for the final statement result.

#[must_use]fn create_portal<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    stmt: &'life1 Statement
) -> Pin<Box<dyn Future<Output = Result<Self::PortalType, ErrorResponse>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Creates a new portal for the given statement.

Loading content...

Implementors

Loading content...