[−][src]Struct push::storage::Store
Fields
db: Connection
Implementations
impl PushDb
[src]
pub fn with_connection(db: Connection) -> Result<Self>
[src]
pub fn open(path: impl AsRef<Path>) -> Result<Self>
[src]
pub fn open_in_memory() -> Result<Self>
[src]
pub fn normalize_uuid(uuid: &str) -> String
[src]
Normalize UUID values to undashed, lowercase.
pub fn uuid_to_dashed(uuid: &str) -> Result<String>
[src]
Dash UUID strings.
Trait Implementations
impl ConnExt for PushDb
[src]
fn conn(&self) -> &Connection
[src]
fn set_pragma<T>(
&self,
pragma_name: &str,
pragma_value: T
) -> Result<&Self, Error> where
T: ToSql,
[src]
&self,
pragma_name: &str,
pragma_value: T
) -> Result<&Self, Error> where
T: ToSql,
fn prepare_maybe_cached(
&'conn self,
sql: &str,
cache: bool
) -> Result<MaybeCached<'conn>, Error>
[src]
&'conn self,
sql: &str,
cache: bool
) -> Result<MaybeCached<'conn>, Error>
fn execute_all(&self, stmts: &[&str]) -> Result<(), Error>
[src]
fn execute_cached<P>(&self, sql: &str, params: P) -> Result<usize, Error> where
P: IntoIterator,
<P as IntoIterator>::Item: ToSql,
[src]
P: IntoIterator,
<P as IntoIterator>::Item: ToSql,
fn execute_named_cached(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)]
) -> Result<usize, Error>
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)]
) -> Result<usize, Error>
fn query_one<T>(&self, sql: &str) -> Result<T, Error> where
T: FromSql,
[src]
T: FromSql,
fn try_query_one<T>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
cache: bool
) -> Result<Option<T>, Error> where
T: FromSql,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
cache: bool
) -> Result<Option<T>, Error> where
T: FromSql,
fn query_row_and_then_named<T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F,
cache: bool
) -> Result<T, E> where
E: From<Error>,
F: FnOnce(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F,
cache: bool
) -> Result<T, E> where
E: From<Error>,
F: FnOnce(&Row<'_>) -> Result<T, E>,
fn query_rows_and_then_named<T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Vec<T>, E> where
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Vec<T>, E> where
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
fn query_rows_and_then_named_cached<T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Vec<T>, E> where
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Vec<T>, E> where
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
fn query_rows_into<Coll, T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Coll, E> where
Coll: FromIterator<T>,
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Coll, E> where
Coll: FromIterator<T>,
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
fn query_rows_into_cached<Coll, T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Coll, E> where
Coll: FromIterator<T>,
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F
) -> Result<Coll, E> where
Coll: FromIterator<T>,
E: From<Error>,
F: FnMut(&Row<'_>) -> Result<T, E>,
fn try_query_row<T, E, F>(
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F,
cache: bool
) -> Result<Option<T>, E> where
E: From<Error>,
F: FnOnce(&Row<'_>) -> Result<T, E>,
[src]
&self,
sql: &str,
params: &[(&str, &dyn ToSql)],
mapper: F,
cache: bool
) -> Result<Option<T>, E> where
E: From<Error>,
F: FnOnce(&Row<'_>) -> Result<T, E>,
fn unchecked_transaction(&self) -> Result<UncheckedTransaction<'_>, Error>
[src]
fn unchecked_transaction_imm(&self) -> Result<UncheckedTransaction<'_>, Error>
[src]
impl Deref for PushDb
[src]
impl Storage for PushDb
[src]
fn get_record(&self, uaid: &str, chid: &str) -> Result<Option<PushRecord>>
[src]
fn get_record_by_chid(&self, chid: &str) -> Result<Option<PushRecord>>
[src]
fn put_record(&self, record: &PushRecord) -> Result<bool>
[src]
fn delete_record(&self, uaid: &str, chid: &str) -> Result<bool>
[src]
fn delete_all_records(&self, uaid: &str) -> Result<()>
[src]
fn get_channel_list(&self, uaid: &str) -> Result<Vec<String>>
[src]
fn update_endpoint(
&self,
uaid: &str,
channel_id: &str,
endpoint: &str
) -> Result<bool>
[src]
&self,
uaid: &str,
channel_id: &str,
endpoint: &str
) -> Result<bool>
fn update_native_id(&self, uaid: &str, native_id: &str) -> Result<bool>
[src]
fn get_meta(&self, key: &str) -> Result<Option<String>>
[src]
fn set_meta(&self, key: &str, value: &str) -> Result<()>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PushDb
impl Send for PushDb
impl !Sync for PushDb
impl Unpin for PushDb
impl !UnwindSafe for PushDb
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,