Trait convergence::engine::Engine [−][src]
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.
Associated Types
type PortalType: Portal
type PortalType: Portal
The Portal implementation used by Engine::create_portal.
Required methods
Prepares a statement, returning a vector of field descriptions for the final statement result.
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,
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,
Creates a new portal for the given statement.