RocksTransaction

Struct RocksTransaction 

Source
pub struct RocksTransaction<'db> { /* private fields */ }

Trait Implementations§

Source§

impl<'txn> Transaction for RocksTransaction<'txn>

Source§

type IterType<'iter> = RocksIter<'txn, 'iter> where Self: 'iter

Source§

fn table_codec(&self) -> *const TableCodec

Source§

fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, DatabaseError>

Source§

fn set( &mut self, key: Vec<'_, u8>, value: Vec<'_, u8>, ) -> Result<(), DatabaseError>

Source§

fn remove(&mut self, key: &[u8]) -> Result<(), DatabaseError>

Source§

fn range<'a>( &'a self, min: Bound<Vec<'a, u8>>, max: Bound<Vec<'a, u8>>, ) -> Result<Self::IterType<'a>, DatabaseError>

Source§

fn commit(self) -> Result<(), DatabaseError>

Source§

fn read<'a>( &'a self, table_cache: &'a SharedLruCache<TableName, TableCatalog>, table_name: TableName, bounds: (Option<usize>, Option<usize>), columns: Vec<(usize, ColumnRef)>, ) -> Result<TupleIter<'a, Self>, DatabaseError>

The bounds is applied to the whole data batches, not per batch. Read more
Source§

fn read_by_index<'a>( &'a self, table_cache: &'a SharedLruCache<TableName, TableCatalog>, table_name: TableName, (offset_option, limit_option): (Option<usize>, Option<usize>), columns: Vec<(usize, ColumnRef)>, index_meta: IndexMetaRef, ranges: Vec<Range>, ) -> Result<IndexIter<'a, Self>, DatabaseError>

Source§

fn add_index_meta( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: &TableName, index_name: String, column_ids: Vec<ColumnId>, ty: IndexType, ) -> Result<IndexId, DatabaseError>

Source§

fn add_index( &mut self, table_name: &str, index: Index<'_>, tuple_id: &TupleId, ) -> Result<(), DatabaseError>

Source§

fn del_index( &mut self, table_name: &str, index: &Index<'_>, tuple_id: &TupleId, ) -> Result<(), DatabaseError>

Source§

fn append_tuple( &mut self, table_name: &str, tuple: Tuple, types: &[LogicalType], is_overwrite: bool, ) -> Result<(), DatabaseError>

Source§

fn remove_tuple( &mut self, table_name: &str, tuple_id: &TupleId, ) -> Result<(), DatabaseError>

Source§

fn add_column( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: &TableName, column: &ColumnCatalog, if_not_exists: bool, ) -> Result<ColumnId, DatabaseError>

Source§

fn drop_column( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, column_name: &str, ) -> Result<(), DatabaseError>

Source§

fn create_view( &mut self, view_cache: &SharedLruCache<TableName, View>, view: View, or_replace: bool, ) -> Result<(), DatabaseError>

Source§

fn create_table( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: TableName, columns: Vec<ColumnCatalog>, if_not_exists: bool, ) -> Result<TableName, DatabaseError>

Source§

fn check_name_hash( &mut self, table_name: &TableName, ) -> Result<(), DatabaseError>

Source§

fn drop_name_hash( &mut self, table_name: &TableName, ) -> Result<(), DatabaseError>

Source§

fn drop_view( &mut self, view_cache: &SharedLruCache<TableName, View>, table_cache: &SharedLruCache<TableName, TableCatalog>, view_name: TableName, if_exists: bool, ) -> Result<(), DatabaseError>

Source§

fn drop_table( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: TableName, if_exists: bool, ) -> Result<(), DatabaseError>

Source§

fn drop_data(&mut self, table_name: &str) -> Result<(), DatabaseError>

Source§

fn view<'a>( &'a self, table_cache: &'a SharedLruCache<TableName, TableCatalog>, view_cache: &'a SharedLruCache<TableName, View>, view_name: TableName, ) -> Result<Option<&'a View>, DatabaseError>

Source§

fn table<'a>( &'a self, table_cache: &'a SharedLruCache<TableName, TableCatalog>, table_name: TableName, ) -> Result<Option<&'a TableCatalog>, DatabaseError>

Source§

fn table_metas(&self) -> Result<Vec<TableMeta>, DatabaseError>

Source§

fn save_table_meta( &mut self, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, path: String, statistics_meta: StatisticsMeta, ) -> Result<(), DatabaseError>

Source§

fn table_meta_path( &self, table_name: &str, index_id: IndexId, ) -> Result<Option<String>, DatabaseError>

Source§

fn remove_table_meta( &mut self, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, index_id: IndexId, ) -> Result<(), DatabaseError>

Source§

fn meta_loader<'a>( &'a self, meta_cache: &'a SharedLruCache<(TableName, IndexId), StatisticsMeta>, ) -> StatisticMetaLoader<'a, Self>
where Self: Sized,

Source§

fn table_collect( &self, table_name: &TableName, ) -> Result<Option<(Vec<ColumnRef>, Vec<IndexMetaRef>)>, DatabaseError>

Source§

fn _drop_data( &mut self, min: Vec<'_, u8>, max: Vec<'_, u8>, ) -> Result<(), DatabaseError>

Source§

fn create_index_meta_from_column( &mut self, table: &mut TableCatalog, ) -> Result<(), DatabaseError>

Auto Trait Implementations§

§

impl<'db> !Freeze for RocksTransaction<'db>

§

impl<'db> !RefUnwindSafe for RocksTransaction<'db>

§

impl<'db> Send for RocksTransaction<'db>

§

impl<'db> !Sync for RocksTransaction<'db>

§

impl<'db> Unpin for RocksTransaction<'db>

§

impl<'db> !UnwindSafe for RocksTransaction<'db>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V