Struct KvdbSqliteStatements

Source
pub struct KvdbSqliteStatements {
    pub stmts_main_table: KvdbSqliteStatementsPerTable,
    pub stmts_bytes_key_table: KvdbSqliteStatementsPerTable,
}

Fields§

§stmts_main_table: KvdbSqliteStatementsPerTable§stmts_bytes_key_table: KvdbSqliteStatementsPerTable

When numbered key is turned off, the bytes_key_table is the same as the main table.

Implementations§

Source§

impl KvdbSqliteStatements

Source

pub const BYTES_KEY_TABLE_SUFFIX: &'static str = "_bytes_key"

Source

pub const CREATE_TABLE_BLOB_KV_STATEMENT_TMPL: &'static str = "CREATE TABLE IF NOT EXISTS {table_name} ( key BLOB PRIMARY KEY {comma_value_columns_def} ) WITHOUT ROWID"

Source

pub const CREATE_TABLE_NUMBER_KV_STATEMENT_TMPL: &'static str = "CREATE TABLE IF NOT EXISTS {table_name} ( key INTEGER PRIMARY KEY {comma_value_columns_def} )"

Source

pub const DELETE_STATEMENT: &'static str = "DELETE FROM {table_name} where key = :key"

Source

pub const DROP_TABLE_STATEMENT: &'static str = "DROP TABLE IF EXISTS {table_name}"

Source

pub const GET_STATEMENT_TMPL: &'static str = "SELECT {value_columns} FROM {table_name} WHERE key = :key"

Source

pub const PUT_STATEMENT_TMPL: &'static str = "INSERT OR REPLACE INTO {table_name} VALUES (:key {comma_value_columns_to_bind})"

Source

pub const RANGE_EXCL_SELECT_STATEMENT: &'static str = "SELECT key {comma_value_columns} FROM {table_name} \ WHERE key > :lower_bound_excl AND key < :upper_bound_excl ORDER BY key ASC"

Source

pub const RANGE_SELECT_STATEMENT: &'static str = "SELECT key {comma_value_columns} FROM {table_name} \ WHERE key >= :lower_bound_incl AND key < :upper_bound_excl ORDER BY key ASC"

Source

pub const RANGE_SELECT_STATEMENT_TILL_END: &'static str = "SELECT key {comma_value_columns} FROM {table_name} \ WHERE key >= :lower_bound_incl ORDER BY key ASC"

Source

pub const SELECT_TBL_NAME: &'static str = "SELECT tbl_name FROM sqlite_master WHERE tbl_name = \"{table_name}\" AND type = \"table\""

Source

pub const VACUUM: &'static str = "vacuum"

Source

pub fn make_statements( value_column_names: &[&str], value_column_types: &[&str], main_table_name: &str, with_number_key_table: bool, ) -> Result<Self>

Trait Implementations§

Source§

impl Clone for KvdbSqliteStatements

Source§

fn clone(&self) -> KvdbSqliteStatements

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> ElementSatisfy<ElementNoConstrain> for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V