Struct gluesql::prelude::MemoryStorage
source ·
[−]pub struct MemoryStorage {
pub id_counter: u64,
pub items: HashMap<String, Item, RandomState>,
}
Fields
id_counter: u64
items: HashMap<String, Item, RandomState>
Trait Implementations
pub fn rename_schema<'life0, 'life1, 'async_trait>(
self,
table_name: &'life0 str,
new_table_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
pub fn rename_column<'life0, 'life1, 'life2, 'async_trait>(
self,
table_name: &'life0 str,
old_column_name: &'life1 str,
new_column_name: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryStorage: 'async_trait,
pub fn add_column<'life0, 'life1, 'async_trait>(
self,
table_name: &'life0 str,
column_def: &'life1 ColumnDef
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
pub fn drop_column<'life0, 'life1, 'async_trait>(
self,
table_name: &'life0 str,
column_name: &'life1 str,
if_exists: bool
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
Returns the “default value” for a type. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MemoryStorage, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<MemoryStorage, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub 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<Box<dyn Iterator<Item = Result<(Key, Row), Error>> + 'static, Global>, Error>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryStorage: 'async_trait,
pub fn create_index<'life0, 'life1, 'life2, 'async_trait>(
self,
_table_name: &'life0 str,
_index_name: &'life1 str,
_column: &'life2 OrderByExpr
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryStorage: 'async_trait,
pub fn drop_index<'life0, 'life1, 'async_trait>(
self,
_table_name: &'life0 str,
_index_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
pub fn fetch_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
table_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Option<Schema>, Error>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
pub fn scan_data<'life0, 'life1, 'async_trait>(
&'life0 self,
table_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = Result<(Key, Row), Error>> + 'static, Global>, Error>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryStorage: 'async_trait,
pub fn insert_schema<'life0, 'async_trait>(
self,
schema: &'life0 Schema
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
MemoryStorage: 'async_trait,
pub fn delete_schema<'life0, 'async_trait>(
self,
table_name: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
MemoryStorage: 'async_trait,
pub fn insert_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
rows: Vec<Row, Global>
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
MemoryStorage: 'async_trait,
pub fn update_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
rows: Vec<(Key, Row), Global>
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
MemoryStorage: 'async_trait,
pub fn delete_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
keys: Vec<Key, Global>
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
MemoryStorage: 'async_trait,
pub fn begin<'async_trait>(
self,
autocommit: bool
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, bool), (MemoryStorage, Error)>> + 'async_trait, Global>> where
MemoryStorage: 'async_trait,
pub fn rollback<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<(MemoryStorage, ()), (MemoryStorage, Error)>> + 'async_trait, Global>> where
MemoryStorage: '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
Mutably borrows from an owned value. Read more