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> 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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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