use std::ops::Index;
use std::path::Path;
use {Result, Value};
pub trait Driver {
type Statement: Statement;
fn connect<T: AsRef<Path>>(T) -> Result<Self>;
fn execute<T: AsRef<str>>(&self, T) -> Result<()>;
fn prepare<T: AsRef<str>>(&self, T) -> Result<Self::Statement>;
}
pub trait Statement {
type Record: ?Sized + Index<usize, Output=Value>;
fn execute(&mut self, &[Value]) -> Result<()>;
fn next<'l>(&'l mut self) -> Result<Option<&'l Self::Record>>;
}
pub mod sqlite;
pub use self::sqlite::Driver as SQLite;