mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Move State closer to Statement
This commit is contained in:
parent
cf80303a1d
commit
d05c9e5d85
@ -10,6 +10,13 @@ pub struct Statement<'l> {
|
||||
phantom: PhantomData<(ffi::sqlite3_stmt, &'l ffi::sqlite3)>,
|
||||
}
|
||||
|
||||
/// A state of a prepared statement.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum State {
|
||||
Done,
|
||||
Row,
|
||||
}
|
||||
|
||||
/// A parameter of a prepared statement.
|
||||
pub trait Parameter {
|
||||
/// Bind the parameter at a specific location.
|
||||
@ -26,13 +33,6 @@ pub trait Value {
|
||||
fn read(&Statement, usize) -> Result<Self>;
|
||||
}
|
||||
|
||||
/// A state of a prepared statement.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum State {
|
||||
Done,
|
||||
Row,
|
||||
}
|
||||
|
||||
impl<'l> Statement<'l> {
|
||||
/// Bind the parameter at a specific location.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user