pub trait ToParam: Sealed {
// Required method
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<K, V> ToParam for (K, V)
Used to bind named parameters. Sets the parameter with the name at self.0 to the value at
self.1.
impl<K, V> ToParam for (K, V)
Used to bind named parameters. Sets the parameter with the name at self.0 to the value at
self.1.
Source§impl<T> ToParam for Option<T>where
T: ToParam,
Sets the parameter to the contained value or NULL.
impl<T> ToParam for Option<T>where
T: ToParam,
Sets the parameter to the contained value or NULL.