pub struct MemoryLsmEngine { /* private fields */ }Expand description
In-memory LSM Engine
Implementations§
Source§impl MemoryLsmEngine
impl MemoryLsmEngine
Sourcepub fn create_with_schema(schema: TableSchema) -> Result<Self>
pub fn create_with_schema(schema: TableSchema) -> Result<Self>
Create a new in-memory database with a table schema
Sourcepub fn query(&self, params: QueryParams) -> Result<QueryResult>
pub fn query(&self, params: QueryParams) -> Result<QueryResult>
Query items within a partition
Sourcepub fn scan(&self, params: ScanParams) -> Result<ScanResult>
pub fn scan(&self, params: ScanParams) -> Result<ScanResult>
Scan all items across all stripes
Sourcepub fn update(
&self,
key: &Key,
actions: &[UpdateAction],
context: &ExpressionContext,
) -> Result<Item>
pub fn update( &self, key: &Key, actions: &[UpdateAction], context: &ExpressionContext, ) -> Result<Item>
Update an item using update expression
Sourcepub fn update_conditional(
&self,
key: &Key,
actions: &[UpdateAction],
condition: &Expr,
context: &ExpressionContext,
) -> Result<Item>
pub fn update_conditional( &self, key: &Key, actions: &[UpdateAction], condition: &Expr, context: &ExpressionContext, ) -> Result<Item>
Update an item with a condition expression
Sourcepub fn put_conditional(
&self,
key: Key,
item: Item,
condition: &Expr,
context: &ExpressionContext,
) -> Result<()>
pub fn put_conditional( &self, key: Key, item: Item, condition: &Expr, context: &ExpressionContext, ) -> Result<()>
Put an item with a condition expression
Sourcepub fn delete_conditional(
&self,
key: Key,
condition: &Expr,
context: &ExpressionContext,
) -> Result<()>
pub fn delete_conditional( &self, key: Key, condition: &Expr, context: &ExpressionContext, ) -> Result<()>
Delete an item with a condition expression
Sourcepub fn batch_get(&self, keys: &[Key]) -> Result<HashMap<Key, Option<Item>>>
pub fn batch_get(&self, keys: &[Key]) -> Result<HashMap<Key, Option<Item>>>
Batch get multiple items
Sourcepub fn batch_write(&self, operations: &[(Key, Option<Item>)]) -> Result<usize>
pub fn batch_write(&self, operations: &[(Key, Option<Item>)]) -> Result<usize>
Batch write multiple items
Sourcepub fn transact_get(&self, keys: &[Key]) -> Result<Vec<Option<Item>>>
pub fn transact_get(&self, keys: &[Key]) -> Result<Vec<Option<Item>>>
Transaction get - read multiple items atomically
Sourcepub fn transact_write(
&self,
operations: &[(Key, TransactWriteOperation)],
context: &ExpressionContext,
) -> Result<usize>
pub fn transact_write( &self, operations: &[(Key, TransactWriteOperation)], context: &ExpressionContext, ) -> Result<usize>
Transaction write - write multiple items atomically with conditions
Trait Implementations§
Source§impl Clone for MemoryLsmEngine
impl Clone for MemoryLsmEngine
Source§fn clone(&self) -> MemoryLsmEngine
fn clone(&self) -> MemoryLsmEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MemoryLsmEngine
impl RefUnwindSafe for MemoryLsmEngine
impl Send for MemoryLsmEngine
impl Sync for MemoryLsmEngine
impl Unpin for MemoryLsmEngine
impl UnwindSafe for MemoryLsmEngine
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