pub struct Database { /* private fields */ }

Implementations§

source§

impl Database

source

pub fn new<P: AsRef<Path>>(dir: P) -> Result<Self>

source

pub fn root_dir(&self) -> &Path

source

pub fn session( &self, session_name: &str, expire_interval_sec: Option<i64> ) -> Result<Session>

source

pub fn sessions(&self) -> Result<Vec<SessionInfo>>

source

pub fn session_gc(&self, default_expire_interval_sec: i64) -> Result<()>

source

pub fn commit(&mut self, session: &mut Session) -> Result<Vec<CollectionRow>>

source

pub fn session_clear(&self, session: &mut Session) -> Result<()>

source

pub fn session_restart( &self, session: &mut Session, expire_interval_sec: Option<i64> ) -> Result<()>

source

pub fn update( &self, session: &mut Session, records: Vec<Record> ) -> Result<Vec<SessionCollectionRow>>

source

pub fn collections(&self) -> Vec<String>

source

pub fn collection(&self, id: i32) -> Option<&Collection>

source

pub fn collection_mut(&mut self, id: i32) -> Option<&mut Collection>

source

pub fn collection_id(&self, name: &str) -> Option<i32>

source

pub fn collection_id_or_create(&mut self, name: &str) -> Result<i32>

source

pub fn delete_collection(&mut self, name: &str) -> Result<()>

source

pub fn relation(&self) -> &RelationIndex

source

pub fn search(&self, colletion: &Collection) -> Search

source

pub fn result( &self, search: Search, orders: &[Order] ) -> Result<Vec<u32>, SendError<RowSet>>

source

pub fn result_session( &self, search: SessionSearch<'_>, orders: Vec<Order> ) -> Result<Vec<i64>, SendError<RowSet>>

source

pub fn depends( &self, key: Option<&str>, pend_collection_id: i32, pend_row: i64, session: Option<&Session> ) -> Vec<SessionDepend>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V