pub struct OsunbitDB { /* private fields */ }Implementations§
Source§impl OsunbitDB
impl OsunbitDB
pub async fn new<S: Into<String> + Clone>( pds: &[S], ) -> Result<Self, OsunbitDBError>
pub async fn transaction(&self) -> Result<TransactionHandle, OsunbitDBError>
pub async fn add( &self, collection: &str, id: &str, value: &JsonValue, ) -> Result<(), OsunbitDBError>
pub async fn get( &self, collection: &str, id: &str, ) -> Result<Option<JsonValue>, OsunbitDBError>
pub async fn delete( &self, collection: &str, id: &str, ) -> Result<(), OsunbitDBError>
pub async fn update( &self, collection: &str, id: &str, fields: &JsonValue, ) -> Result<(), OsunbitDBError>
pub async fn scan( &self, collection: &str, limit: u32, cursor: &str, order: &str, ) -> Result<JsonValue, OsunbitDBError>
pub async fn batch_add( &self, collection: &str, items_json: &JsonValue, ) -> Result<(), OsunbitDBError>
pub async fn batch_get( &self, collection: &str, ids_json: &JsonValue, ) -> Result<JsonValue, OsunbitDBError>
pub async fn batch_delete( &self, collection: &str, ids_json: &JsonValue, ) -> Result<(), OsunbitDBError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OsunbitDB
impl !RefUnwindSafe for OsunbitDB
impl Send for OsunbitDB
impl Sync for OsunbitDB
impl Unpin for OsunbitDB
impl !UnwindSafe for OsunbitDB
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request