[][src]Struct c3p0_pool_mysql::json::C3p0JsonMysql

pub struct C3p0JsonMysql<DATA, CODEC: JsonCodec<DATA>> where
    DATA: Clone + Serialize + DeserializeOwned
{ /* fields omitted */ }

Methods

impl<DATA, CODEC: JsonCodec<DATA>> C3p0JsonMysql<DATA, CODEC> where
    DATA: Clone + Serialize + DeserializeOwned
[src]

pub fn fetch_one_with_sql(
    &self,
    conn: &MysqlConnection,
    sql: &str,
    params: &[&dyn ToValue]
) -> Result<Option<Model<DATA>>, C3p0Error>
[src]

Allows the execution of a custom sql query and returns the first entry in the result set. For this to work, the sql query:

  • must be a SELECT
  • must declare the ID, VERSION and DATA fields in this exact order

pub fn fetch_all_with_sql(
    &self,
    conn: &MysqlConnection,
    sql: &str,
    params: &[&dyn ToValue]
) -> Result<Vec<Model<DATA>>, C3p0Error>
[src]

Allows the execution of a custom sql query and returns all the entries in the result set. For this to work, the sql query:

  • must be a SELECT
  • must declare the ID, VERSION and DATA fields in this exact order

Trait Implementations

impl<DATA: Clone, CODEC: Clone + JsonCodec<DATA>> Clone for C3p0JsonMysql<DATA, CODEC> where
    DATA: Clone + Serialize + DeserializeOwned
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<DATA, CODEC: JsonCodec<DATA>> C3p0Json<DATA, CODEC> for C3p0JsonMysql<DATA, CODEC> where
    DATA: Clone + Serialize + DeserializeOwned
[src]

type CONNECTION = MysqlConnection

Auto Trait Implementations

impl<DATA, CODEC> Unpin for C3p0JsonMysql<DATA, CODEC> where
    CODEC: Unpin,
    DATA: Unpin

impl<DATA, CODEC> Send for C3p0JsonMysql<DATA, CODEC> where
    CODEC: Send,
    DATA: Send

impl<DATA, CODEC> Sync for C3p0JsonMysql<DATA, CODEC> where
    CODEC: Sync,
    DATA: Sync

impl<DATA, CODEC> RefUnwindSafe for C3p0JsonMysql<DATA, CODEC> where
    CODEC: RefUnwindSafe,
    DATA: RefUnwindSafe

impl<DATA, CODEC> UnwindSafe for C3p0JsonMysql<DATA, CODEC> where
    CODEC: UnwindSafe,
    DATA: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self