Skip to main content

Repo

Trait Repo 

Source
pub trait Repo {
    // Required methods
    fn adapter_kind(&self) -> AdapterKind;
    fn insert(&mut self, table: &str, data: Row) -> DataResult<StoredRow>;
    fn update(
        &mut self,
        table: &str,
        id: u64,
        data: Row,
    ) -> DataResult<StoredRow>;
    fn delete(&mut self, table: &str, id: u64) -> DataResult<()>;
    fn find(&self, table: &str, id: u64) -> DataResult<Option<StoredRow>>;
    fn list(&self, table: &str, query: &Query) -> DataResult<Vec<StoredRow>>;
}

Required Methods§

Source

fn adapter_kind(&self) -> AdapterKind

Source

fn insert(&mut self, table: &str, data: Row) -> DataResult<StoredRow>

Source

fn update(&mut self, table: &str, id: u64, data: Row) -> DataResult<StoredRow>

Source

fn delete(&mut self, table: &str, id: u64) -> DataResult<()>

Source

fn find(&self, table: &str, id: u64) -> DataResult<Option<StoredRow>>

Source

fn list(&self, table: &str, query: &Query) -> DataResult<Vec<StoredRow>>

Implementors§