Trait sqlite3_ext::query::ToParam
source · pub trait ToParam: Sealed {
fn bind_param(self, stmt: &mut Statement, position: i32) -> Result<()>;
}Expand description
Trait for types which can be passed into SQLite queries as parameters.
Required Methods§
sourcefn bind_param(self, stmt: &mut Statement, position: i32) -> Result<()>
fn bind_param(self, stmt: &mut Statement, position: i32) -> Result<()>
Bind this value to the prepared Statement at the provided position.
Note: the position of a named parameter can be obtained using Statement::parameter_position.
Implementations on Foreign Types§
source§impl<T> ToParam for Option<T>where
T: ToParam,
impl<T> ToParam for Option<T>where
T: ToParam,
Sets the parameter to the contained value or NULL.
source§impl<K, V> ToParam for (K, V)where
K: Into<Vec<u8>>,
V: ToParam,
impl<K, V> ToParam for (K, V)where
K: Into<Vec<u8>>,
V: ToParam,
Used to bind named parameters. Sets the parameter with the name at self.0 to the value at
self.1.