Struct SessionDatabase

Source
pub struct SessionDatabase { /* private fields */ }

Implementations§

Source§

impl SessionDatabase

Source

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

Source§

impl SessionDatabase

Source

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

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 async fn update( &self, session: &mut Session, records: Vec<SessionRecord>, ) -> Vec<CollectionRow>

Source

pub fn depends_with_session( &self, key: Option<Arc<String>>, pend_collection_id: NonZero<i32>, pend_row: NonZero<i64>, session: Option<&Session>, ) -> Vec<Depend>

Source

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

Methods from Deref<Target = Database>§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn relation(&self) -> &RelationIndex

Source

pub fn relation_mut(&mut self) -> &mut RelationIndex

Source

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

Source

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

Source

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

Source

pub fn delete<'life0, 'life_self, 'async_recursion>( &'life_self mut self, target: &'life0 CollectionRow, ) -> Pin<Box<dyn Future<Output = ()> + 'async_recursion>>
where 'life0: 'async_recursion, 'life_self: 'async_recursion,

Trait Implementations§

Source§

impl Deref for SessionDatabase

Source§

type Target = Database

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<SessionDatabase as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for SessionDatabase

Source§

fn deref_mut(&mut self) -> &mut <SessionDatabase as Deref>::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V