Struct semilattice_database::Database
source · pub struct Database { /* private fields */ }Implementations§
source§impl Database
impl Database
pub fn collections(&self) -> Vec<String>
pub fn collection(&self, id: NonZeroI32) -> Option<&Collection>
pub fn collection_mut(&mut self, id: NonZeroI32) -> Option<&mut Collection>
pub fn collection_id(&self, name: &str) -> Option<NonZeroI32>
pub fn collection_id_or_create(&mut self, name: &str) -> NonZeroI32
pub async fn delete_collection(&mut self, name: &str)
source§impl Database
impl Database
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<(String, CollectionRow)> )
pub fn depends( &self, key: Option<&str>, pend_collection_id: NonZeroI32, pend_row: NonZeroU32 ) -> Vec<Depend>
source§impl Database
impl Database
pub fn new( dir: PathBuf, collection_settings: Option<HashMap<String, DataOption>>, relation_allocation_lot: u32 ) -> Self
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,
Auto Trait Implementations§
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
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