Skip to main content

GitStorage

Struct 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: String

Implementations§

Source§

impl GitStorage

Source

pub fn init<T: AsRef<Path>>(path: T, storage_type: StorageType) -> Result<Self>

Source

pub fn open<T: AsRef<Path>>(path: T, storage_type: StorageType) -> Result<Self>

Source

pub fn set_remote(&mut self, remote: String)

Source

pub fn set_branch(&mut self, branch: String)

Source

pub fn add_and_commit(&self, message: &str) -> Result<()>

Source

pub fn pull(&self) -> Result<()>

Source

pub fn push(&self) -> Result<()>

Trait Implementations§

Source§

impl AlterTable for GitStorage

Source§

fn rename_schema( &mut self, table_name: &str, new_table_name: &str, ) -> Result<(), Error>

Source§

fn rename_column( &mut self, table_name: &str, old_column_name: &str, new_column_name: &str, ) -> Result<(), Error>

Source§

fn add_column( &mut self, table_name: &str, column_def: &ColumnDef, ) -> Result<(), Error>

Source§

fn drop_column( &mut self, table_name: &str, column_name: &str, if_exists: bool, ) -> Result<(), Error>

Source§

impl CustomFunction for GitStorage

Source§

impl CustomFunctionMut for GitStorage

Source§

fn insert_function(&mut self, _func: CustomFunction) -> Result<(), Error>

Source§

fn delete_function(&mut self, _func_name: &str) -> Result<(), Error>

Source§

impl Index for GitStorage

Source§

fn scan_indexed_data<'a>( &'a self, _table_name: &str, _index_name: &str, _asc: Option<bool>, _cmp_value: Option<(&IndexOperator, Value)>, ) -> Result<Box<dyn Iterator<Item = Result<(Key, Vec<Value>), Error>> + 'a>, Error>

Source§

impl IndexMut for GitStorage

Source§

fn create_index( &mut self, _table_name: &str, _index_name: &str, _column: &OrderByExpr, ) -> Result<(), Error>

Source§

fn drop_index( &mut self, _table_name: &str, _index_name: &str, ) -> Result<(), Error>

Source§

impl Metadata for GitStorage

Source§

impl Planner for GitStorage

Source§

impl Store for GitStorage

Source§

fn fetch_all_schemas(&self) -> Result<Vec<Schema>>

Source§

fn fetch_schema(&self, table_name: &str) -> Result<Option<Schema>>

Source§

fn fetch_data(&self, table_name: &str, key: &Key) -> Result<Option<Vec<Value>>>

Source§

fn scan_data<'a>(&'a self, table_name: &str) -> Result<RowIter<'a>>

Source§

fn fetch_referencings( &self, table_name: &str, ) -> Result<Vec<Referencing>, Error>

Source§

impl StoreMut for GitStorage

Source§

fn insert_schema(&mut self, schema: &Schema) -> Result<()>

Source§

fn delete_schema(&mut self, table_name: &str) -> Result<()>

Source§

fn append_data(&mut self, table_name: &str, rows: Vec<Vec<Value>>) -> Result<()>

Source§

fn insert_data( &mut self, table_name: &str, rows: Vec<(Key, Vec<Value>)>, ) -> Result<()>

Source§

fn delete_data(&mut self, table_name: &str, keys: Vec<Key>) -> Result<()>

Source§

impl Transaction for GitStorage

Source§

fn begin(&mut self, autocommit: bool) -> Result<bool, Error>

Source§

fn rollback(&mut self) -> Result<(), Error>

Source§

fn commit(&mut self) -> Result<(), Error>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> GStore for S

Source§

impl<S> GStoreMut for S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V