Merge remote-tracking branch 'upstream/master' into modern_vtab

# Conflicts:
#	src/vtab/mod.rs
This commit is contained in:
gwenn
2022-09-02 20:33:21 +02:00
19 changed files with 3048 additions and 8275 deletions

View File

@@ -187,7 +187,6 @@ pub fn eponymous_only_module<'vtab, T: VTab<'vtab>>() -> &'static Module<'vtab,
/// Virtual table configuration options
#[repr(i32)]
#[non_exhaustive]
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // 3.7.7
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum VTabConfig {
/// Equivalent to SQLITE_VTAB_CONSTRAINT_SUPPORT
@@ -203,8 +202,6 @@ pub struct VTabConnection(*mut ffi::sqlite3);
impl VTabConnection {
/// Configure various facets of the virtual table interface
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // 3.7.7
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
pub fn config(&mut self, config: VTabConfig) -> Result<()> {
crate::error::check(unsafe { ffi::sqlite3_vtab_config(self.0, config as c_int) })
}
@@ -369,7 +366,6 @@ impl From<u8> for IndexConstraintOp {
}
}
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // 3.9.0
bitflags::bitflags! {
/// Virtual table scan flags
/// See [Function Flags](https://sqlite.org/c3ref/c_index_scan_unique.html) for details.
@@ -474,8 +470,6 @@ impl IndexInfo {
}
/// Estimated number of rows returned.
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // SQLite >= 3.8.2
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
#[inline]
pub fn set_estimated_rows(&mut self, estimated_rows: i64) {
unsafe {
@@ -484,16 +478,12 @@ impl IndexInfo {
}
/// Mask of SQLITE_INDEX_SCAN_* flags.
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // SQLite >= 3.9.0
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
#[inline]
pub fn set_idx_flags(&mut self, flags: IndexFlags) {
unsafe { (*self.0).idxFlags = flags.bits() };
}
/// Mask of columns used by statement
#[cfg(any(feature = "modern_sqlite", feature = "buildtime_bindgen"))] // SQLite >= 3.10.0
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
#[inline]
pub fn col_used(&self) -> u64 {
unsafe { (*self.0).colUsed }