pub struct RelationalStore {
pub tables: RwLock<HashMap<TableName, Vec<VersionedRow>>>,
pub table_meta: RwLock<HashMap<TableName, TableMeta>>,
/* private fields */
}Fields§
§tables: RwLock<HashMap<TableName, Vec<VersionedRow>>>§table_meta: RwLock<HashMap<TableName, TableMeta>>Implementations§
Source§impl RelationalStore
impl RelationalStore
pub fn new() -> Self
pub fn new_row_id(&self) -> RowId
pub fn apply_inserts(&self, inserts: Vec<(TableName, VersionedRow)>)
pub fn apply_deletes(&self, deletes: Vec<(TableName, RowId, u64)>)
pub fn create_table(&self, name: &str, meta: TableMeta)
pub fn insert_loaded_row(&self, name: &str, row: VersionedRow)
pub fn max_row_id(&self) -> RowId
pub fn set_next_row_id(&self, next_row_id: RowId)
pub fn drop_table(&self, name: &str)
pub fn alter_table_add_column( &self, table: &str, col: ColumnDef, ) -> Result<(), String>
pub fn alter_table_drop_column( &self, table: &str, column: &str, ) -> Result<(), String>
pub fn alter_table_rename_column( &self, table: &str, from: &str, to: &str, ) -> Result<(), String>
pub fn is_immutable(&self, table: &str) -> bool
pub fn validate_state_transition( &self, table: &str, column: &str, from: &str, to: &str, ) -> bool
pub fn table_names(&self) -> Vec<String>
pub fn table_meta(&self, name: &str) -> Option<TableMeta>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RelationalStore
impl !RefUnwindSafe for RelationalStore
impl Send for RelationalStore
impl Sync for RelationalStore
impl Unpin for RelationalStore
impl UnsafeUnpin for RelationalStore
impl UnwindSafe for RelationalStore
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