Trait mysql_repo::Repository [] [src]

pub trait Repository {
    fn where_one<T, P, Where>(
        conn: &mut T,
        sql: &str,
        params: P
    ) -> Result<Option<Where>, Error>
    where
        T: GenericConnection,
        Where: Whereable<Self>,
        P: Into<Params>,
        Self: Sized
, { ... } fn where_all<T, P, Where>(
        conn: &mut T,
        sql: &str,
        params: P
    ) -> Result<Vec<Where>, Error>
    where
        T: GenericConnection,
        Where: Whereable<Self>,
        P: Into<Params>,
        Self: Sized
, { ... } fn find<T, Find>(conn: &mut T, id: u64) -> Result<Option<Find>, Error>
    where
        T: GenericConnection,
        Find: Findable<Self>,
        Self: Sized
, { ... } fn insert<T, Ins>(conn: &mut T, obj: Ins) -> Result<u64, Error>
    where
        T: GenericConnection,
        Ins: Insertable<Self>,
        Self: Sized
, { ... } fn update<T, Up>(conn: &mut T, obj: Up) -> Result<(), Error>
    where
        T: GenericConnection,
        Up: Updatable<Self>,
        Self: Sized
, { ... } fn delete<T, Del>(conn: &mut T, obj: Del) -> Result<(), Error>
    where
        T: GenericConnection,
        Del: Deletable<Self>,
        Self: Sized
, { ... } }

Provided Methods

Implementors