mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-13 11:12:19 +08:00
Make connect/create return a tuple
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
use std::default::Default;
|
||||
use std::os::raw::{c_char, c_int, c_void};
|
||||
|
||||
use error::error_from_sqlite_code;
|
||||
use ffi;
|
||||
use types::Type;
|
||||
use vtab::{self, Context, IndexInfo, Module, VTab, VTabCursor, Values};
|
||||
@@ -45,15 +46,18 @@ impl Module for Series {
|
||||
self.0
|
||||
}
|
||||
|
||||
fn connect(db: &mut ffi::sqlite3, _aux: Option<&()>, _args: &[&[u8]]) -> Result<SeriesTab> {
|
||||
fn connect(
|
||||
_: &mut ffi::sqlite3,
|
||||
_aux: Option<&()>,
|
||||
_args: &[&[u8]],
|
||||
) -> Result<(String, SeriesTab)> {
|
||||
let vtab = SeriesTab {
|
||||
base: Default::default(),
|
||||
};
|
||||
try!(Series::declare_vtab(
|
||||
db,
|
||||
"CREATE TABLE x(value,start hidden,stop hidden,step hidden)"
|
||||
));
|
||||
Ok(vtab)
|
||||
Ok((
|
||||
"CREATE TABLE x(value,start hidden,stop hidden,step hidden)".to_owned(),
|
||||
vtab,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user