pub trait Engine: Send + Sync + 'static {
    type PortalType: Portal;

    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
; 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
; }
Expand description

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.

Required Associated Types

The Portal implementation used by Engine::create_portal.

Required Methods

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

Creates a new portal for the given statement.

Implementors