pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub async fn get(&self, pk: &str, sk: &str) -> Result<Option<Bytes>>
pub async fn put(&self, pk: &str, sk: &str, data: &[u8]) -> Result<()>
pub async fn delete(&self, pk: &str, sk: &str) -> Result<()>
pub fn mock_get(&self, pk: &str, sk: &str) -> MockGetBuilder<'_>
pub fn mock_put(&self, pk: &str, sk: &str) -> MockPutBuilder<'_>
pub fn mock_delete(&self, pk: &str, sk: &str) -> MockDeleteBuilder<'_>
pub fn clear_mocks(&self)
pub async fn query<S1: AsRef<str>, S2: AsRef<str>>( &self, pk: S1, after_sk: Option<S2>, limit: usize, ) -> Result<Vec<(String, Bytes)>>
pub async fn scan( &self, after: Option<(&str, &str)>, limit: usize, ) -> Result<Vec<(String, String, Bytes)>>
pub async fn batch(&self, ops: &[BatchOp<'_>]) -> Result<()>
pub async fn transaction(&self) -> Result<Transaction>
pub async fn trx<F, Fut, Out, Cancel, E>( &self, f: F, ) -> TrxResult<Out, Cancel, E>
pub async fn execute_raw( &self, sql: &str, args: Vec<Value>, want_rows: bool, ) -> Result<Vec<Vec<Value>>>
pub async fn execute_ops(&self, ops: Vec<DbOp>) -> Result<Vec<DbResult>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
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