Trait c3p0::C3p0Json[][src]

pub trait C3p0Json<Data, Codec>: Clone + Send + Sync where
    Data: Clone + Serialize + DeserializeOwned + Send,
    Codec: JsonCodec<Data>, 
{ type Conn;
Show 16 methods fn codec(&self) -> &Codec;
fn create_table_if_not_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn
    ) -> Pin<Box<dyn Future<Output = Result<(), C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn drop_table_if_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        cascade: bool
    ) -> Pin<Box<dyn Future<Output = Result<(), C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn count_all<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn
    ) -> Pin<Box<dyn Future<Output = Result<u64, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn exists_by_id<'a, 'life0, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID
    ) -> Pin<Box<dyn Future<Output = Result<bool, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn fetch_all<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Model<Data>, Global>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn fetch_all_for_update<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        for_update: &'life2 ForUpdate
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Model<Data>, Global>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn fetch_one_optional_by_id<'a, 'life0, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID
    ) -> Pin<Box<dyn Future<Output = Result<Option<Model<Data>>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn fetch_one_optional_by_id_for_update<'a, 'life0, 'life1, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID,
        for_update: &'life1 ForUpdate
    ) -> Pin<Box<dyn Future<Output = Result<Option<Model<Data>>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn fetch_one_by_id<'a, 'life0, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID
    ) -> Pin<Box<dyn Future<Output = Result<Model<Data>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn fetch_one_by_id_for_update<'a, 'life0, 'life1, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID,
        for_update: &'life1 ForUpdate
    ) -> Pin<Box<dyn Future<Output = Result<Model<Data>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        obj: Model<Data>
    ) -> Pin<Box<dyn Future<Output = Result<Model<Data>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_all<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn
    ) -> Pin<Box<dyn Future<Output = Result<u64, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_by_id<'a, 'life0, 'async_trait, ID>(
        &'a self,
        conn: &'life0 mut Self::Conn,
        id: ID
    ) -> Pin<Box<dyn Future<Output = Result<u64, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        ID: Into<&'a i64> + Send + 'async_trait,
        Self: 'async_trait
;
fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        obj: NewModel<Data>
    ) -> Pin<Box<dyn Future<Output = Result<Model<Data>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn update<'life0, 'life1, 'async_trait>(
        &'life0 self,
        conn: &'life1 mut Self::Conn,
        obj: Model<Data>
    ) -> Pin<Box<dyn Future<Output = Result<Model<Data>, C3p0Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
}

Associated Types

Required methods

Implementors