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( &mut self, table_name: &str, new_table_name: &str, ) -> Result<(), Error>
fn rename_column( &mut self, table_name: &str, old_column_name: &str, new_column_name: &str, ) -> Result<(), Error>
fn add_column( &mut self, table_name: &str, column_def: &ColumnDef, ) -> Result<(), Error>
fn drop_column( &mut self, table_name: &str, column_name: &str, if_exists: bool, ) -> Result<(), Error>
Source§impl CustomFunction for GitStorage
impl CustomFunction for GitStorage
fn fetch_function<'a>( &'a self, _func_name: &str, ) -> Result<Option<&'a CustomFunction>, Error>
fn fetch_all_functions(&self) -> Result<Vec<&CustomFunction>, Error>
Source§impl CustomFunctionMut for GitStorage
impl CustomFunctionMut for GitStorage
fn insert_function(&mut self, _func: CustomFunction) -> Result<(), Error>
fn delete_function(&mut self, _func_name: &str) -> Result<(), Error>
Source§impl Index for GitStorage
impl Index for GitStorage
Source§impl IndexMut for GitStorage
impl IndexMut for GitStorage
Source§impl Metadata for GitStorage
impl Metadata for GitStorage
Source§impl Planner for GitStorage
impl Planner for GitStorage
fn plan(&self, statement: StatementPlan) -> Result<StatementPlan, Error>
Source§impl Store for GitStorage
impl Store for GitStorage
fn fetch_all_schemas(&self) -> Result<Vec<Schema>>
fn fetch_schema(&self, table_name: &str) -> Result<Option<Schema>>
fn fetch_data(&self, table_name: &str, key: &Key) -> Result<Option<Vec<Value>>>
fn scan_data<'a>(&'a self, table_name: &str) -> Result<RowIter<'a>>
fn fetch_referencings( &self, table_name: &str, ) -> Result<Vec<Referencing>, Error>
Source§impl StoreMut for GitStorage
impl StoreMut for GitStorage
fn insert_schema(&mut self, schema: &Schema) -> Result<()>
fn delete_schema(&mut self, table_name: &str) -> Result<()>
fn append_data(&mut self, table_name: &str, rows: Vec<Vec<Value>>) -> Result<()>
fn insert_data( &mut self, table_name: &str, rows: Vec<(Key, Vec<Value>)>, ) -> Result<()>
fn delete_data(&mut self, table_name: &str, keys: Vec<Key>) -> Result<()>
Auto Trait Implementations§
impl Freeze for GitStorage
impl RefUnwindSafe for GitStorage
impl Send for GitStorage
impl Sync for GitStorage
impl Unpin for GitStorage
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S> GStore for S
impl<S> GStoreMut for S
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