Trait convergence::engine::Engine
source · pub trait Engine: Send + Sync + 'static {
type PortalType: Portal;
// Required methods
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: '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§
sourcetype PortalType: Portal
type PortalType: Portal
The Portal implementation used by Engine::create_portal.
Required Methods§
sourcefn prepare<'life0, 'life1, 'async_trait>(
&'life0 mut self,
stmt: &'life1 Statement
) -> Pin<Box<dyn Future<Output = Result<Vec<FieldDescription>, ErrorResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Prepares a statement, returning a vector of field descriptions for the final statement result.
sourcefn 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
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Creates a new portal for the given statement.