pub struct SoliDBClient { /* private fields */ }Implementations§
Source§impl SoliDBClient
impl SoliDBClient
Source§impl SoliDBClient
impl SoliDBClient
pub async fn list_collections( &mut self, database: &str, ) -> Result<Vec<String>, DriverError>
pub async fn create_collection( &mut self, database: &str, name: &str, collection_type: Option<&str>, ) -> Result<(), DriverError>
pub async fn delete_collection( &mut self, database: &str, name: &str, ) -> Result<(), DriverError>
pub async fn collection_stats( &mut self, database: &str, collection: &str, ) -> Result<Value, DriverError>
Source§impl SoliDBClient
impl SoliDBClient
pub async fn list_databases(&mut self) -> Result<Vec<String>, DriverError>
pub async fn create_database(&mut self, name: &str) -> Result<(), DriverError>
pub async fn delete_database(&mut self, name: &str) -> Result<(), DriverError>
Source§impl SoliDBClient
impl SoliDBClient
pub async fn get( &mut self, database: &str, collection: &str, key: &str, ) -> Result<Value, DriverError>
pub async fn insert( &mut self, database: &str, collection: &str, key: Option<&str>, document: Value, ) -> Result<Value, DriverError>
pub async fn update( &mut self, database: &str, collection: &str, key: &str, document: Value, merge: bool, ) -> Result<Value, DriverError>
pub async fn delete( &mut self, database: &str, collection: &str, key: &str, ) -> Result<(), DriverError>
pub async fn list( &mut self, database: &str, collection: &str, limit: Option<usize>, offset: Option<usize>, ) -> Result<(Vec<Value>, usize), DriverError>
Source§impl SoliDBClient
impl SoliDBClient
pub async fn create_index( &mut self, database: &str, collection: &str, name: &str, fields: Vec<String>, unique: bool, sparse: bool, ) -> Result<(), DriverError>
pub async fn delete_index( &mut self, database: &str, collection: &str, name: &str, ) -> Result<(), DriverError>
pub async fn list_indexes( &mut self, database: &str, collection: &str, ) -> Result<Vec<Value>, DriverError>
Source§impl SoliDBClient
impl SoliDBClient
Source§impl SoliDBClient
impl SoliDBClient
pub async fn begin_transaction( &mut self, database: &str, isolation_level: Option<IsolationLevel>, ) -> Result<String, DriverError>
pub async fn commit(&mut self) -> Result<(), DriverError>
pub async fn rollback(&mut self) -> Result<(), DriverError>
pub fn in_transaction(&self) -> bool
pub fn transaction_id(&self) -> Option<&str>
Auto Trait Implementations§
impl !Freeze for SoliDBClient
impl RefUnwindSafe for SoliDBClient
impl Send for SoliDBClient
impl Sync for SoliDBClient
impl Unpin for SoliDBClient
impl UnsafeUnpin for SoliDBClient
impl UnwindSafe for SoliDBClient
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