pub struct SessionDatabase { /* private fields */ }

Implementations§

source§

impl SessionDatabase

source

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

source§

impl SessionDatabase

source

pub fn new( dir: PathBuf, collection_settings: Option<HashMap<String, DataOption>> ) -> Self

source

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

source

pub fn session_gc(&self, default_expire_interval_sec: i64)

source

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

source

pub fn session_dir(&self, session_name: &str) -> PathBuf

source

pub fn session_clear(&self, session: &mut Session)

source

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

source

pub fn update( &self, session: &mut Session, records: Vec<SessionRecord> ) -> Vec<CollectionRow>

source

pub fn depends_with_session( &self, key: Option<&str>, pend_collection_id: i32, pend_row: u32, session: Option<&Session> ) -> Vec<Depend>

source

pub fn register_relations_with_session( &mut self, depend: &CollectionRow, pends: Vec<(String, CollectionRow)>, row_map: &HashMap<CollectionRow, CollectionRow> )

Methods from Deref<Target = Database>§

source

pub fn search(&self, colletion_id: i32) -> Search

source

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

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) -> i32

source

pub fn delete_collection(&mut self, name: &str)

source

pub fn relation(&self) -> Arc<RwLock<RelationIndex>, Global>

source

pub fn register_relation( &mut self, key_name: &str, depend: &CollectionRow, pend: CollectionRow )

source

pub fn register_relations( &mut self, depend: &CollectionRow, pends: Vec<(String, CollectionRow), Global> )

source

pub fn depends( &self, key: Option<&str>, pend_collection_id: i32, pend_row: u32 ) -> Vec<Depend, Global>

source

pub fn delete_recursive(&mut self, target: &CollectionRow)

Trait Implementations§

source§

impl Deref for SessionDatabase

§

type Target = Database

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for SessionDatabase

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

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