[−][src]Struct c3p0_pool_sqlite::json::C3p0JsonSqlite
Methods
impl<DATA, CODEC: JsonCodec<DATA>> C3p0JsonSqlite<DATA, CODEC> where
DATA: Clone + Serialize + DeserializeOwned,
[src]
DATA: Clone + Serialize + DeserializeOwned,
pub fn to_model(&self, row: &Row) -> Result<Model<DATA>, Box<dyn Error>>
[src]
pub fn fetch_one_with_sql(
&self,
conn: &SqliteConnection,
sql: &str,
params: &[&dyn ToSql]
) -> Result<Option<Model<DATA>>, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
sql: &str,
params: &[&dyn ToSql]
) -> Result<Option<Model<DATA>>, C3p0Error>
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: &SqliteConnection,
sql: &str,
params: &[&dyn ToSql]
) -> Result<Vec<Model<DATA>>, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
sql: &str,
params: &[&dyn ToSql]
) -> Result<Vec<Model<DATA>>, C3p0Error>
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 C3p0JsonSqlite<DATA, CODEC> where
DATA: Clone + Serialize + DeserializeOwned,
[src]
DATA: Clone + Serialize + DeserializeOwned,
fn clone(&self) -> C3p0JsonSqlite<DATA, CODEC>
[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 C3p0JsonSqlite<DATA, CODEC> where
DATA: Clone + Serialize + DeserializeOwned,
[src]
DATA: Clone + Serialize + DeserializeOwned,
type CONNECTION = SqliteConnection
fn codec(&self) -> &CODEC
[src]
fn queries(&self) -> &Queries
[src]
fn create_table_if_not_exists(
&self,
conn: &SqliteConnection
) -> Result<(), C3p0Error>
[src]
&self,
conn: &SqliteConnection
) -> Result<(), C3p0Error>
fn drop_table_if_exists(&self, conn: &SqliteConnection) -> Result<(), C3p0Error>
[src]
fn count_all(&self, conn: &SqliteConnection) -> Result<i64, C3p0Error>
[src]
fn exists_by_id<'a, ID: Into<&'a IdType>>(
&self,
conn: &SqliteConnection,
id: ID
) -> Result<bool, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
id: ID
) -> Result<bool, C3p0Error>
fn fetch_all(
&self,
conn: &SqliteConnection
) -> Result<Vec<Model<DATA>>, C3p0Error>
[src]
&self,
conn: &SqliteConnection
) -> Result<Vec<Model<DATA>>, C3p0Error>
fn fetch_one_by_id<'a, ID: Into<&'a IdType>>(
&self,
conn: &SqliteConnection,
id: ID
) -> Result<Option<Model<DATA>>, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
id: ID
) -> Result<Option<Model<DATA>>, C3p0Error>
fn delete(
&self,
conn: &SqliteConnection,
obj: &Model<DATA>
) -> Result<u64, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
obj: &Model<DATA>
) -> Result<u64, C3p0Error>
fn delete_all(&self, conn: &SqliteConnection) -> Result<u64, C3p0Error>
[src]
fn delete_by_id<'a, ID: Into<&'a IdType>>(
&self,
conn: &SqliteConnection,
id: ID
) -> Result<u64, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
id: ID
) -> Result<u64, C3p0Error>
fn save(
&self,
conn: &SqliteConnection,
obj: NewModel<DATA>
) -> Result<Model<DATA>, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
obj: NewModel<DATA>
) -> Result<Model<DATA>, C3p0Error>
fn update(
&self,
conn: &SqliteConnection,
obj: Model<DATA>
) -> Result<Model<DATA>, C3p0Error>
[src]
&self,
conn: &SqliteConnection,
obj: Model<DATA>
) -> Result<Model<DATA>, C3p0Error>
Auto Trait Implementations
impl<DATA, CODEC> Send for C3p0JsonSqlite<DATA, CODEC> where
CODEC: Send,
DATA: Send,
CODEC: Send,
DATA: Send,
impl<DATA, CODEC> Unpin for C3p0JsonSqlite<DATA, CODEC> where
CODEC: Unpin,
DATA: Unpin,
CODEC: Unpin,
DATA: Unpin,
impl<DATA, CODEC> Sync for C3p0JsonSqlite<DATA, CODEC> where
CODEC: Sync,
DATA: Sync,
CODEC: Sync,
DATA: Sync,
impl<DATA, CODEC> UnwindSafe for C3p0JsonSqlite<DATA, CODEC> where
CODEC: UnwindSafe,
DATA: UnwindSafe,
CODEC: UnwindSafe,
DATA: UnwindSafe,
impl<DATA, CODEC> RefUnwindSafe for C3p0JsonSqlite<DATA, CODEC> where
CODEC: RefUnwindSafe,
DATA: RefUnwindSafe,
CODEC: RefUnwindSafe,
DATA: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,