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

source

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

source

pub async 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: NonZeroI32) -> Search

source

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

source

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

source

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

source

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

source

pub fn collection_id_or_create(&mut self, name: &str) -> NonZeroI32

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<(String, CollectionRow)> )

source

pub fn depends( &self, key: Option<&str>, pend_collection_id: NonZeroI32, pend_row: NonZeroU32 ) -> Vec<Depend>

source

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

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