pub trait QueryExecutor: TransactionManager {
    // Required methods
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        tx_id: Option<TxId>,
        operation: Operation,
        query_schema: QuerySchemaRef,
        trace_id: Option<String>,
        engine_protocol: EngineProtocol
    ) -> Pin<Box<dyn Future<Output = Result<ResponseData>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_all<'life0, 'async_trait>(
        &'life0 self,
        tx_id: Option<TxId>,
        operations: Vec<Operation>,
        transaction: Option<BatchDocumentTransaction>,
        query_schema: QuerySchemaRef,
        trace_id: Option<String>,
        engine_protocol: EngineProtocol
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<ResponseData>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn primary_connector(&self) -> &(dyn Connector + Send + Sync);
}

Required Methods§

source

fn execute<'life0, 'async_trait>( &'life0 self, tx_id: Option<TxId>, operation: Operation, query_schema: QuerySchemaRef, trace_id: Option<String>, engine_protocol: EngineProtocol ) -> Pin<Box<dyn Future<Output = Result<ResponseData>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Executes a single operation and returns its result. Implementers must honor the passed transaction ID and execute the operation on the transaction identified by tx_id. If None, implementers are free to choose how to execute the query.

source

fn execute_all<'life0, 'async_trait>( &'life0 self, tx_id: Option<TxId>, operations: Vec<Operation>, transaction: Option<BatchDocumentTransaction>, query_schema: QuerySchemaRef, trace_id: Option<String>, engine_protocol: EngineProtocol ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<ResponseData>>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Executes a collection of operations as either a fanout of individual operations (non-transactional), or in series (transactional).

Implementers must honor the passed transaction ID and execute the operation on the transaction identified by tx_id. If None, implementers are free to choose how to execute the query.

Note that transactional is the legacy marker for transactional batches. It must be supported until the stabilization of ITXs.

source

fn primary_connector(&self) -> &(dyn Connector + Send + Sync)

Implementors§

source§

impl<C> QueryExecutor for InterpretingExecutor<C>where C: Connector + Send + Sync + 'static,