Struct gluesql_memory_storage::MemoryStorage
source · pub struct MemoryStorage {
pub id_counter: i64,
pub items: HashMap<String, Item>,
pub metadata: HashMap<String, HashMap<String, Value>>,
pub functions: HashMap<String, CustomFunction>,
}
Fields§
§id_counter: i64
§items: HashMap<String, Item>
§metadata: HashMap<String, HashMap<String, Value>>
§functions: HashMap<String, CustomFunction>
Trait Implementations§
source§impl AlterTable for MemoryStorage
impl AlterTable for MemoryStorage
fn rename_schema<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, table_name: &'life1 str, new_table_name: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
fn rename_column<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, table_name: &'life1 str, old_column_name: &'life2 str, new_column_name: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
fn add_column<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, table_name: &'life1 str, column_def: &'life2 ColumnDef ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
fn drop_column<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, table_name: &'life1 str, column_name: &'life2 str, if_exists: bool ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
source§impl Clone for MemoryStorage
impl Clone for MemoryStorage
source§fn clone(&self) -> MemoryStorage
fn clone(&self) -> MemoryStorage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CustomFunction for MemoryStorage
impl CustomFunction for MemoryStorage
fn fetch_function<'life0, 'life1, 'async_trait>( &'life0 self, func_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Option<&StructCustomFunction>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn fetch_all_functions<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<&StructCustomFunction>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
source§impl CustomFunctionMut for MemoryStorage
impl CustomFunctionMut for MemoryStorage
fn insert_function<'life0, 'async_trait>( &'life0 mut self, func: StructCustomFunction ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn delete_function<'life0, 'life1, 'async_trait>( &'life0 mut self, func_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl Debug for MemoryStorage
impl Debug for MemoryStorage
source§impl Default for MemoryStorage
impl Default for MemoryStorage
source§fn default() -> MemoryStorage
fn default() -> MemoryStorage
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for MemoryStorage
impl<'de> Deserialize<'de> for MemoryStorage
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Index for MemoryStorage
impl Index for MemoryStorage
fn scan_indexed_data<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _table_name: &'life1 str, _index_name: &'life2 str, _asc: Option<bool>, _cmp_value: Option<(&'life3 IndexOperator, Value)> ) -> Pin<Box<dyn Future<Output = Result<RowIter>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
source§impl IndexMut for MemoryStorage
impl IndexMut for MemoryStorage
fn create_index<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, _table_name: &'life1 str, _index_name: &'life2 str, _column: &'life3 OrderByExpr ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
fn drop_index<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, _table_name: &'life1 str, _index_name: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
source§impl Metadata for MemoryStorage
impl Metadata for MemoryStorage
source§impl Serialize for MemoryStorage
impl Serialize for MemoryStorage
source§impl Store for MemoryStorage
impl Store for MemoryStorage
fn fetch_all_schemas<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<Schema>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn fetch_schema<'life0, 'life1, 'async_trait>( &'life0 self, table_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Option<Schema>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn fetch_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, table_name: &'life1 str, key: &'life2 Key ) -> Pin<Box<dyn Future<Output = Result<Option<DataRow>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
fn scan_data<'life0, 'life1, 'async_trait>( &'life0 self, table_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<RowIter>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl StoreMut for MemoryStorage
impl StoreMut for MemoryStorage
fn insert_schema<'life0, 'life1, 'async_trait>( &'life0 mut self, schema: &'life1 Schema ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn delete_schema<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn append_data<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, rows: Vec<DataRow> ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn insert_data<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, rows: Vec<(Key, DataRow)> ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn delete_data<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, keys: Vec<Key> ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
source§impl Transaction for MemoryStorage
impl Transaction for MemoryStorage
fn begin<'life0, 'async_trait>( &'life0 mut self, autocommit: bool ) -> Pin<Box<dyn Future<Output = Result<bool>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn rollback<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn commit<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Auto Trait Implementations§
impl RefUnwindSafe for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl UnwindSafe for MemoryStorage
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