diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e406f9..e1bf190 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -170,6 +170,8 @@ 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 bd81d44..58bb542 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,14 +35,14 @@ members = ["libsqlite3-sys"] [features] load_extension = [] # hot-backup interface: 3.6.11 (2009-02-18) -backup = ["libsqlite3-sys/min_sqlite_version_3_6_23"] +backup = ["libsqlite3-sys/min_sqlite_version_3_7_16"] # sqlite3_blob_reopen: 3.7.4 -blob = ["libsqlite3-sys/min_sqlite_version_3_7_7"] +blob = ["libsqlite3-sys/min_sqlite_version_3_7_16"] collation = [] # sqlite3_create_function_v2: 3.7.3 (2010-10-08) -functions = ["libsqlite3-sys/min_sqlite_version_3_7_7"] +functions = ["libsqlite3-sys/min_sqlite_version_3_7_16"] # sqlite3_log: 3.6.23 (2010-03-09) -trace = ["libsqlite3-sys/min_sqlite_version_3_6_23"] +trace = ["libsqlite3-sys/min_sqlite_version_3_7_16"] # sqlite3_db_release_memory: 3.7.10 (2012-01-16) release_memory = ["libsqlite3-sys/min_sqlite_version_3_7_16"] bundled = ["libsqlite3-sys/bundled", "modern_sqlite"] @@ -55,7 +55,7 @@ i128_blob = [] sqlcipher = ["libsqlite3-sys/sqlcipher"] unlock_notify = ["libsqlite3-sys/unlock_notify"] # xSavepoint, xRelease and xRollbackTo: 3.7.7 (2011-06-23) -vtab = ["libsqlite3-sys/min_sqlite_version_3_7_7"] +vtab = ["libsqlite3-sys/min_sqlite_version_3_7_16"] csvtab = ["csv", "vtab"] # pointer passing interfaces: 3.20.0 array = ["vtab"] @@ -67,7 +67,10 @@ window = ["functions"] series = ["vtab"] # check for invalid query. 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 fdc2381..ec3abad 100644 --- a/README.md +++ b/README.md @@ -191,9 +191,9 @@ 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 (this is the default) -* `min_sqlite_version_3_6_23` - SQLite 3.6.23 bindings -* `min_sqlite_version_3_7_7` - SQLite 3.7.7 bindings +* `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) If you use any of the `bundled` features, you will get pregenerated bindings for the bundled version of SQLite/SQLCipher. If you need other specific pregenerated binding diff --git a/libsqlite3-sys/Cargo.toml b/libsqlite3-sys/Cargo.toml index e3ed05b..483a7c3 100644 --- a/libsqlite3-sys/Cargo.toml +++ b/libsqlite3-sys/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["sqlite", "sqlcipher", "ffi"] categories = ["external-ffi-bindings"] [features] -default = ["min_sqlite_version_3_6_8"] +default = ["min_sqlite_version_3_14_0"] bundled = ["cc", "bundled_bindings"] bundled-windows = ["cc", "bundled_bindings"] bundled-sqlcipher = ["bundled"] @@ -20,9 +20,8 @@ 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_6_23 = ["pkg-config", "vcpkg"] -min_sqlite_version_3_7_7 = ["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 # `buildtime_bindgen` is enabled. bundled_bindings = [] diff --git a/libsqlite3-sys/bindgen-bindings/bindgen_3.6.23.rs b/libsqlite3-sys/bindgen-bindings/bindgen_3.6.23.rs deleted file mode 100644 index 673b11d..0000000 --- a/libsqlite3-sys/bindgen-bindings/bindgen_3.6.23.rs +++ /dev/null @@ -1,1900 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub const __GNUC_VA_LIST: i32 = 1; -pub const SQLITE_VERSION: &'static [u8; 7usize] = b"3.6.23\x00"; -pub const SQLITE_VERSION_NUMBER: i32 = 3006023; -pub const SQLITE_SOURCE_ID: &'static [u8; 61usize] = - b"2010-03-09 19:31:43 4ae453ea7be69018d8c16eb8dabe05617397dc4d\x00"; -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_LOCKED_SHAREDCACHE: i32 = 262; -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_AUTOPROXY: i32 = 32; -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_OPEN_SHAREDCACHE: i32 = 131072; -pub const SQLITE_OPEN_PRIVATECACHE: i32 = 262144; -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_CONFIG_LOG: i32 = 16; -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_LIMIT_TRIGGER_DEPTH: i32 = 10; -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_OPEN: 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_FIRST: i32 = 5; -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_TESTCTRL_PENDING_BYTE: i32 = 11; -pub const SQLITE_TESTCTRL_ASSERT: i32 = 12; -pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13; -pub const SQLITE_TESTCTRL_RESERVE: i32 = 14; -pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15; -pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16; -pub const SQLITE_TESTCTRL_LAST: i32 = 16; -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_sourceid() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_used(zOptName: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_get(N: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -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_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, - p: *const sqlite3_module, - pClientData: *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, - p: *const sqlite3_module, - pClientData: *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, - zSQL: *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, Clone)] -pub struct sqlite3_backup([u8; 0]); -extern "C" { - pub fn sqlite3_backup_init(pDest: *mut sqlite3, - zDestName: *const ::std::os::raw::c_char, - pSource: *mut sqlite3, - zSourceName: *const ::std::os::raw::c_char) - -> *mut sqlite3_backup; -} -extern "C" { - pub fn sqlite3_backup_step(p: *mut sqlite3_backup, - nPage: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_unlock_notify(pBlocked: *mut sqlite3, - xNotify: - ::std::option::Option, - pNotifyArg: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strnicmp(arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_log(iErrCode: ::std::os::raw::c_int, - zFormat: *const ::std::os::raw::c_char, ...); -} -#[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/bindgen-bindings/bindgen_3.7.7.rs b/libsqlite3-sys/bindgen-bindings/bindgen_3.7.7.rs deleted file mode 100644 index 37bebe3..0000000 --- a/libsqlite3-sys/bindgen-bindings/bindgen_3.7.7.rs +++ /dev/null @@ -1,2145 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub const __GNUC_VA_LIST: i32 = 1; -pub const SQLITE_VERSION: &'static [u8; 6usize] = b"3.7.7\x00"; -pub const SQLITE_VERSION_NUMBER: i32 = 3007007; -pub const SQLITE_SOURCE_ID: &'static [u8; 61usize] = - b"2011-06-23 19:49:22 4374b7e83ea0a3fbc3691f9c0c936272862f32f2\x00"; -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_IOERR_SHMOPEN: i32 = 4618; -pub const SQLITE_IOERR_SHMSIZE: i32 = 4874; -pub const SQLITE_IOERR_SHMLOCK: i32 = 5130; -pub const SQLITE_IOERR_SHMMAP: i32 = 5386; -pub const SQLITE_IOERR_SEEK: i32 = 5642; -pub const SQLITE_LOCKED_SHAREDCACHE: i32 = 262; -pub const SQLITE_BUSY_RECOVERY: i32 = 261; -pub const SQLITE_CANTOPEN_NOTEMPDIR: i32 = 270; -pub const SQLITE_CORRUPT_VTAB: i32 = 267; -pub const SQLITE_READONLY_RECOVERY: i32 = 264; -pub const SQLITE_READONLY_CANTLOCK: i32 = 520; -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_AUTOPROXY: i32 = 32; -pub const SQLITE_OPEN_URI: i32 = 64; -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_OPEN_SHAREDCACHE: i32 = 131072; -pub const SQLITE_OPEN_PRIVATECACHE: i32 = 262144; -pub const SQLITE_OPEN_WAL: i32 = 524288; -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_IOCAP_UNDELETABLE_WHEN_OPEN: i32 = 2048; -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_FCNTL_SIZE_HINT: i32 = 5; -pub const SQLITE_FCNTL_CHUNK_SIZE: i32 = 6; -pub const SQLITE_FCNTL_FILE_POINTER: i32 = 7; -pub const SQLITE_FCNTL_SYNC_OMITTED: i32 = 8; -pub const SQLITE_ACCESS_EXISTS: i32 = 0; -pub const SQLITE_ACCESS_READWRITE: i32 = 1; -pub const SQLITE_ACCESS_READ: i32 = 2; -pub const SQLITE_SHM_UNLOCK: i32 = 1; -pub const SQLITE_SHM_LOCK: i32 = 2; -pub const SQLITE_SHM_SHARED: i32 = 4; -pub const SQLITE_SHM_EXCLUSIVE: i32 = 8; -pub const SQLITE_SHM_NLOCK: i32 = 8; -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_CONFIG_LOG: i32 = 16; -pub const SQLITE_CONFIG_URI: i32 = 17; -pub const SQLITE_DBCONFIG_LOOKASIDE: i32 = 1001; -pub const SQLITE_DBCONFIG_ENABLE_FKEY: i32 = 1002; -pub const SQLITE_DBCONFIG_ENABLE_TRIGGER: i32 = 1003; -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_LIMIT_TRIGGER_DEPTH: i32 = 10; -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_OPEN: 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_MUTEX_STATIC_PMEM: i32 = 7; -pub const SQLITE_TESTCTRL_FIRST: i32 = 5; -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_TESTCTRL_PENDING_BYTE: i32 = 11; -pub const SQLITE_TESTCTRL_ASSERT: i32 = 12; -pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13; -pub const SQLITE_TESTCTRL_RESERVE: i32 = 14; -pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15; -pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16; -pub const SQLITE_TESTCTRL_PGHDRSZ: i32 = 17; -pub const SQLITE_TESTCTRL_SCRATCHMALLOC: i32 = 18; -pub const SQLITE_TESTCTRL_LOCALTIME_FAULT: i32 = 19; -pub const SQLITE_TESTCTRL_LAST: i32 = 19; -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_STATUS_MALLOC_COUNT: i32 = 9; -pub const SQLITE_DBSTATUS_LOOKASIDE_USED: i32 = 0; -pub const SQLITE_DBSTATUS_CACHE_USED: i32 = 1; -pub const SQLITE_DBSTATUS_SCHEMA_USED: i32 = 2; -pub const SQLITE_DBSTATUS_STMT_USED: i32 = 3; -pub const SQLITE_DBSTATUS_LOOKASIDE_HIT: i32 = 4; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: i32 = 5; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: i32 = 6; -pub const SQLITE_DBSTATUS_MAX: i32 = 6; -pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: i32 = 1; -pub const SQLITE_STMTSTATUS_SORT: i32 = 2; -pub const SQLITE_STMTSTATUS_AUTOINDEX: i32 = 3; -pub const SQLITE_CHECKPOINT_PASSIVE: i32 = 0; -pub const SQLITE_CHECKPOINT_FULL: i32 = 1; -pub const SQLITE_CHECKPOINT_RESTART: i32 = 2; -pub const SQLITE_VTAB_CONSTRAINT_SUPPORT: i32 = 1; -pub const SQLITE_ROLLBACK: i32 = 1; -pub const SQLITE_FAIL: i32 = 3; -pub const SQLITE_REPLACE: i32 = 5; -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_sourceid() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_used(zOptName: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_get(N: ::std::os::raw::c_int) - -> *const ::std::os::raw::c_char; -} -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>, - pub xShmMap: ::std::option::Option ::std::os::raw::c_int>, - pub xShmLock: ::std::option::Option ::std::os::raw::c_int>, - pub xShmBarrier: ::std::option::Option, - pub xShmUnmap: ::std::option::Option ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_file_sqlite3_io_methods() { - assert_eq!(::std::mem::size_of::() , - 136usize); - 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>, - pub xCurrentTimeInt64: ::std::option::Option - ::std::os::raw::c_int>, - pub xSetSystemCall: ::std::option::Option ::std::os::raw::c_int>, - pub xGetSystemCall: ::std::option::Option - ::std::option::Option>, - pub xNextSystemCall: ::std::option::Option - *const ::std::os::raw::c_char>, -} -#[test] -fn bindgen_test_layout_sqlite3_vfs() { - assert_eq!(::std::mem::size_of::() , 168usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_vfs { - fn clone(&self) -> Self { *self } -} -pub type sqlite3_syscall_ptr = ::std::option::Option; -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_vsnprintf(arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - arg4: *mut __va_list_tag) - -> *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_uri_parameter(zFilename: *const ::std::os::raw::c_char, - zParam: *const ::std::os::raw::c_char) - -> *const ::std::os::raw::c_char; -} -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; -} -extern "C" { - pub fn sqlite3_stmt_readonly(pStmt: *mut sqlite3_stmt) - -> ::std::os::raw::c_int; -} -#[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_create_function_v2(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, - xDestroy: - ::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, - pArg: *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, - pArg: *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, - pArg: *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_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_limit64(N: sqlite3_int64) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_soft_heap_limit(N: ::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>, - pub xSavepoint: ::std::option::Option ::std::os::raw::c_int>, - pub xRelease: ::std::option::Option ::std::os::raw::c_int>, - pub xRollbackTo: ::std::option::Option ::std::os::raw::c_int>, -} -#[test] -fn bindgen_test_layout_sqlite3_module() { - assert_eq!(::std::mem::size_of::() , 184usize); - 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, - p: *const sqlite3_module, - pClientData: *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, - p: *const sqlite3_module, - pClientData: *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, - zSQL: *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_reopen(arg1: *mut sqlite3_blob, arg2: sqlite3_int64) - -> ::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, Clone)] -pub struct sqlite3_backup([u8; 0]); -extern "C" { - pub fn sqlite3_backup_init(pDest: *mut sqlite3, - zDestName: *const ::std::os::raw::c_char, - pSource: *mut sqlite3, - zSourceName: *const ::std::os::raw::c_char) - -> *mut sqlite3_backup; -} -extern "C" { - pub fn sqlite3_backup_step(p: *mut sqlite3_backup, - nPage: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_unlock_notify(pBlocked: *mut sqlite3, - xNotify: - ::std::option::Option, - pNotifyArg: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strnicmp(arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_log(iErrCode: ::std::os::raw::c_int, - zFormat: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn sqlite3_wal_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_wal_autocheckpoint(db: *mut sqlite3, - N: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint(db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint_v2(db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - eMode: ::std::os::raw::c_int, - pnLog: *mut ::std::os::raw::c_int, - pnCkpt: *mut ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_config(arg1: *mut sqlite3, - op: ::std::os::raw::c_int, ...) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_on_conflict(arg1: *mut sqlite3) - -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct sqlite3_rtree_geometry { - pub pContext: *mut ::std::os::raw::c_void, - pub nParam: ::std::os::raw::c_int, - pub aParam: *mut f64, - pub pUser: *mut ::std::os::raw::c_void, - pub xDelUser: ::std::option::Option, -} -#[test] -fn bindgen_test_layout_sqlite3_rtree_geometry() { - assert_eq!(::std::mem::size_of::() , 40usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for sqlite3_rtree_geometry { - fn clone(&self) -> Self { *self } -} -extern "C" { - pub fn sqlite3_rtree_geometry_callback(db: *mut sqlite3, - zGeom: - *const ::std::os::raw::c_char, - xGeom: - ::std::option::Option - ::std::os::raw::c_int>, - pContext: - *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int; -} -#[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 d3ef8b2..6b19a9d 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -474,13 +474,18 @@ 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_6_23")] - "bindgen-bindings/bindgen_3.6.23.rs", - #[cfg(feature = "min_sqlite_version_3_7_7")] - "bindgen-bindings/bindgen_3.7.7.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" + )) + ))] + "bindgen-bindings/bindgen_3.14.0.rs", ]; pub fn write_to_out_dir(_header: HeaderLocation, out_path: &Path) { diff --git a/src/functions.rs b/src/functions.rs index 8966348..c7c90e3 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -75,11 +75,11 @@ 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(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] fn constraint_error_code() -> i32 { ffi::SQLITE_CONSTRAINT_FUNCTION } - #[cfg(not(feature = "modern_sqlite"))] + #[cfg(feature = "old_sqlite")] fn constraint_error_code() -> i32 { ffi::SQLITE_CONSTRAINT } @@ -168,8 +168,8 @@ impl Context<'_> { /// /// Will panic if `idx` is greater than or equal to /// [`self.len()`](Context::len). - #[cfg(feature = "modern_sqlite")] // 3.9.0 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 +249,8 @@ impl Context<'_> { } /// Set the Subtype of an SQL function - #[cfg(feature = "modern_sqlite")] // 3.9.0 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 5058a0c..68563e5 100644 --- a/src/hooks.rs +++ b/src/hooks.rs @@ -181,7 +181,7 @@ pub enum AuthAction<'c> { operation: TransactionOperation, savepoint_name: &'c str, }, - #[cfg(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] Recursive, } @@ -285,7 +285,7 @@ impl<'c> AuthAction<'c> { operation: TransactionOperation::from_str(operation_str), savepoint_name, }, - #[cfg(feature = "modern_sqlite")] // 3.8.3 + #[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 e5bc3f1..ecbc305 100644 --- a/src/inner_connection.rs +++ b/src/inner_connection.rs @@ -295,7 +295,7 @@ impl InnerConnection { unsafe { ffi::sqlite3_get_autocommit(self.db()) != 0 } } - #[cfg(feature = "modern_sqlite")] // 3.8.6 + #[cfg(not(feature = "old_sqlite"))] // 3.8.6 pub fn is_busy(&self) -> bool { let db = self.db(); unsafe { @@ -310,7 +310,7 @@ impl InnerConnection { false } - #[cfg(feature = "modern_sqlite")] // 3.10.0 + #[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 +319,7 @@ impl InnerConnection { #[inline] fn remove_hooks(&mut self) {} - #[cfg(feature = "modern_sqlite")] // 3.7.11 + #[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 4587502..a097977 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -318,7 +318,7 @@ pub const TEMP_DB: DatabaseName<'static> = DatabaseName::Temp; feature = "backup", feature = "blob", feature = "session", - feature = "modern_sqlite" + not(feature = "old_sqlite") ))] impl DatabaseName<'_> { #[inline] @@ -961,22 +961,22 @@ impl Connection { /// Determine if all associated prepared statements have been reset. #[inline] - #[cfg(feature = "modern_sqlite")] // 3.8.6 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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(feature = "modern_sqlite")] // 3.10.0 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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(feature = "modern_sqlite")] // 3.7.11 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 +1176,7 @@ impl InterruptHandle { } } -#[cfg(feature = "modern_sqlite")] // 3.7.10 +#[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,7 +1186,7 @@ unsafe fn db_filename(db: *mut ffi::sqlite3) -> Option { CStr::from_ptr(db_filename).to_str().ok().map(PathBuf::from) } } -#[cfg(not(feature = "modern_sqlite"))] +#[cfg(feature = "old_sqlite")] unsafe fn db_filename(_: *mut ffi::sqlite3) -> Option { None } @@ -1664,7 +1664,7 @@ mod test { } #[test] - #[cfg(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] fn test_is_busy() -> Result<()> { let db = Connection::open_in_memory()?; assert!(!db.is_busy()); @@ -1695,11 +1695,11 @@ 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(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] fn check_extended_code(extended_code: c_int) { assert_eq!(extended_code, ffi::SQLITE_CONSTRAINT_NOTNULL); } - #[cfg(not(feature = "modern_sqlite"))] + #[cfg(feature = "old_sqlite")] fn check_extended_code(_extended_code: c_int) {} let db = Connection::open_in_memory()?; @@ -2109,14 +2109,14 @@ mod test { } #[test] - #[cfg(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] fn test_cache_flush() -> Result<()> { let db = Connection::open_in_memory()?; db.cache_flush() } #[test] - #[cfg(feature = "modern_sqlite")] + #[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 f057761..aecc0a4 100644 --- a/src/raw_statement.rs +++ b/src/raw_statement.rs @@ -1,7 +1,7 @@ use super::ffi; use super::StatementStatus; use crate::util::ParamIndexCache; -#[cfg(feature = "modern_sqlite")] +#[cfg(not(feature = "old_sqlite"))] use crate::util::SqliteMallocString; use std::ffi::CStr; use std::os::raw::c_int; @@ -197,13 +197,13 @@ impl RawStatement { // does not work for PRAGMA #[inline] - #[cfg(all(feature = "extra_check", feature = "modern_sqlite"))] // 3.7.4 + #[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(feature = "modern_sqlite")] // 3.14.0 + #[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 cbe37c0..559cfdb 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -796,7 +796,7 @@ impl Statement<'_> { self.conn.decode_result(stmt.finalize()) } - #[cfg(all(feature = "modern_sqlite", feature = "extra_check"))] + #[cfg(all(not(feature = "old_sqlite"), feature = "extra_check"))] #[inline] fn check_update(&self) -> Result<()> { // sqlite3_column_count works for DML but not for DDL (ie ALTER) @@ -806,7 +806,7 @@ impl Statement<'_> { Ok(()) } - #[cfg(all(not(feature = "modern_sqlite"), feature = "extra_check"))] + #[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) @@ -825,8 +825,8 @@ impl Statement<'_> { /// Returns a string containing the SQL text of prepared statement with /// bound parameters expanded. - #[cfg(feature = "modern_sqlite")] - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 +1407,7 @@ mod test { } #[test] - #[cfg(feature = "modern_sqlite")] + #[cfg(not(feature = "old_sqlite"))] fn test_expanded_sql() -> Result<()> { let db = Connection::open_in_memory()?; let stmt = db.prepare("SELECT ?")?; @@ -1537,7 +1537,7 @@ mod test { } #[test] - #[cfg(all(feature = "modern_sqlite", not(feature = "bundled-sqlcipher")))] // SQLite >= 3.38.0 + #[cfg(feature = "modern_sqlite")] // SQLite >= 3.38.0 fn test_error_offset() -> Result<()> { use crate::ffi::ErrorCode; let db = Connection::open_in_memory()?; diff --git a/src/util/mod.rs b/src/util/mod.rs index 2b8dcfd..6ac195b 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -5,7 +5,7 @@ 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(feature = "modern_sqlite", feature = "vtab"))] +#[cfg(any(not(feature = "old_sqlite"), feature = "vtab"))] mod sqlite_string; -#[cfg(any(feature = "modern_sqlite", feature = "vtab"))] +#[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 da261ba..fe72c97 100644 --- a/src/util/sqlite_string.rs +++ b/src/util/sqlite_string.rs @@ -2,7 +2,7 @@ // 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", feature = "modern-sqlite")), + not(all(feature = "vtab", not(feature = "old_sqlite"))), allow(dead_code) )] use crate::ffi; diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index 07008f3..4d32e41 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -187,7 +187,7 @@ pub fn eponymous_only_module<'vtab, T: VTab<'vtab>>() -> &'static Module<'vtab, /// Virtual table configuration options #[repr(i32)] #[non_exhaustive] -#[cfg(feature = "modern_sqlite")] // 3.7.7 +#[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 +203,8 @@ pub struct VTabConnection(*mut ffi::sqlite3); impl VTabConnection { /// Configure various facets of the virtual table interface - #[cfg(feature = "modern_sqlite")] // 3.7.7 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 +369,7 @@ impl From for IndexConstraintOp { } } -#[cfg(feature = "modern_sqlite")] // 3.9.0 +#[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 +474,8 @@ impl IndexInfo { } /// Estimated number of rows returned. - #[cfg(feature = "modern_sqlite")] // SQLite >= 3.8.2 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 +484,16 @@ impl IndexInfo { } /// Mask of SQLITE_INDEX_SCAN_* flags. - #[cfg(feature = "modern_sqlite")] // SQLite >= 3.9.0 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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(feature = "modern_sqlite")] // SQLite >= 3.10.0 - #[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))] + #[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 }