Merge remote-tracking branch 'jgallagher/master' into vtab

This commit is contained in:
gwenn
2017-09-11 19:45:22 +02:00
29 changed files with 576 additions and 430 deletions

View File

@@ -56,13 +56,13 @@ pub trait VTab<C: VTabCursor<Self>>: Sized {
bitflags! {
#[doc = "Index constraint operator."]
#[repr(C)]
pub flags IndexConstraintOp: ::std::os::raw::c_uchar {
const SQLITE_INDEX_CONSTRAINT_EQ = 2,
const SQLITE_INDEX_CONSTRAINT_GT = 4,
const SQLITE_INDEX_CONSTRAINT_LE = 8,
const SQLITE_INDEX_CONSTRAINT_LT = 16,
const SQLITE_INDEX_CONSTRAINT_GE = 32,
const SQLITE_INDEX_CONSTRAINT_MATCH = 64,
pub struct IndexConstraintOp: ::std::os::raw::c_uchar {
const SQLITE_INDEX_CONSTRAINT_EQ = 2;
const SQLITE_INDEX_CONSTRAINT_GT = 4;
const SQLITE_INDEX_CONSTRAINT_LE = 8;
const SQLITE_INDEX_CONSTRAINT_LT = 16;
const SQLITE_INDEX_CONSTRAINT_GE = 32;
const SQLITE_INDEX_CONSTRAINT_MATCH = 64;
}
}
@@ -96,7 +96,7 @@ impl IndexInfo {
/// if `argv_index` > 0, constraint is part of argv to xFilter
pub fn constraint_usage(&mut self, constraint_idx: usize) -> IndexConstraintUsage {
let mut constraint_usages = unsafe {
let constraint_usages = unsafe {
slice::from_raw_parts_mut((*self.0).aConstraintUsage, (*self.0).nConstraint as usize)
};
IndexConstraintUsage(&mut constraint_usages[constraint_idx])

View File

@@ -37,17 +37,17 @@ const SERIES_COLUMN_STEP: c_int = 3;
bitflags! {
#[repr(C)]
flags QueryPlanFlags: ::std::os::raw::c_int {
struct QueryPlanFlags: ::std::os::raw::c_int {
// start = $value -- constraint exists
const START = 1,
const START = 1;
// stop = $value -- constraint exists
const STOP = 2,
const STOP = 2;
// step = $value -- constraint exists
const STEP = 4,
const STEP = 4;
// output in descending order
const DESC = 8,
const DESC = 8;
// Both start and stop
const BOTH = START.bits | STOP.bits,
const BOTH = START.bits | STOP.bits;
}
}