[][src]Struct polodb_core::DbContext

pub struct DbContext { /* fields omitted */ }

API for all platforms

Implementations

impl DbContext[src]

pub fn new(path: &Path) -> DbResult<DbContext>[src]

pub fn get_collection_meta_by_name(
    &mut self,
    name: &str
) -> DbResult<CollectionMeta>
[src]

pub fn create_collection(&mut self, name: &str) -> DbResult<CollectionMeta>[src]

pub fn create_index(
    &mut self,
    col_id: u32,
    keys: &Document,
    options: Option<&Document>
) -> DbResult<()>
[src]

pub fn insert(
    &mut self,
    col_id: u32,
    meta_version: u32,
    doc: Rc<Document>
) -> DbResult<Rc<Document>>
[src]

pub fn find(
    &mut self,
    col_id: u32,
    meta_version: u32,
    query: Option<&Document>
) -> DbResult<DbHandle<'_>>
[src]

query: None for findAll

pub fn update(
    &mut self,
    col_id: u32,
    meta_version: u32,
    query: Option<&Document>,
    update: &Document
) -> DbResult<usize>
[src]

pub fn drop(&mut self, col_id: u32, meta_version: u32) -> DbResult<()>[src]

pub fn delete(
    &mut self,
    col_id: u32,
    meta_version: u32,
    query: &Document
) -> DbResult<usize>
[src]

pub fn delete_all(&mut self, col_id: u32, meta_version: u32) -> DbResult<usize>[src]

pub fn count(&mut self, col_id: u32, meta_version: u32) -> DbResult<u64>[src]

pub fn query_all_meta(&mut self) -> DbResult<Vec<Rc<Document>>>[src]

pub fn start_transaction(&mut self, ty: Option<TransactionType>) -> DbResult<()>[src]

pub fn commit(&mut self) -> DbResult<()>[src]

pub fn rollback(&mut self) -> DbResult<()>[src]

pub fn object_id_maker(&mut self) -> &mut ObjectIdMaker[src]

pub fn get_version() -> String[src]

Trait Implementations

impl Drop for DbContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.