Skip to main content

OrmSession

Trait OrmSession 

Source
pub trait OrmSession {
    type CommandOutput;
    type QueryOutput;
    type Error;

    // Required methods
    fn execute_document(
        self,
        document: &IrDocument,
    ) -> Result<Self::CommandOutput, Self::Error>;
    fn query_document(
        self,
        document: &IrDocument,
    ) -> Result<Self::QueryOutput, Self::Error>;
}
Expand description

Synchronous execution boundary shared by embedded and TCP sessions.

Implementations are provided for borrowed session objects, so executing an ORM builder never creates or owns a connection and cannot escape the caller’s transaction/cursor state.

Required Associated Types§

Required Methods§

Source

fn execute_document( self, document: &IrDocument, ) -> Result<Self::CommandOutput, Self::Error>

Source

fn query_document( self, document: &IrDocument, ) -> Result<Self::QueryOutput, Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§