mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Remove Table
associated type in VTabCursor trait
This commit is contained in:
parent
b82a155429
commit
ce9d325ba0
@ -128,8 +128,6 @@ impl ArrayTabCursor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl VTabCursor for ArrayTabCursor {
|
impl VTabCursor for ArrayTabCursor {
|
||||||
type Table = ArrayTab;
|
|
||||||
|
|
||||||
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
|
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
|
||||||
if idx_num > 0 {
|
if idx_num > 0 {
|
||||||
self.ptr = try!(args.get_array(0));
|
self.ptr = try!(args.get_array(0));
|
||||||
|
@ -283,8 +283,6 @@ impl CSVTabCursor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl VTabCursor for CSVTabCursor {
|
impl VTabCursor for CSVTabCursor {
|
||||||
type Table = CSVTab;
|
|
||||||
|
|
||||||
// Only a full table scan is supported. So `filter` simply rewinds to
|
// Only a full table scan is supported. So `filter` simply rewinds to
|
||||||
// the beginning.
|
// the beginning.
|
||||||
fn filter(&mut self, _idx_num: c_int, _idx_str: Option<&str>, _args: &Values) -> Result<()> {
|
fn filter(&mut self, _idx_num: c_int, _idx_str: Option<&str>, _args: &Values) -> Result<()> {
|
||||||
|
@ -397,7 +397,6 @@ impl<'a> OrderBy<'a> {
|
|||||||
///
|
///
|
||||||
/// (See [SQLite doc](https://sqlite.org/c3ref/vtab_cursor.html))
|
/// (See [SQLite doc](https://sqlite.org/c3ref/vtab_cursor.html))
|
||||||
pub trait VTabCursor: Sized {
|
pub trait VTabCursor: Sized {
|
||||||
type Table: VTab;
|
|
||||||
/// Begin a search of a virtual table.
|
/// Begin a search of a virtual table.
|
||||||
/// (See [SQLite doc](https://sqlite.org/vtab.html#the_xfilter_method))
|
/// (See [SQLite doc](https://sqlite.org/vtab.html#the_xfilter_method))
|
||||||
fn filter(&mut self, idx_num: c_int, idx_str: Option<&str>, args: &Values) -> Result<()>;
|
fn filter(&mut self, idx_num: c_int, idx_str: Option<&str>, args: &Values) -> Result<()>;
|
||||||
|
@ -184,8 +184,6 @@ impl SeriesTabCursor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl VTabCursor for SeriesTabCursor {
|
impl VTabCursor for SeriesTabCursor {
|
||||||
type Table = SeriesTab;
|
|
||||||
|
|
||||||
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
|
fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values) -> Result<()> {
|
||||||
let idx_num = QueryPlanFlags::from_bits_truncate(idx_num);
|
let idx_num = QueryPlanFlags::from_bits_truncate(idx_num);
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
|
@ -56,8 +56,6 @@ fn test_dummy_module() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl VTabCursor for DummyTabCursor {
|
impl VTabCursor for DummyTabCursor {
|
||||||
type Table = DummyTab;
|
|
||||||
|
|
||||||
fn filter(
|
fn filter(
|
||||||
&mut self,
|
&mut self,
|
||||||
_idx_num: c_int,
|
_idx_num: c_int,
|
||||||
|
Loading…
Reference in New Issue
Block a user