Struct gluesql::prelude::SledStorage
source ·
[−]Fields
tree: Db
state: State
tx_timeout: Option<u128>
transaction timeout in milliseconds
Implementations
pub async fn check_and_retry<Fut>(
self,
tx_result: Result<TxPayload, TransactionError<Error>>,
retry_func: impl FnOnce(SledStorage) -> Fut
) -> Result<(SledStorage, ()), (SledStorage, Error)> where
Fut: Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>>,
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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
SledStorage: '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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
SledStorage: '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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
SledStorage: '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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
SledStorage: 'async_trait,
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<(IVec, Row), Error>> + 'static, Global>, Error>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
SledStorage: '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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
SledStorage: '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<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
SledStorage: 'async_trait,
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,
SledStorage: '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<(IVec, Row), Error>> + 'static, Global>, Error>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
SledStorage: 'async_trait,
pub fn insert_schema<'life0, 'async_trait>(
self,
schema: &'life0 Schema
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
SledStorage: 'async_trait,
pub fn delete_schema<'life0, 'async_trait>(
self,
table_name: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
SledStorage: 'async_trait,
pub fn insert_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
rows: Vec<Row, Global>
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
SledStorage: 'async_trait,
pub fn update_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
rows: Vec<(IVec, Row), Global>
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
SledStorage: 'async_trait,
pub fn delete_data<'life0, 'async_trait>(
self,
table_name: &'life0 str,
keys: Vec<IVec, Global>
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
'life0: 'async_trait,
SledStorage: 'async_trait,
pub fn begin<'async_trait>(
self,
autocommit: bool
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, bool), (SledStorage, Error)>> + 'async_trait, Global>> where
SledStorage: 'async_trait,
pub fn rollback<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<(SledStorage, ()), (SledStorage, Error)>> + 'async_trait, Global>> where
SledStorage: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for SledStorage
impl Send for SledStorage
impl Sync for SledStorage
impl Unpin for SledStorage
impl !UnwindSafe for SledStorage
Blanket Implementations
Mutably borrows from an owned value. Read more