Struct gluesql_git_storage::GitStorage
source · pub struct GitStorage {
pub storage_base: StorageBase,
pub path: PathBuf,
pub remote: String,
pub branch: String,
}Fields§
§storage_base: StorageBase§path: PathBuf§remote: String§branch: StringImplementations§
source§impl GitStorage
impl GitStorage
pub fn init<T: AsRef<Path>>(path: T, storage_type: StorageType) -> Result<Self>
pub fn open<T: AsRef<Path>>(path: T, storage_type: StorageType) -> Result<Self>
pub fn set_remote(&mut self, remote: String)
pub fn set_branch(&mut self, branch: String)
pub fn add_and_commit(&self, message: &str) -> Result<()>
pub fn pull(&self) -> Result<()>
pub fn push(&self) -> Result<()>
Trait Implementations§
source§impl AlterTable for GitStorage
impl AlterTable for GitStorage
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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: '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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
source§impl CustomFunction for GitStorage
impl CustomFunction for GitStorage
fn fetch_function<'life0, 'life1, 'async_trait>(
&'life0 self,
_func_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<&'life0 CustomFunction>, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn fetch_all_functions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<&'life0 CustomFunction>, Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
source§impl CustomFunctionMut for GitStorage
impl CustomFunctionMut for GitStorage
fn insert_function<'life0, 'async_trait>(
&'life0 mut self,
_func: CustomFunction,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_function<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_func_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
source§impl Index for GitStorage
impl Index for GitStorage
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<Pin<Box<dyn Stream<Item = Result<(Key, DataRow), Error>> + 'life0>>, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
source§impl IndexMut for GitStorage
impl IndexMut for GitStorage
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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
source§impl Metadata for GitStorage
impl Metadata for GitStorage
source§impl Store for GitStorage
impl Store for GitStorage
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,
fn fetch_referencings<'life0, 'life1, 'async_trait>(
&'life0 self,
table_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Referencing>, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
source§impl StoreMut for GitStorage
impl StoreMut for GitStorage
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 GitStorage
impl Transaction for GitStorage
fn begin<'life0, 'async_trait>(
&'life0 mut self,
autocommit: bool,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn rollback<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for GitStorage
impl RefUnwindSafe for GitStorage
impl Send for GitStorage
impl Sync for GitStorage
impl Unpin for GitStorage
impl UnwindSafe for GitStorage
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> 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 more