pub trait Transaction: Sync + Send + 'static {
    type TxnIteratorType: TxnIterator;
    type RowHandlerType: RowHandler;

    fn scan<'a>(
        &'a self,
        begin_sort_key: &'a [DataValue],
        end_sort_key: &'a [DataValue],
        col_idx: &'a [StorageColumnRef],
        is_sorted: bool,
        reversed: bool,
        expr: Option<BoundExpr>
    ) -> impl Future<Output = StorageResult<Self::TxnIteratorType>> + Send + 'a; fn append(
        &mut self,
        columns: DataChunk
    ) -> impl Future<Output = StorageResult<()>> + Send + '_; fn delete<'a>(
        &'a mut self,
        id: &'a Self::RowHandlerType
    ) -> impl Future<Output = StorageResult<()>> + Send + 'a; fn commit(self) -> impl Future<Output = StorageResult<()>> + Send; fn abort(self) -> impl Future<Output = StorageResult<()>> + Send; }
Expand description

Represents a transaction in storage engine.

Dropping a Transaction implicitly aborts it.

Required Associated Types§

Type of the table iterator

Type of the unique reference to a row

Required Methods§

Scan one or multiple columns.

Append data to the table. Generally, columns should be in the same order as ColumnCatalog when constructing the Table.

Delete a record.

Commit a transaction.

Abort a transaction.

Implementors§