Move State closer to Statement

This commit is contained in:
Ivan Ukhov 2015-06-19 11:34:03 -04:00
parent cf80303a1d
commit d05c9e5d85

View File

@ -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.
///