From 6766d6a6cd220f2898f5a5ee2fe708e7f904f1e6 Mon Sep 17 00:00:00 2001 From: gwenn Date: Mon, 22 Aug 2022 18:32:55 +0200 Subject: [PATCH] Remove `old_sqlite` feature And associated bindgen_3.6.8.rs --- .github/workflows/main.yml | 2 - Cargo.toml | 2 - README.md | 3 +- libsqlite3-sys/Cargo.toml | 1 - .../bindgen-bindings/bindgen_3.6.8.rs | 1835 ----------------- libsqlite3-sys/build.rs | 7 +- src/functions.rs | 9 - src/hooks.rs | 2 - src/inner_connection.rs | 3 - src/lib.rs | 23 - src/raw_statement.rs | 4 +- src/statement.rs | 15 +- src/util/mod.rs | 2 - src/util/sqlite_string.rs | 5 +- src/vtab/mod.rs | 10 - 15 files changed, 5 insertions(+), 1918 deletions(-) delete mode 100644 libsqlite3-sys/bindgen-bindings/bindgen_3.6.8.rs diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1bf190..5e406f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -170,8 +170,6 @@ jobs: - run: cargo clippy --all-targets --workspace --features bundled -- -D warnings # Clippy with all non-conflicting features - run: cargo clippy --all-targets --workspace --features 'bundled-full session buildtime_bindgen' -- -D warnings - # Clippy with SQLite 3.6.8 - - run: cargo clippy --all-targets --workspace --no-default-features --features 'old_sqlite' -- -D warnings # Ensure patch is formatted. fmt: diff --git a/Cargo.toml b/Cargo.toml index 58bb542..614583d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,8 +69,6 @@ series = ["vtab"] extra_check = [] # ]3.14.0, last] modern_sqlite = ["libsqlite3-sys/bundled_bindings"] -# [3.6.8, 3.14.0[ -old_sqlite = ["libsqlite3-sys/min_sqlite_version_3_6_8"] in_gecko = ["modern_sqlite", "libsqlite3-sys/in_gecko"] bundled-windows = ["libsqlite3-sys/bundled-windows"] # Build bundled sqlite with -fsanitize=address diff --git a/README.md b/README.md index ec3abad..9bca206 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ fn main() -> Result<()> { ### Supported SQLite Versions -The base `rusqlite` package supports SQLite version 3.6.8 or newer. If you need +The base `rusqlite` package supports SQLite version 3.14.0 or newer. If you need support for older versions, please file an issue. Some cargo features require a newer SQLite version; see details below. @@ -191,7 +191,6 @@ minimum SQLite version that supports your chosen features. If you are using `libsqlite3-sys` directly, you can use the same features to choose which pregenerated bindings are chosen: -* `min_sqlite_version_3_6_8` - SQLite 3.6.8 bindings * `min_sqlite_version_3_7_16` - SQLite 3.7.16 bindings * `min_sqlite_version_3_14_0` - SQLite 3.14.0 bindings (this is the default) diff --git a/libsqlite3-sys/Cargo.toml b/libsqlite3-sys/Cargo.toml index 483a7c3..e400647 100644 --- a/libsqlite3-sys/Cargo.toml +++ b/libsqlite3-sys/Cargo.toml @@ -19,7 +19,6 @@ bundled-sqlcipher = ["bundled"] bundled-sqlcipher-vendored-openssl = ["bundled-sqlcipher", "openssl-sys/vendored"] buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"] sqlcipher = [] -min_sqlite_version_3_6_8 = ["pkg-config", "vcpkg"] min_sqlite_version_3_7_16 = ["pkg-config", "vcpkg"] min_sqlite_version_3_14_0 = ["pkg-config", "vcpkg"] # Bundle only the bindings file. Note that this does nothing if diff --git a/libsqlite3-sys/bindgen-bindings/bindgen_3.6.8.rs b/libsqlite3-sys/bindgen-bindings/bindgen_3.6.8.rs deleted file mode 100644 index 3cd6b15..0000000 --- a/libsqlite3-sys/bindgen-bindings/bindgen_3.6.8.rs +++ /dev/null @@ -1,1835 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub const __GNUC_VA_LIST: i32 = 1; -pub const SQLITE_VERSION: &'static [u8; 6usize] = b"3.6.8\x00"; -pub const SQLITE_VERSION_NUMBER: i32 = 3006008; -pub const SQLITE_OK: i32 = 0; -pub const SQLITE_ERROR: i32 = 1; -pub const SQLITE_INTERNAL: i32 = 2; -pub const SQLITE_PERM: i32 = 3; -pub const SQLITE_ABORT: i32 = 4; -pub const SQLITE_BUSY: i32 = 5; -pub const SQLITE_LOCKED: i32 = 6; -pub const SQLITE_NOMEM: i32 = 7; -pub const SQLITE_READONLY: i32 = 8; -pub const SQLITE_INTERRUPT: i32 = 9; -pub const SQLITE_IOERR: i32 = 10; -pub const SQLITE_CORRUPT: i32 = 11; -pub const SQLITE_NOTFOUND: i32 = 12; -pub const SQLITE_FULL: i32 = 13; -pub const SQLITE_CANTOPEN: i32 = 14; -pub const SQLITE_PROTOCOL: i32 = 15; -pub const SQLITE_EMPTY: i32 = 16; -pub const SQLITE_SCHEMA: i32 = 17; -pub const SQLITE_TOOBIG: i32 = 18; -pub const SQLITE_CONSTRAINT: i32 = 19; -pub const SQLITE_MISMATCH: i32 = 20; -pub const SQLITE_MISUSE: i32 = 21; -pub const SQLITE_NOLFS: i32 = 22; -pub const SQLITE_AUTH: i32 = 23; -pub const SQLITE_FORMAT: i32 = 24; -pub const SQLITE_RANGE: i32 = 25; -pub const SQLITE_NOTADB: i32 = 26; -pub const SQLITE_ROW: i32 = 100; -pub const SQLITE_DONE: i32 = 101; -pub const SQLITE_IOERR_READ: i32 = 266; -pub const SQLITE_IOERR_SHORT_READ: i32 = 522; -pub const SQLITE_IOERR_WRITE: i32 = 778; -pub const SQLITE_IOERR_FSYNC: i32 = 1034; -pub const SQLITE_IOERR_DIR_FSYNC: i32 = 1290; -pub const SQLITE_IOERR_TRUNCATE: i32 = 1546; -pub const SQLITE_IOERR_FSTAT: i32 = 1802; -pub const SQLITE_IOERR_UNLOCK: i32 = 2058; -pub const SQLITE_IOERR_RDLOCK: i32 = 2314; -pub const SQLITE_IOERR_DELETE: i32 = 2570; -pub const SQLITE_IOERR_BLOCKED: i32 = 2826; -pub const SQLITE_IOERR_NOMEM: i32 = 3082; -pub const SQLITE_IOERR_ACCESS: i32 = 3338; -pub const SQLITE_IOERR_CHECKRESERVEDLOCK: i32 = 3594; -pub const SQLITE_IOERR_LOCK: i32 = 3850; -pub const SQLITE_IOERR_CLOSE: i32 = 4106; -pub const SQLITE_IOERR_DIR_CLOSE: i32 = 4362; -pub const SQLITE_OPEN_READONLY: i32 = 1; -pub const SQLITE_OPEN_READWRITE: i32 = 2; -pub const SQLITE_OPEN_CREATE: i32 = 4; -pub const SQLITE_OPEN_DELETEONCLOSE: i32 = 8; -pub const SQLITE_OPEN_EXCLUSIVE: i32 = 16; -pub const SQLITE_OPEN_MAIN_DB: i32 = 256; -pub const SQLITE_OPEN_TEMP_DB: i32 = 512; -pub const SQLITE_OPEN_TRANSIENT_DB: i32 = 1024; -pub const SQLITE_OPEN_MAIN_JOURNAL: i32 = 2048; -pub const SQLITE_OPEN_TEMP_JOURNAL: i32 = 4096; -pub const SQLITE_OPEN_SUBJOURNAL: i32 = 8192; -pub const SQLITE_OPEN_MASTER_JOURNAL: i32 = 16384; -pub const SQLITE_OPEN_NOMUTEX: i32 = 32768; -pub const SQLITE_OPEN_FULLMUTEX: i32 = 65536; -pub const SQLITE_IOCAP_ATOMIC: i32 = 1; -pub const SQLITE_IOCAP_ATOMIC512: i32 = 2; -pub const SQLITE_IOCAP_ATOMIC1K: i32 = 4; -pub const SQLITE_IOCAP_ATOMIC2K: i32 = 8; -pub const SQLITE_IOCAP_ATOMIC4K: i32 = 16; -pub const SQLITE_IOCAP_ATOMIC8K: i32 = 32; -pub const SQLITE_IOCAP_ATOMIC16K: i32 = 64; -pub const SQLITE_IOCAP_ATOMIC32K: i32 = 128; -pub const SQLITE_IOCAP_ATOMIC64K: i32 = 256; -pub const SQLITE_IOCAP_SAFE_APPEND: i32 = 512; -pub const SQLITE_IOCAP_SEQUENTIAL: i32 = 1024; -pub const SQLITE_LOCK_NONE: i32 = 0; -pub const SQLITE_LOCK_SHARED: i32 = 1; -pub const SQLITE_LOCK_RESERVED: i32 = 2; -pub const SQLITE_LOCK_PENDING: i32 = 3; -pub const SQLITE_LOCK_EXCLUSIVE: i32 = 4; -pub const SQLITE_SYNC_NORMAL: i32 = 2; -pub const SQLITE_SYNC_FULL: i32 = 3; -pub const SQLITE_SYNC_DATAONLY: i32 = 16; -pub const SQLITE_FCNTL_LOCKSTATE: i32 = 1; -pub const SQLITE_GET_LOCKPROXYFILE: i32 = 2; -pub const SQLITE_SET_LOCKPROXYFILE: i32 = 3; -pub const SQLITE_LAST_ERRNO: i32 = 4; -pub const SQLITE_ACCESS_EXISTS: i32 = 0; -pub const SQLITE_ACCESS_READWRITE: i32 = 1; -pub const SQLITE_ACCESS_READ: i32 = 2; -pub const SQLITE_CONFIG_SINGLETHREAD: i32 = 1; -pub const SQLITE_CONFIG_MULTITHREAD: i32 = 2; -pub const SQLITE_CONFIG_SERIALIZED: i32 = 3; -pub const SQLITE_CONFIG_MALLOC: i32 = 4; -pub const SQLITE_CONFIG_GETMALLOC: i32 = 5; -pub const SQLITE_CONFIG_SCRATCH: i32 = 6; -pub const SQLITE_CONFIG_PAGECACHE: i32 = 7; -pub const SQLITE_CONFIG_HEAP: i32 = 8; -pub const SQLITE_CONFIG_MEMSTATUS: i32 = 9; -pub const SQLITE_CONFIG_MUTEX: i32 = 10; -pub const SQLITE_CONFIG_GETMUTEX: i32 = 11; -pub const SQLITE_CONFIG_LOOKASIDE: i32 = 13; -pub const SQLITE_CONFIG_PCACHE: i32 = 14; -pub const SQLITE_CONFIG_GETPCACHE: i32 = 15; -pub const SQLITE_DBCONFIG_LOOKASIDE: i32 = 1001; -pub const SQLITE_DENY: i32 = 1; -pub const SQLITE_IGNORE: i32 = 2; -pub const SQLITE_CREATE_INDEX: i32 = 1; -pub const SQLITE_CREATE_TABLE: i32 = 2; -pub const SQLITE_CREATE_TEMP_INDEX: i32 = 3; -pub const SQLITE_CREATE_TEMP_TABLE: i32 = 4; -pub const SQLITE_CREATE_TEMP_TRIGGER: i32 = 5; -pub const SQLITE_CREATE_TEMP_VIEW: i32 = 6; -pub const SQLITE_CREATE_TRIGGER: i32 = 7; -pub const SQLITE_CREATE_VIEW: i32 = 8; -pub const SQLITE_DELETE: i32 = 9; -pub const SQLITE_DROP_INDEX: i32 = 10; -pub const SQLITE_DROP_TABLE: i32 = 11; -pub const SQLITE_DROP_TEMP_INDEX: i32 = 12; -pub const SQLITE_DROP_TEMP_TABLE: i32 = 13; -pub const SQLITE_DROP_TEMP_TRIGGER: i32 = 14; -pub const SQLITE_DROP_TEMP_VIEW: i32 = 15; -pub const SQLITE_DROP_TRIGGER: i32 = 16; -pub const SQLITE_DROP_VIEW: i32 = 17; -pub const SQLITE_INSERT: i32 = 18; -pub const SQLITE_PRAGMA: i32 = 19; -pub const SQLITE_READ: i32 = 20; -pub const SQLITE_SELECT: i32 = 21; -pub const SQLITE_TRANSACTION: i32 = 22; -pub const SQLITE_UPDATE: i32 = 23; -pub const SQLITE_ATTACH: i32 = 24; -pub const SQLITE_DETACH: i32 = 25; -pub const SQLITE_ALTER_TABLE: i32 = 26; -pub const SQLITE_REINDEX: i32 = 27; -pub const SQLITE_ANALYZE: i32 = 28; -pub const SQLITE_CREATE_VTABLE: i32 = 29; -pub const SQLITE_DROP_VTABLE: i32 = 30; -pub const SQLITE_FUNCTION: i32 = 31; -pub const SQLITE_SAVEPOINT: i32 = 32; -pub const SQLITE_COPY: i32 = 0; -pub const SQLITE_LIMIT_LENGTH: i32 = 0; -pub const SQLITE_LIMIT_SQL_LENGTH: i32 = 1; -pub const SQLITE_LIMIT_COLUMN: i32 = 2; -pub const SQLITE_LIMIT_EXPR_DEPTH: i32 = 3; -pub const SQLITE_LIMIT_COMPOUND_SELECT: i32 = 4; -pub const SQLITE_LIMIT_VDBE_OP: i32 = 5; -pub const SQLITE_LIMIT_FUNCTION_ARG: i32 = 6; -pub const SQLITE_LIMIT_ATTACHED: i32 = 7; -pub const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: i32 = 8; -pub const SQLITE_LIMIT_VARIABLE_NUMBER: i32 = 9; -pub const SQLITE_INTEGER: i32 = 1; -pub const SQLITE_FLOAT: i32 = 2; -pub const SQLITE_BLOB: i32 = 4; -pub const SQLITE_NULL: i32 = 5; -pub const SQLITE_TEXT: i32 = 3; -pub const SQLITE3_TEXT: i32 = 3; -pub const SQLITE_UTF8: i32 = 1; -pub const SQLITE_UTF16LE: i32 = 2; -pub const SQLITE_UTF16BE: i32 = 3; -pub const SQLITE_UTF16: i32 = 4; -pub const SQLITE_ANY: i32 = 5; -pub const SQLITE_UTF16_ALIGNED: i32 = 8; -pub const SQLITE_INDEX_CONSTRAINT_EQ: i32 = 2; -pub const SQLITE_INDEX_CONSTRAINT_GT: i32 = 4; -pub const SQLITE_INDEX_CONSTRAINT_LE: i32 = 8; -pub const SQLITE_INDEX_CONSTRAINT_LT: i32 = 16; -pub const SQLITE_INDEX_CONSTRAINT_GE: i32 = 32; -pub const SQLITE_INDEX_CONSTRAINT_MATCH: i32 = 64; -pub const SQLITE_MUTEX_FAST: i32 = 0; -pub const SQLITE_MUTEX_RECURSIVE: i32 = 1; -pub const SQLITE_MUTEX_STATIC_MASTER: i32 = 2; -pub const SQLITE_MUTEX_STATIC_MEM: i32 = 3; -pub const SQLITE_MUTEX_STATIC_MEM2: i32 = 4; -pub const SQLITE_MUTEX_STATIC_PRNG: i32 = 5; -pub const SQLITE_MUTEX_STATIC_LRU: i32 = 6; -pub const SQLITE_MUTEX_STATIC_LRU2: i32 = 7; -pub const SQLITE_TESTCTRL_PRNG_SAVE: i32 = 5; -pub const SQLITE_TESTCTRL_PRNG_RESTORE: i32 = 6; -pub const SQLITE_TESTCTRL_PRNG_RESET: i32 = 7; -pub const SQLITE_TESTCTRL_BITVEC_TEST: i32 = 8; -pub const SQLITE_TESTCTRL_FAULT_INSTALL: i32 = 9; -pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: i32 = 10; -pub const SQLITE_STATUS_MEMORY_USED: i32 = 0; -pub const SQLITE_STATUS_PAGECACHE_USED: i32 = 1; -pub const SQLITE_STATUS_PAGECACHE_OVERFLOW: i32 = 2; -pub const SQLITE_STATUS_SCRATCH_USED: i32 = 3; -pub const SQLITE_STATUS_SCRATCH_OVERFLOW: i32 = 4; -pub const SQLITE_STATUS_MALLOC_SIZE: i32 = 5; -pub const SQLITE_STATUS_PARSER_STACK: i32 = 6; -pub const SQLITE_STATUS_PAGECACHE_SIZE: i32 = 7; -pub const SQLITE_STATUS_SCRATCH_SIZE: i32 = 8; -pub const SQLITE_DBSTATUS_LOOKASIDE_USED: i32 = 0; -pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: i32 = 1; -pub const SQLITE_STMTSTATUS_SORT: i32 = 2; -pub type va_list = __builtin_va_list; -pub type __gnuc_va_list = __builtin_va_list; -extern "C" { - #[link_name = "sqlite3_version"] - pub static mut sqlite3_version: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn sqlite3_libversion() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_threadsafe() -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3([u8; 0]); -pub type sqlite_int64 = ::std::os::raw::c_longlong; -pub type sqlite_uint64 = ::std::os::raw::c_ulonglong; -pub type sqlite3_int64 = sqlite_int64; -pub type sqlite3_uint64 = sqlite_uint64; -extern "C" { - pub fn sqlite3_close(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -pub type sqlite3_callback = - ::std::option::Option ::std::os::raw::c_int>; -extern "C" { - pub fn sqlite3_exec(arg1: *mut sqlite3, - sql: *const ::std::os::raw::c_char, - callback: - ::std::option::Option - ::std::os::raw::c_int>, - arg2: *mut ::std::os::raw::c_void, - errmsg: *mut *mut ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_file { - pub pMethods: *const sqlite3_file_sqlite3_io_methods, -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_file_sqlite3_io_methods { - pub iVersion: ::std::os::raw::c_int, - pub xClose: ::std::option::Option ::std::os::raw::c_int>, - pub xRead: ::std::option::Option ::std::os::raw::c_int>, - pub xWrite: ::std::option::Option ::std::os::raw::c_int>, - pub xTruncate: ::std::option::Option ::std::os::raw::c_int>, - pub xSync: ::std::option::Option ::std::os::raw::c_int>, - pub xFileSize: ::std::option::Option ::std::os::raw::c_int>, - pub xLock: ::std::option::Option ::std::os::raw::c_int>, - pub xUnlock: ::std::option::Option ::std::os::raw::c_int>, - pub xCheckReservedLock: ::std::option::Option - ::std::os::raw::c_int>, - pub xFileControl: ::std::option::Option ::std::os::raw::c_int>, - pub xSectorSize: ::std::option::Option ::std::os::raw::c_int>, - pub xDeviceCharacteristics: ::std::option::Option - ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_file_sqlite3_io_methods() { - assert_eq!(::std::mem::size_of::() , - 104usize); - assert_eq!(::std::mem::align_of::() , - 8usize); -} -impl Clone for sqlite3_file_sqlite3_io_methods { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_sqlite3_file() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_file { - fn clone(&self) -> Self { *self } -} -pub type sqlite3_io_methods = sqlite3_file_sqlite3_io_methods; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mutex([u8; 0]); -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_vfs { - pub iVersion: ::std::os::raw::c_int, - pub szOsFile: ::std::os::raw::c_int, - pub mxPathname: ::std::os::raw::c_int, - pub pNext: *mut sqlite3_vfs, - pub zName: *const ::std::os::raw::c_char, - pub pAppData: *mut ::std::os::raw::c_void, - pub xOpen: ::std::option::Option ::std::os::raw::c_int>, - pub xDelete: ::std::option::Option ::std::os::raw::c_int>, - pub xAccess: ::std::option::Option ::std::os::raw::c_int>, - pub xFullPathname: ::std::option::Option ::std::os::raw::c_int>, - pub xDlOpen: ::std::option::Option *mut ::std::os::raw::c_void>, - pub xDlError: ::std::option::Option, - pub xDlSym: ::std::option::Option - ::std::option::Option>, - pub xDlClose: ::std::option::Option, - pub xRandomness: ::std::option::Option ::std::os::raw::c_int>, - pub xSleep: ::std::option::Option ::std::os::raw::c_int>, - pub xCurrentTime: ::std::option::Option ::std::os::raw::c_int>, - pub xGetLastError: ::std::option::Option ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_vfs() { - assert_eq!(::std::mem::size_of::() , 136usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_vfs { - fn clone(&self) -> Self { *self } -} -extern "C" { - pub fn sqlite3_initialize() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_shutdown() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_init() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_end() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_config(arg1: ::std::os::raw::c_int, ...) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_config(arg1: *mut sqlite3, - op: ::std::os::raw::c_int, ...) - -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_mem_methods { - pub xMalloc: ::std::option::Option *mut ::std::os::raw::c_void>, - pub xFree: ::std::option::Option, - pub xRealloc: ::std::option::Option *mut ::std::os::raw::c_void>, - pub xSize: ::std::option::Option ::std::os::raw::c_int>, - pub xRoundup: ::std::option::Option ::std::os::raw::c_int>, - pub xInit: ::std::option::Option ::std::os::raw::c_int>, - pub xShutdown: ::std::option::Option, - pub pAppData: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_sqlite3_mem_methods() { - assert_eq!(::std::mem::size_of::() , 64usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_mem_methods { - fn clone(&self) -> Self { *self } -} -extern "C" { - pub fn sqlite3_extended_result_codes(arg1: *mut sqlite3, - onoff: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_last_insert_rowid(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_total_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_interrupt(arg1: *mut sqlite3); -} -extern "C" { - pub fn sqlite3_complete(sql: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_complete16(sql: *const ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_handler(arg1: *mut sqlite3, - arg2: - ::std::option::Option - ::std::os::raw::c_int>, - arg3: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_timeout(arg1: *mut sqlite3, ms: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_get_table(db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - pazResult: *mut *mut *mut ::std::os::raw::c_char, - pnRow: *mut ::std::os::raw::c_int, - pnColumn: *mut ::std::os::raw::c_int, - pzErrmsg: *mut *mut ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_free_table(result: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sqlite3_mprintf(arg1: *const ::std::os::raw::c_char, ...) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_vmprintf(arg1: *const ::std::os::raw::c_char, - arg2: *mut __va_list_tag) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_snprintf(arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, ...) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_malloc(arg1: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_realloc(arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_memory_used() -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_memory_highwater(resetFlag: ::std::os::raw::c_int) - -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_randomness(N: ::std::os::raw::c_int, - P: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_set_authorizer(arg1: *mut sqlite3, - xAuth: - ::std::option::Option - ::std::os::raw::c_int>, - pUserData: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_trace(arg1: *mut sqlite3, - xTrace: - ::std::option::Option, - arg2: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_profile(arg1: *mut sqlite3, - xProfile: - ::std::option::Option, - arg2: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_progress_handler(arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: - ::std::option::Option - ::std::os::raw::c_int>, - arg4: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_open(filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open16(filename: *const ::std::os::raw::c_void, - ppDb: *mut *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open_v2(filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3, - flags: ::std::os::raw::c_int, - zVfs: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_errcode(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_extended_errcode(db: *mut sqlite3) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_errmsg(arg1: *mut sqlite3) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_errmsg16(arg1: *mut sqlite3) - -> *const ::std::os::raw::c_void; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_stmt([u8; 0]); -extern "C" { - pub fn sqlite3_limit(arg1: *mut sqlite3, id: ::std::os::raw::c_int, - newVal: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare(db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare_v2(db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16(db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16_v2(db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sql(pStmt: *mut sqlite3_stmt) - -> *const ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Mem([u8; 0]); -pub type sqlite3_value = Mem; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_context([u8; 0]); -extern "C" { - pub fn sqlite3_bind_blob(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - arg4: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_double(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, arg3: f64) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int64(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: sqlite3_int64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_null(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - arg4: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text16(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_value(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_zeroblob(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - n: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_count(arg1: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_name(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_bind_parameter_index(arg1: *mut sqlite3_stmt, - zName: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_clear_bindings(arg1: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_count(pStmt: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_name(arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_name16(arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_database_name(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_database_name16(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_table_name(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_table_name16(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_origin_name(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_origin_name16(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_decltype(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_decltype16(arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_step(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_data_count(pStmt: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_blob(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_bytes(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_bytes16(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_double(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn sqlite3_column_int(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_int64(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_column_text(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_column_text16(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_type(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_value(arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int) - -> *mut sqlite3_value; -} -extern "C" { - pub fn sqlite3_finalize(pStmt: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function(db: *mut sqlite3, - zFunctionName: - *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: - ::std::option::Option, - xStep: - ::std::option::Option, - xFinal: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function16(db: *mut sqlite3, - zFunctionName: - *const ::std::os::raw::c_void, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: - ::std::option::Option, - xStep: - ::std::option::Option, - xFinal: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_aggregate_count(arg1: *mut sqlite3_context) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_transfer_bindings(arg1: *mut sqlite3_stmt, - arg2: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_global_recover() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_thread_cleanup(); -} -extern "C" { - pub fn sqlite3_memory_alarm(arg1: - ::std::option::Option, - arg2: *mut ::std::os::raw::c_void, - arg3: sqlite3_int64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_blob(arg1: *mut sqlite3_value) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_bytes(arg1: *mut sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_bytes16(arg1: *mut sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_double(arg1: *mut sqlite3_value) -> f64; -} -extern "C" { - pub fn sqlite3_value_int(arg1: *mut sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_int64(arg1: *mut sqlite3_value) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_value_text(arg1: *mut sqlite3_value) - -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_value_text16(arg1: *mut sqlite3_value) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16le(arg1: *mut sqlite3_value) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16be(arg1: *mut sqlite3_value) - -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_type(arg1: *mut sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_numeric_type(arg1: *mut sqlite3_value) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_aggregate_context(arg1: *mut sqlite3_context, - nBytes: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_user_data(arg1: *mut sqlite3_context) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_context_db_handle(arg1: *mut sqlite3_context) - -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_get_auxdata(arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_set_auxdata(arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - arg3: - ::std::option::Option); -} -pub type sqlite3_destructor_type = - ::std::option::Option; -extern "C" { - pub fn sqlite3_result_blob(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: - ::std::option::Option); -} -extern "C" { - pub fn sqlite3_result_double(arg1: *mut sqlite3_context, arg2: f64); -} -extern "C" { - pub fn sqlite3_result_error(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_error16(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_error_toobig(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_nomem(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_code(arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int(arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int64(arg1: *mut sqlite3_context, - arg2: sqlite3_int64); -} -extern "C" { - pub fn sqlite3_result_null(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_text(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: - ::std::option::Option); -} -extern "C" { - pub fn sqlite3_result_text16(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: - ::std::option::Option); -} -extern "C" { - pub fn sqlite3_result_text16le(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: - ::std::option::Option); -} -extern "C" { - pub fn sqlite3_result_text16be(arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: - ::std::option::Option); -} -extern "C" { - pub fn sqlite3_result_value(arg1: *mut sqlite3_context, - arg2: *mut sqlite3_value); -} -extern "C" { - pub fn sqlite3_result_zeroblob(arg1: *mut sqlite3_context, - n: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_create_collation(arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - xCompare: - ::std::option::Option - ::std::os::raw::c_int>) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation_v2(arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - xCompare: - ::std::option::Option - ::std::os::raw::c_int>, - xDestroy: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation16(arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_void, - eTextRep: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - xCompare: - ::std::option::Option - ::std::os::raw::c_int>) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed(arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed16(arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_key(db: *mut sqlite3, pKey: *const ::std::os::raw::c_void, - nKey: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_rekey(db: *mut sqlite3, - pKey: *const ::std::os::raw::c_void, - nKey: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sleep(arg1: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "sqlite3_temp_directory"] - pub static mut sqlite3_temp_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_get_autocommit(arg1: *mut sqlite3) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_handle(arg1: *mut sqlite3_stmt) -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_next_stmt(pDb: *mut sqlite3, pStmt: *mut sqlite3_stmt) - -> *mut sqlite3_stmt; -} -extern "C" { - pub fn sqlite3_commit_hook(arg1: *mut sqlite3, - arg2: - ::std::option::Option - ::std::os::raw::c_int>, - arg3: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_rollback_hook(arg1: *mut sqlite3, - arg2: - ::std::option::Option, - arg3: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_update_hook(arg1: *mut sqlite3, - arg2: - ::std::option::Option, - arg3: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_enable_shared_cache(arg1: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_release_memory(arg1: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_soft_heap_limit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_table_column_metadata(db: *mut sqlite3, - zDbName: - *const ::std::os::raw::c_char, - zTableName: - *const ::std::os::raw::c_char, - zColumnName: - *const ::std::os::raw::c_char, - pzDataType: - *mut *const ::std::os::raw::c_char, - pzCollSeq: - *mut *const ::std::os::raw::c_char, - pNotNull: *mut ::std::os::raw::c_int, - pPrimaryKey: - *mut ::std::os::raw::c_int, - pAutoinc: *mut ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_load_extension(db: *mut sqlite3, - zFile: *const ::std::os::raw::c_char, - zProc: *const ::std::os::raw::c_char, - pzErrMsg: *mut *mut ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_enable_load_extension(db: *mut sqlite3, - onoff: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_auto_extension(xEntryPoint: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset_auto_extension(); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_vtab { - pub pModule: *const sqlite3_module, - pub nRef: ::std::os::raw::c_int, - pub zErrMsg: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_sqlite3_vtab() { - assert_eq!(::std::mem::size_of::() , 24usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_vtab { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_index_info { - pub nConstraint: ::std::os::raw::c_int, - pub aConstraint: *mut sqlite3_index_info_sqlite3_index_constraint, - pub nOrderBy: ::std::os::raw::c_int, - pub aOrderBy: *mut sqlite3_index_info_sqlite3_index_orderby, - pub aConstraintUsage: *mut sqlite3_index_info_sqlite3_index_constraint_usage, - pub idxNum: ::std::os::raw::c_int, - pub idxStr: *mut ::std::os::raw::c_char, - pub needToFreeIdxStr: ::std::os::raw::c_int, - pub orderByConsumed: ::std::os::raw::c_int, - pub estimatedCost: f64, -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_index_info_sqlite3_index_constraint { - pub iColumn: ::std::os::raw::c_int, - pub op: ::std::os::raw::c_uchar, - pub usable: ::std::os::raw::c_uchar, - pub iTermOffset: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_constraint() { - assert_eq!(::std::mem::size_of::() - , 12usize); - assert_eq!(::std::mem::align_of::() - , 4usize); -} -impl Clone for sqlite3_index_info_sqlite3_index_constraint { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_index_info_sqlite3_index_orderby { - pub iColumn: ::std::os::raw::c_int, - pub desc: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_orderby() { - assert_eq!(::std::mem::size_of::() - , 8usize); - assert_eq!(::std::mem::align_of::() - , 4usize); -} -impl Clone for sqlite3_index_info_sqlite3_index_orderby { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_index_info_sqlite3_index_constraint_usage { - pub argvIndex: ::std::os::raw::c_int, - pub omit: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_constraint_usage() { - assert_eq!(::std::mem::size_of::() - , 8usize); - assert_eq!(::std::mem::align_of::() - , 4usize); -} -impl Clone for sqlite3_index_info_sqlite3_index_constraint_usage { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_sqlite3_index_info() { - assert_eq!(::std::mem::size_of::() , 72usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_index_info { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_vtab_cursor { - pub pVtab: *mut sqlite3_vtab, -} -#[test] -fn bindgen_test_layout_sqlite3_vtab_cursor() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_vtab_cursor { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_module { - pub iVersion: ::std::os::raw::c_int, - pub xCreate: ::std::option::Option ::std::os::raw::c_int>, - pub xConnect: ::std::option::Option ::std::os::raw::c_int>, - pub xBestIndex: ::std::option::Option ::std::os::raw::c_int>, - pub xDisconnect: ::std::option::Option ::std::os::raw::c_int>, - pub xDestroy: ::std::option::Option ::std::os::raw::c_int>, - pub xOpen: ::std::option::Option ::std::os::raw::c_int>, - pub xClose: ::std::option::Option ::std::os::raw::c_int>, - pub xFilter: ::std::option::Option ::std::os::raw::c_int>, - pub xNext: ::std::option::Option ::std::os::raw::c_int>, - pub xEof: ::std::option::Option ::std::os::raw::c_int>, - pub xColumn: ::std::option::Option ::std::os::raw::c_int>, - pub xRowid: ::std::option::Option ::std::os::raw::c_int>, - pub xUpdate: ::std::option::Option ::std::os::raw::c_int>, - pub xBegin: ::std::option::Option ::std::os::raw::c_int>, - pub xSync: ::std::option::Option ::std::os::raw::c_int>, - pub xCommit: ::std::option::Option ::std::os::raw::c_int>, - pub xRollback: ::std::option::Option ::std::os::raw::c_int>, - pub xFindFunction: ::std::option::Option, - ppArg: - *mut *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int>, - pub xRename: ::std::option::Option ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_module() { - assert_eq!(::std::mem::size_of::() , 160usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_module { - fn clone(&self) -> Self { *self } -} -extern "C" { - pub fn sqlite3_create_module(db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - arg1: *const sqlite3_module, - arg2: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_module_v2(db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - arg1: *const sqlite3_module, - arg2: *mut ::std::os::raw::c_void, - xDestroy: - ::std::option::Option) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_declare_vtab(arg1: *mut sqlite3, - zCreateTable: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_overload_function(arg1: *mut sqlite3, - zFuncName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_blob([u8; 0]); -extern "C" { - pub fn sqlite3_blob_open(arg1: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - zTable: *const ::std::os::raw::c_char, - zColumn: *const ::std::os::raw::c_char, - iRow: sqlite3_int64, - flags: ::std::os::raw::c_int, - ppBlob: *mut *mut sqlite3_blob) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_close(arg1: *mut sqlite3_blob) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_bytes(arg1: *mut sqlite3_blob) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_read(arg1: *mut sqlite3_blob, - Z: *mut ::std::os::raw::c_void, - N: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_write(arg1: *mut sqlite3_blob, - z: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_find(zVfsName: *const ::std::os::raw::c_char) - -> *mut sqlite3_vfs; -} -extern "C" { - pub fn sqlite3_vfs_register(arg1: *mut sqlite3_vfs, - makeDflt: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_unregister(arg1: *mut sqlite3_vfs) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_alloc(arg1: ::std::os::raw::c_int) - -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_mutex_free(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_enter(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_try(arg1: *mut sqlite3_mutex) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_leave(arg1: *mut sqlite3_mutex); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_mutex_methods { - pub xMutexInit: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexEnd: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexAlloc: ::std::option::Option *mut sqlite3_mutex>, - pub xMutexFree: ::std::option::Option, - pub xMutexEnter: ::std::option::Option, - pub xMutexTry: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexLeave: ::std::option::Option, - pub xMutexHeld: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexNotheld: ::std::option::Option ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_mutex_methods() { - assert_eq!(::std::mem::size_of::() , 72usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_mutex_methods { - fn clone(&self) -> Self { *self } -} -extern "C" { - pub fn sqlite3_mutex_held(arg1: *mut sqlite3_mutex) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_notheld(arg1: *mut sqlite3_mutex) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_mutex(arg1: *mut sqlite3) -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_file_control(arg1: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - op: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_test_control(op: ::std::os::raw::c_int, ...) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_status(op: ::std::os::raw::c_int, - pCurrent: *mut ::std::os::raw::c_int, - pHighwater: *mut ::std::os::raw::c_int, - resetFlag: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_status(arg1: *mut sqlite3, op: ::std::os::raw::c_int, - pCur: *mut ::std::os::raw::c_int, - pHiwtr: *mut ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_status(arg1: *mut sqlite3_stmt, - op: ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache([u8; 0]); -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_pcache_methods { - pub pArg: *mut ::std::os::raw::c_void, - pub xInit: ::std::option::Option ::std::os::raw::c_int>, - pub xShutdown: ::std::option::Option, - pub xCreate: ::std::option::Option *mut sqlite3_pcache>, - pub xCachesize: ::std::option::Option, - pub xPagecount: ::std::option::Option ::std::os::raw::c_int>, - pub xFetch: ::std::option::Option *mut ::std::os::raw::c_void>, - pub xUnpin: ::std::option::Option, - pub xRekey: ::std::option::Option, - pub xTruncate: ::std::option::Option, - pub xDestroy: ::std::option::Option, -} -#[test] -fn bindgen_test_layout_sqlite3_pcache_methods() { - assert_eq!(::std::mem::size_of::() , 88usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_pcache_methods { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct __va_list_tag { - pub gp_offset: ::std::os::raw::c_uint, - pub fp_offset: ::std::os::raw::c_uint, - pub overflow_arg_area: *mut ::std::os::raw::c_void, - pub reg_save_area: *mut ::std::os::raw::c_void, -} -impl Clone for __va_list_tag { - fn clone(&self) -> Self { *self } -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; - -pub const SQLITE_DETERMINISTIC: i32 = 2048; diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index 6b19a9d..07d1897 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -474,16 +474,11 @@ mod bindings { use std::path::Path; static PREBUILT_BINDGEN_PATHS: &[&str] = &[ - #[cfg(feature = "min_sqlite_version_3_6_8")] - "bindgen-bindings/bindgen_3.6.8.rs", #[cfg(feature = "min_sqlite_version_3_7_16")] "bindgen-bindings/bindgen_3.7.16.rs", #[cfg(any( feature = "min_sqlite_version_3_14_0", - not(any( - feature = "min_sqlite_version_3_7_16", - feature = "min_sqlite_version_3_6_8" - )) + not(any(feature = "min_sqlite_version_3_7_16",)) ))] "bindgen-bindings/bindgen_3.14.0.rs", ]; diff --git a/src/functions.rs b/src/functions.rs index c7c90e3..e45c60c 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -75,14 +75,9 @@ unsafe fn report_error(ctx: *mut sqlite3_context, err: &Error) { // an explicit feature check for that, and this doesn't really warrant one. // We'll use the extended code if we're on the bundled version (since it's // at least 3.17.0) and the normal constraint error code if not. - #[cfg(not(feature = "old_sqlite"))] fn constraint_error_code() -> i32 { ffi::SQLITE_CONSTRAINT_FUNCTION } - #[cfg(feature = "old_sqlite")] - fn constraint_error_code() -> i32 { - ffi::SQLITE_CONSTRAINT - } if let Error::SqliteFailure(ref err, ref s) = *err { ffi::sqlite3_result_error_code(ctx, err.extended_code); @@ -168,8 +163,6 @@ impl Context<'_> { /// /// Will panic if `idx` is greater than or equal to /// [`self.len()`](Context::len). - #[cfg(not(feature = "old_sqlite"))] // 3.9.0 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn get_subtype(&self, idx: usize) -> std::os::raw::c_uint { let arg = self.args[idx]; unsafe { ffi::sqlite3_value_subtype(arg) } @@ -249,8 +242,6 @@ impl Context<'_> { } /// Set the Subtype of an SQL function - #[cfg(not(feature = "old_sqlite"))] // 3.9.0 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn set_result_subtype(&self, sub_type: std::os::raw::c_uint) { unsafe { ffi::sqlite3_result_subtype(self.ctx, sub_type) }; } diff --git a/src/hooks.rs b/src/hooks.rs index 68563e5..86669dc 100644 --- a/src/hooks.rs +++ b/src/hooks.rs @@ -181,7 +181,6 @@ pub enum AuthAction<'c> { operation: TransactionOperation, savepoint_name: &'c str, }, - #[cfg(not(feature = "old_sqlite"))] Recursive, } @@ -285,7 +284,6 @@ impl<'c> AuthAction<'c> { operation: TransactionOperation::from_str(operation_str), savepoint_name, }, - #[cfg(not(feature = "old_sqlite"))] // 3.8.3 (ffi::SQLITE_RECURSIVE, ..) => Self::Recursive, (code, arg1, arg2) => Self::Unknown { code, arg1, arg2 }, } diff --git a/src/inner_connection.rs b/src/inner_connection.rs index ecbc305..7d629bc 100644 --- a/src/inner_connection.rs +++ b/src/inner_connection.rs @@ -295,7 +295,6 @@ impl InnerConnection { unsafe { ffi::sqlite3_get_autocommit(self.db()) != 0 } } - #[cfg(not(feature = "old_sqlite"))] // 3.8.6 pub fn is_busy(&self) -> bool { let db = self.db(); unsafe { @@ -310,7 +309,6 @@ impl InnerConnection { false } - #[cfg(not(feature = "old_sqlite"))] // 3.10.0 pub fn cache_flush(&mut self) -> Result<()> { crate::error::check(unsafe { ffi::sqlite3_db_cacheflush(self.db()) }) } @@ -319,7 +317,6 @@ impl InnerConnection { #[inline] fn remove_hooks(&mut self) {} - #[cfg(not(feature = "old_sqlite"))] // 3.7.11 pub fn db_readonly(&self, db_name: super::DatabaseName<'_>) -> Result { let name = db_name.as_cstring()?; let r = unsafe { ffi::sqlite3_db_readonly(self.db, name.as_ptr()) }; diff --git a/src/lib.rs b/src/lib.rs index a097977..1ccdf0e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -314,12 +314,6 @@ pub const TEMP_DB: DatabaseName<'static> = DatabaseName::Temp; // Currently DatabaseName is only used by the backup and blob mods, so hide // this (private) impl to avoid dead code warnings. -#[cfg(any( - feature = "backup", - feature = "blob", - feature = "session", - not(feature = "old_sqlite") -))] impl DatabaseName<'_> { #[inline] fn as_cstring(&self) -> Result { @@ -961,22 +955,16 @@ impl Connection { /// Determine if all associated prepared statements have been reset. #[inline] - #[cfg(not(feature = "old_sqlite"))] // 3.8.6 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn is_busy(&self) -> bool { self.db.borrow().is_busy() } /// Flush caches to disk mid-transaction - #[cfg(not(feature = "old_sqlite"))] // 3.10.0 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn cache_flush(&self) -> Result<()> { self.db.borrow_mut().cache_flush() } /// Determine if a database is read-only - #[cfg(not(feature = "old_sqlite"))] // 3.7.11 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn is_readonly(&self, db_name: DatabaseName<'_>) -> Result { self.db.borrow().db_readonly(db_name) } @@ -1176,7 +1164,6 @@ impl InterruptHandle { } } -#[cfg(not(feature = "old_sqlite"))] // 3.7.10 unsafe fn db_filename(db: *mut ffi::sqlite3) -> Option { let db_name = DatabaseName::Main.as_cstring().unwrap(); let db_filename = ffi::sqlite3_db_filename(db, db_name.as_ptr()); @@ -1186,10 +1173,6 @@ unsafe fn db_filename(db: *mut ffi::sqlite3) -> Option { CStr::from_ptr(db_filename).to_str().ok().map(PathBuf::from) } } -#[cfg(feature = "old_sqlite")] -unsafe fn db_filename(_: *mut ffi::sqlite3) -> Option { - None -} #[cfg(doctest)] doc_comment::doctest!("../README.md"); @@ -1664,7 +1647,6 @@ mod test { } #[test] - #[cfg(not(feature = "old_sqlite"))] fn test_is_busy() -> Result<()> { let db = Connection::open_in_memory()?; assert!(!db.is_busy()); @@ -1695,12 +1677,9 @@ mod test { fn test_notnull_constraint_error() -> Result<()> { // extended error codes for constraints were added in SQLite 3.7.16; if we're // running on our bundled version, we know the extended error code exists. - #[cfg(not(feature = "old_sqlite"))] fn check_extended_code(extended_code: c_int) { assert_eq!(extended_code, ffi::SQLITE_CONSTRAINT_NOTNULL); } - #[cfg(feature = "old_sqlite")] - fn check_extended_code(_extended_code: c_int) {} let db = Connection::open_in_memory()?; db.execute_batch("CREATE TABLE foo(x NOT NULL)")?; @@ -2109,14 +2088,12 @@ mod test { } #[test] - #[cfg(not(feature = "old_sqlite"))] fn test_cache_flush() -> Result<()> { let db = Connection::open_in_memory()?; db.cache_flush() } #[test] - #[cfg(not(feature = "old_sqlite"))] pub fn db_readonly() -> Result<()> { let db = Connection::open_in_memory()?; assert!(!db.is_readonly(MAIN_DB)?); diff --git a/src/raw_statement.rs b/src/raw_statement.rs index aecc0a4..1167082 100644 --- a/src/raw_statement.rs +++ b/src/raw_statement.rs @@ -1,7 +1,6 @@ use super::ffi; use super::StatementStatus; use crate::util::ParamIndexCache; -#[cfg(not(feature = "old_sqlite"))] use crate::util::SqliteMallocString; use std::ffi::CStr; use std::os::raw::c_int; @@ -196,14 +195,13 @@ impl RawStatement { } // does not work for PRAGMA + #[cfg(feature = "extra_check")] #[inline] - #[cfg(all(feature = "extra_check", not(feature = "old_sqlite")))] // 3.7.4 pub fn readonly(&self) -> bool { unsafe { ffi::sqlite3_stmt_readonly(self.ptr) != 0 } } #[inline] - #[cfg(not(feature = "old_sqlite"))] // 3.14.0 pub(crate) fn expanded_sql(&self) -> Option { unsafe { SqliteMallocString::from_raw(ffi::sqlite3_expanded_sql(self.ptr)) } } diff --git a/src/statement.rs b/src/statement.rs index 559cfdb..5e01c48 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -796,7 +796,7 @@ impl Statement<'_> { self.conn.decode_result(stmt.finalize()) } - #[cfg(all(not(feature = "old_sqlite"), feature = "extra_check"))] + #[cfg(feature = "extra_check")] #[inline] fn check_update(&self) -> Result<()> { // sqlite3_column_count works for DML but not for DDL (ie ALTER) @@ -806,16 +806,6 @@ impl Statement<'_> { Ok(()) } - #[cfg(all(feature = "old_sqlite", feature = "extra_check"))] - #[inline] - fn check_update(&self) -> Result<()> { - // sqlite3_column_count works for DML but not for DDL (ie ALTER) - if self.column_count() > 0 { - return Err(Error::ExecuteReturnedResults); - } - Ok(()) - } - #[cfg(not(feature = "extra_check"))] #[inline] #[allow(clippy::unnecessary_wraps)] @@ -825,8 +815,6 @@ impl Statement<'_> { /// Returns a string containing the SQL text of prepared statement with /// bound parameters expanded. - #[cfg(not(feature = "old_sqlite"))] - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] pub fn expanded_sql(&self) -> Option { self.stmt .expanded_sql() @@ -1407,7 +1395,6 @@ mod test { } #[test] - #[cfg(not(feature = "old_sqlite"))] fn test_expanded_sql() -> Result<()> { let db = Connection::open_in_memory()?; let stmt = db.prepare("SELECT ?")?; diff --git a/src/util/mod.rs b/src/util/mod.rs index 6ac195b..e81e3c0 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -5,7 +5,5 @@ pub(crate) use param_cache::ParamIndexCache; pub(crate) use small_cstr::SmallCString; // Doesn't use any modern features or vtab stuff, but is only used by them. -#[cfg(any(not(feature = "old_sqlite"), feature = "vtab"))] mod sqlite_string; -#[cfg(any(not(feature = "old_sqlite"), feature = "vtab"))] pub(crate) use sqlite_string::SqliteMallocString; diff --git a/src/util/sqlite_string.rs b/src/util/sqlite_string.rs index fe72c97..88df575 100644 --- a/src/util/sqlite_string.rs +++ b/src/util/sqlite_string.rs @@ -1,10 +1,7 @@ // This is used when either vtab or modern-sqlite is on. Different methods are // used in each feature. Avoid having to track this for each function. We will // still warn for anything that's not used by either, though. -#![cfg_attr( - not(all(feature = "vtab", not(feature = "old_sqlite"))), - allow(dead_code) -)] +#![cfg_attr(not(feature = "vtab"), allow(dead_code))] use crate::ffi; use std::marker::PhantomData; use std::os::raw::{c_char, c_int}; diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index 4d32e41..b1e7610 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -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(not(feature = "old_sqlite"))] // 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(not(feature = "old_sqlite"))] // 3.7.7 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_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 for IndexConstraintOp { } } -#[cfg(not(feature = "old_sqlite"))] // 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(not(feature = "old_sqlite"))] // SQLite >= 3.8.2 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_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(not(feature = "old_sqlite"))] // SQLite >= 3.9.0 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] #[inline] pub fn set_idx_flags(&mut self, flags: IndexFlags) { unsafe { (*self.0).idxFlags = flags.bits() }; } /// Mask of columns used by statement - #[cfg(not(feature = "old_sqlite"))] // SQLite >= 3.10.0 - #[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))] #[inline] pub fn col_used(&self) -> u64 { unsafe { (*self.0).colUsed }