pub struct SessionDatabase { /* private fields */ }
Implementations§
Source§impl SessionDatabase
impl SessionDatabase
pub async fn commit(&mut self, session: &mut Session) -> Vec<CollectionRow>
Source§impl SessionDatabase
impl SessionDatabase
pub fn new( dir: PathBuf, collection_settings: Option<HashMap<String, DataOption>>, relation_reserve_unit: u32, ) -> SessionDatabase
pub fn sessions(&self) -> Vec<SessionInfo>
pub fn session_gc(&self, default_expire_interval_sec: i64)
pub fn session( &self, session_name: &str, expire_interval_sec: Option<i64>, ) -> Session
pub fn session_dir(&self, session_name: &str) -> PathBuf
pub fn session_clear(&self, session: &mut Session)
pub fn session_restart( &self, session: &mut Session, expire_interval_sec: Option<i64>, )
pub async fn update( &self, session: &mut Session, records: Vec<SessionRecord>, ) -> Vec<CollectionRow>
pub fn depends_with_session( &self, key: Option<Arc<String>>, pend_collection_id: NonZero<i32>, pend_row: NonZero<i64>, session: Option<&Session>, ) -> Vec<Depend>
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>§
pub fn search(&self, colletion_id: NonZero<i32>) -> Search
pub fn collections(&self) -> Vec<String>
pub fn collection(&self, id: NonZero<i32>) -> Option<&Collection>
pub fn collection_mut(&mut self, id: NonZero<i32>) -> Option<&mut Collection>
pub fn collection_id(&self, name: &str) -> Option<NonZero<i32>>
pub fn collection_id_or_create(&mut self, name: &str) -> NonZero<i32>
pub async fn delete_collection(&mut self, name: &str)
pub fn relation(&self) -> &RelationIndex
pub fn relation_mut(&mut self) -> &mut RelationIndex
pub async fn register_relation( &mut self, key_name: &str, depend: &CollectionRow, pend: &CollectionRow, )
pub async fn register_relations( &mut self, depend: &CollectionRow, pends: Vec<(Arc<String>, CollectionRow)>, )
pub fn depends( &self, key: Option<Arc<String>>, pend_collection_id: NonZero<i32>, pend_row: NonZero<u32>, ) -> Vec<Depend>
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
impl Deref for SessionDatabase
Source§impl DerefMut for SessionDatabase
impl DerefMut for SessionDatabase
Auto Trait Implementations§
impl Freeze for SessionDatabase
impl RefUnwindSafe for SessionDatabase
impl Send for SessionDatabase
impl Sync for SessionDatabase
impl Unpin for SessionDatabase
impl UnwindSafe for SessionDatabase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more