pub struct Database {
pub transaction_queue: Vec<Vec<Change>>,
pub dynamic_tables: HashSet<Register>,
pub tables: HashMap<u64, TableRef>,
pub table_alias_to_id: HashMap<u64, TableId>,
}Fields§
§transaction_queue: Vec<Vec<Change>>§dynamic_tables: HashSet<Register>§tables: HashMap<u64, TableRef>§table_alias_to_id: HashMap<u64, TableId>Implementations§
source§impl Database
impl Database
pub fn new() -> Database
pub fn clear(&mut self)
pub fn process_transaction_queue( &mut self, ) -> Result<HashSet<Register>, MechError>
pub fn process_transaction( &mut self, txn: &Transaction, ) -> Result<HashSet<Register>, MechError>
pub fn union(&mut self, other: &Self) -> Result<(), MechError>
pub fn insert_alias( &mut self, alias: u64, table_id: TableId, ) -> Result<TableId, MechError>
pub fn insert_table(&mut self, table: Table) -> Result<TableRef, MechError>
pub fn overwrite_table(&mut self, table: Table) -> Result<TableRef, MechError>
pub fn insert_table_ref( &mut self, table: TableRef, ) -> Result<TableRef, MechError>
pub fn get_table(&self, table_name: &str) -> Option<&TableRef>
pub fn get_table_by_id(&self, table_id: &u64) -> Option<&TableRef>
pub fn get_table_by_id_mut(&self, table_id: u64) -> Option<&TableRef>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Database
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.