pub struct RocksTransaction<'db> { /* private fields */ }Trait Implementations§
Source§impl<'txn> Transaction for RocksTransaction<'txn>
impl<'txn> Transaction for RocksTransaction<'txn>
type IterType<'iter> = RocksIter<'txn, 'iter> where Self: 'iter
fn table_codec(&self) -> *const TableCodec
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, DatabaseError>
fn set( &mut self, key: Vec<'_, u8>, value: Vec<'_, u8>, ) -> Result<(), DatabaseError>
fn remove(&mut self, key: &[u8]) -> Result<(), DatabaseError>
fn range<'a>( &'a self, min: Bound<Vec<'a, u8>>, max: Bound<Vec<'a, u8>>, ) -> Result<Self::IterType<'a>, DatabaseError>
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>
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
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>
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>
fn add_index( &mut self, table_name: &str, index: Index<'_>, tuple_id: &TupleId, ) -> Result<(), DatabaseError>
fn del_index( &mut self, table_name: &str, index: &Index<'_>, tuple_id: &TupleId, ) -> Result<(), DatabaseError>
fn append_tuple( &mut self, table_name: &str, tuple: Tuple, types: &[LogicalType], is_overwrite: bool, ) -> Result<(), DatabaseError>
fn remove_tuple( &mut self, table_name: &str, tuple_id: &TupleId, ) -> Result<(), DatabaseError>
fn add_column( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: &TableName, column: &ColumnCatalog, if_not_exists: bool, ) -> Result<ColumnId, DatabaseError>
fn drop_column( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, column_name: &str, ) -> Result<(), DatabaseError>
fn create_view( &mut self, view_cache: &SharedLruCache<TableName, View>, view: View, or_replace: bool, ) -> Result<(), DatabaseError>
fn create_table( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: TableName, columns: Vec<ColumnCatalog>, if_not_exists: bool, ) -> Result<TableName, DatabaseError>
fn check_name_hash( &mut self, table_name: &TableName, ) -> Result<(), DatabaseError>
fn drop_name_hash( &mut self, table_name: &TableName, ) -> Result<(), DatabaseError>
fn drop_view( &mut self, view_cache: &SharedLruCache<TableName, View>, table_cache: &SharedLruCache<TableName, TableCatalog>, view_name: TableName, if_exists: bool, ) -> Result<(), DatabaseError>
fn drop_table( &mut self, table_cache: &SharedLruCache<TableName, TableCatalog>, table_name: TableName, if_exists: bool, ) -> Result<(), DatabaseError>
fn drop_data(&mut self, table_name: &str) -> Result<(), DatabaseError>
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>
fn table<'a>( &'a self, table_cache: &'a SharedLruCache<TableName, TableCatalog>, table_name: TableName, ) -> Result<Option<&'a TableCatalog>, DatabaseError>
fn table_metas(&self) -> Result<Vec<TableMeta>, DatabaseError>
fn save_table_meta( &mut self, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, path: String, statistics_meta: StatisticsMeta, ) -> Result<(), DatabaseError>
fn table_meta_path( &self, table_name: &str, index_id: IndexId, ) -> Result<Option<String>, DatabaseError>
fn remove_table_meta( &mut self, meta_cache: &SharedLruCache<(TableName, IndexId), StatisticsMeta>, table_name: &TableName, index_id: IndexId, ) -> Result<(), DatabaseError>
fn meta_loader<'a>(
&'a self,
meta_cache: &'a SharedLruCache<(TableName, IndexId), StatisticsMeta>,
) -> StatisticMetaLoader<'a, Self>where
Self: Sized,
fn table_collect( &self, table_name: &TableName, ) -> Result<Option<(Vec<ColumnRef>, Vec<IndexMetaRef>)>, DatabaseError>
fn _drop_data( &mut self, min: Vec<'_, u8>, max: Vec<'_, u8>, ) -> Result<(), DatabaseError>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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