Trait OrmMySqlTrait

Source
pub trait OrmMySqlTrait {
    // Required methods
    async fn query<C>(
        comm: &mut C,
        where_sql: &str,
        limit: Option<usize>,
    ) -> IResult<Vec<Self>>
       where Self: Sized,
             C: Queryable + Send + Sync;
    async fn query_first<C>(
        comm: &mut C,
        where_sql: &str,
    ) -> IResult<Option<Self>>
       where Self: Sized,
             C: Queryable + Send + Sync;
    async fn insert<C>(self, comm: &mut C) -> IResult<i64>
       where Self: Sized,
             C: Queryable + Send + Sync;
    fn insert_sql() -> String
       where Self: Sized;
    async fn update<C>(self, comm: &mut C) -> IResult<i64>
       where Self: Sized,
             C: Queryable + Send + Sync;
    async fn delete<C>(&self, comm: &mut C) -> IResult<i64>
       where Self: Sized,
             C: Queryable + Send + Sync;
    async fn delete_where<C>(comm: &mut C, where_sql: &str) -> IResult<i64>
       where Self: Sized,
             C: Queryable + Send + Sync;
    fn delete_sql() -> String
       where Self: Sized;
    fn where_id(&self) -> impl Into<Value>
       where Self: Sized;
}

Required Methods§

Source

async fn query<C>( comm: &mut C, where_sql: &str, limit: Option<usize>, ) -> IResult<Vec<Self>>
where Self: Sized, C: Queryable + Send + Sync,

Source

async fn query_first<C>(comm: &mut C, where_sql: &str) -> IResult<Option<Self>>
where Self: Sized, C: Queryable + Send + Sync,

Source

async fn insert<C>(self, comm: &mut C) -> IResult<i64>
where Self: Sized, C: Queryable + Send + Sync,

Source

fn insert_sql() -> String
where Self: Sized,

Source

async fn update<C>(self, comm: &mut C) -> IResult<i64>
where Self: Sized, C: Queryable + Send + Sync,

Source

async fn delete<C>(&self, comm: &mut C) -> IResult<i64>
where Self: Sized, C: Queryable + Send + Sync,

Source

async fn delete_where<C>(comm: &mut C, where_sql: &str) -> IResult<i64>
where Self: Sized, C: Queryable + Send + Sync,

Source

fn delete_sql() -> String
where Self: Sized,

Source

fn where_id(&self) -> impl Into<Value>
where Self: Sized,

Implementors§