[−][src]Struct polodb_core::DbContext
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]
&mut self,
name: &str
) -> DbResult<CollectionMeta>
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]
&mut self,
col_id: u32,
keys: &Document,
options: Option<&Document>
) -> DbResult<()>
pub fn insert(
&mut self,
col_id: u32,
meta_version: u32,
doc: Rc<Document>
) -> DbResult<Rc<Document>>
[src]
&mut self,
col_id: u32,
meta_version: u32,
doc: Rc<Document>
) -> DbResult<Rc<Document>>
pub fn find(
&mut self,
col_id: u32,
meta_version: u32,
query: Option<&Document>
) -> DbResult<DbHandle<'_>>
[src]
&mut self,
col_id: u32,
meta_version: u32,
query: Option<&Document>
) -> DbResult<DbHandle<'_>>
query: None for findAll
pub fn update(
&mut self,
col_id: u32,
meta_version: u32,
query: Option<&Document>,
update: &Document
) -> DbResult<usize>
[src]
&mut self,
col_id: u32,
meta_version: u32,
query: Option<&Document>,
update: &Document
) -> DbResult<usize>
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]
&mut self,
col_id: u32,
meta_version: u32,
query: &Document
) -> DbResult<usize>
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
Auto Trait Implementations
impl RefUnwindSafe for DbContext
impl !Send for DbContext
impl !Sync for DbContext
impl Unpin for DbContext
impl UnwindSafe for DbContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,