mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Change VTabCursor::filter signature
This commit is contained in:
parent
59ad638875
commit
0a19cbd16a
@ -174,8 +174,7 @@ impl VTabCursor<CSVTab> for CSVTabCursor {
|
||||
fn filter(&mut self,
|
||||
_idx_num: libc::c_int,
|
||||
_idx_str: *const libc::c_char,
|
||||
_argc: libc::c_int,
|
||||
_argv: *mut *mut ffi::sqlite3_value)
|
||||
_args: &mut[*mut ffi::sqlite3_value])
|
||||
-> Result<()> {
|
||||
{
|
||||
let offset_first_row = self.vtab().offset_first_row;
|
||||
|
@ -103,8 +103,7 @@ impl VTabCursor<IntArrayVTab> for IntArrayVTabCursor {
|
||||
fn filter(&mut self,
|
||||
_idx_num: libc::c_int,
|
||||
_idx_str: *const libc::c_char,
|
||||
_argc: libc::c_int,
|
||||
_argv: *mut *mut ffi::sqlite3_value)
|
||||
_args: &mut[*mut ffi::sqlite3_value])
|
||||
-> Result<()> {
|
||||
self.i = 0;
|
||||
Ok(())
|
||||
|
@ -60,8 +60,7 @@ pub trait VTabCursor<V: VTab<Self>>: Sized {
|
||||
fn filter(&mut self,
|
||||
idx_num: libc::c_int,
|
||||
idx_str: *const libc::c_char,
|
||||
argc: libc::c_int,
|
||||
argv: *mut *mut ffi::sqlite3_value)
|
||||
args: &mut[*mut ffi::sqlite3_value])
|
||||
-> Result<()>;
|
||||
/// Advance cursor to the next row of a result set initiated by `filter`.
|
||||
fn next(&mut self) -> Result<()>;
|
||||
@ -259,9 +258,11 @@ unsafe extern "C" fn $filter(cursor: *mut ffi::sqlite3_vtab_cursor,
|
||||
argc: libc::c_int,
|
||||
argv: *mut *mut ffi::sqlite3_value)
|
||||
-> libc::c_int {
|
||||
use std::slice;
|
||||
use vtab::cursor_error;
|
||||
let mut args = slice::from_raw_parts_mut(argv, argc as usize);
|
||||
let cr = cursor as *mut $cursor;
|
||||
cursor_error(cursor, (*cr).filter(idx_num, idx_str, argc, argv))
|
||||
cursor_error(cursor, (*cr).filter(idx_num, idx_str, &mut args))
|
||||
}
|
||||
unsafe extern "C" fn $next(cursor: *mut ffi::sqlite3_vtab_cursor) -> libc::c_int {
|
||||
use vtab::cursor_error;
|
||||
|
Loading…
Reference in New Issue
Block a user