diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ea55e6..77def40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 - - run: rustup toolchain install stable --profile=minimal --component clippy --component rustfmt - - run: cargo clippy -- -D warnings + - run: rustup toolchain install stable --profile=minimal --component rustfmt - run: cargo fmt --all -- --check test: diff --git a/Cargo.toml b/Cargo.toml index 5faf237..85b698f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,12 +21,6 @@ default = ["linkage"] bundled = ["sqlite3-src/bundled"] linkage = ["sqlite3-src"] -[dependencies] -libc = "0.2" - [dependencies.sqlite3-src] version = "0.6" optional = true - -[dev-dependencies] -temporary = "0.6" diff --git a/README.md b/README.md index eb8d03f..1093abf 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ The package provides bindings to [SQLite]. +## Development + +```shell +cargo install bindgen-cli +git clone https://github.com/stainless-steel/sqlite3-src.git --recursive +bindgen --use-core sqlite3-src/source/sqlite3.h \ + | sed -E "s/^pub const ([0-9A-Z_]+): u32/pub const \1: ::core::ffi::c_int/" \ + > src/bindings.rs +``` + ## Contribution Your contribution is highly appreciated. Do not hesitate to open an issue or a diff --git a/src/bindings.rs b/src/bindings.rs new file mode 100644 index 0000000..e80c961 --- /dev/null +++ b/src/bindings.rs @@ -0,0 +1,5413 @@ +/* automatically generated by rust-bindgen 0.69.4 */ + +pub const __GNUC_VA_LIST: ::core::ffi::c_int = 1; +pub const SQLITE_VERSION: &[u8; 7] = b"3.45.3\0"; +pub const SQLITE_VERSION_NUMBER: ::core::ffi::c_int = 3045003; +pub const SQLITE_SOURCE_ID: &[u8; 85] = + b"2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1e8355\0"; +pub const SQLITE_OK: ::core::ffi::c_int = 0; +pub const SQLITE_ERROR: ::core::ffi::c_int = 1; +pub const SQLITE_INTERNAL: ::core::ffi::c_int = 2; +pub const SQLITE_PERM: ::core::ffi::c_int = 3; +pub const SQLITE_ABORT: ::core::ffi::c_int = 4; +pub const SQLITE_BUSY: ::core::ffi::c_int = 5; +pub const SQLITE_LOCKED: ::core::ffi::c_int = 6; +pub const SQLITE_NOMEM: ::core::ffi::c_int = 7; +pub const SQLITE_READONLY: ::core::ffi::c_int = 8; +pub const SQLITE_INTERRUPT: ::core::ffi::c_int = 9; +pub const SQLITE_IOERR: ::core::ffi::c_int = 10; +pub const SQLITE_CORRUPT: ::core::ffi::c_int = 11; +pub const SQLITE_NOTFOUND: ::core::ffi::c_int = 12; +pub const SQLITE_FULL: ::core::ffi::c_int = 13; +pub const SQLITE_CANTOPEN: ::core::ffi::c_int = 14; +pub const SQLITE_PROTOCOL: ::core::ffi::c_int = 15; +pub const SQLITE_EMPTY: ::core::ffi::c_int = 16; +pub const SQLITE_SCHEMA: ::core::ffi::c_int = 17; +pub const SQLITE_TOOBIG: ::core::ffi::c_int = 18; +pub const SQLITE_CONSTRAINT: ::core::ffi::c_int = 19; +pub const SQLITE_MISMATCH: ::core::ffi::c_int = 20; +pub const SQLITE_MISUSE: ::core::ffi::c_int = 21; +pub const SQLITE_NOLFS: ::core::ffi::c_int = 22; +pub const SQLITE_AUTH: ::core::ffi::c_int = 23; +pub const SQLITE_FORMAT: ::core::ffi::c_int = 24; +pub const SQLITE_RANGE: ::core::ffi::c_int = 25; +pub const SQLITE_NOTADB: ::core::ffi::c_int = 26; +pub const SQLITE_NOTICE: ::core::ffi::c_int = 27; +pub const SQLITE_WARNING: ::core::ffi::c_int = 28; +pub const SQLITE_ROW: ::core::ffi::c_int = 100; +pub const SQLITE_DONE: ::core::ffi::c_int = 101; +pub const SQLITE_ERROR_MISSING_COLLSEQ: ::core::ffi::c_int = 257; +pub const SQLITE_ERROR_RETRY: ::core::ffi::c_int = 513; +pub const SQLITE_ERROR_SNAPSHOT: ::core::ffi::c_int = 769; +pub const SQLITE_IOERR_READ: ::core::ffi::c_int = 266; +pub const SQLITE_IOERR_SHORT_READ: ::core::ffi::c_int = 522; +pub const SQLITE_IOERR_WRITE: ::core::ffi::c_int = 778; +pub const SQLITE_IOERR_FSYNC: ::core::ffi::c_int = 1034; +pub const SQLITE_IOERR_DIR_FSYNC: ::core::ffi::c_int = 1290; +pub const SQLITE_IOERR_TRUNCATE: ::core::ffi::c_int = 1546; +pub const SQLITE_IOERR_FSTAT: ::core::ffi::c_int = 1802; +pub const SQLITE_IOERR_UNLOCK: ::core::ffi::c_int = 2058; +pub const SQLITE_IOERR_RDLOCK: ::core::ffi::c_int = 2314; +pub const SQLITE_IOERR_DELETE: ::core::ffi::c_int = 2570; +pub const SQLITE_IOERR_BLOCKED: ::core::ffi::c_int = 2826; +pub const SQLITE_IOERR_NOMEM: ::core::ffi::c_int = 3082; +pub const SQLITE_IOERR_ACCESS: ::core::ffi::c_int = 3338; +pub const SQLITE_IOERR_CHECKRESERVEDLOCK: ::core::ffi::c_int = 3594; +pub const SQLITE_IOERR_LOCK: ::core::ffi::c_int = 3850; +pub const SQLITE_IOERR_CLOSE: ::core::ffi::c_int = 4106; +pub const SQLITE_IOERR_DIR_CLOSE: ::core::ffi::c_int = 4362; +pub const SQLITE_IOERR_SHMOPEN: ::core::ffi::c_int = 4618; +pub const SQLITE_IOERR_SHMSIZE: ::core::ffi::c_int = 4874; +pub const SQLITE_IOERR_SHMLOCK: ::core::ffi::c_int = 5130; +pub const SQLITE_IOERR_SHMMAP: ::core::ffi::c_int = 5386; +pub const SQLITE_IOERR_SEEK: ::core::ffi::c_int = 5642; +pub const SQLITE_IOERR_DELETE_NOENT: ::core::ffi::c_int = 5898; +pub const SQLITE_IOERR_MMAP: ::core::ffi::c_int = 6154; +pub const SQLITE_IOERR_GETTEMPPATH: ::core::ffi::c_int = 6410; +pub const SQLITE_IOERR_CONVPATH: ::core::ffi::c_int = 6666; +pub const SQLITE_IOERR_VNODE: ::core::ffi::c_int = 6922; +pub const SQLITE_IOERR_AUTH: ::core::ffi::c_int = 7178; +pub const SQLITE_IOERR_BEGIN_ATOMIC: ::core::ffi::c_int = 7434; +pub const SQLITE_IOERR_COMMIT_ATOMIC: ::core::ffi::c_int = 7690; +pub const SQLITE_IOERR_ROLLBACK_ATOMIC: ::core::ffi::c_int = 7946; +pub const SQLITE_IOERR_DATA: ::core::ffi::c_int = 8202; +pub const SQLITE_IOERR_CORRUPTFS: ::core::ffi::c_int = 8458; +pub const SQLITE_IOERR_IN_PAGE: ::core::ffi::c_int = 8714; +pub const SQLITE_LOCKED_SHAREDCACHE: ::core::ffi::c_int = 262; +pub const SQLITE_LOCKED_VTAB: ::core::ffi::c_int = 518; +pub const SQLITE_BUSY_RECOVERY: ::core::ffi::c_int = 261; +pub const SQLITE_BUSY_SNAPSHOT: ::core::ffi::c_int = 517; +pub const SQLITE_BUSY_TIMEOUT: ::core::ffi::c_int = 773; +pub const SQLITE_CANTOPEN_NOTEMPDIR: ::core::ffi::c_int = 270; +pub const SQLITE_CANTOPEN_ISDIR: ::core::ffi::c_int = 526; +pub const SQLITE_CANTOPEN_FULLPATH: ::core::ffi::c_int = 782; +pub const SQLITE_CANTOPEN_CONVPATH: ::core::ffi::c_int = 1038; +pub const SQLITE_CANTOPEN_DIRTYWAL: ::core::ffi::c_int = 1294; +pub const SQLITE_CANTOPEN_SYMLINK: ::core::ffi::c_int = 1550; +pub const SQLITE_CORRUPT_VTAB: ::core::ffi::c_int = 267; +pub const SQLITE_CORRUPT_SEQUENCE: ::core::ffi::c_int = 523; +pub const SQLITE_CORRUPT_INDEX: ::core::ffi::c_int = 779; +pub const SQLITE_READONLY_RECOVERY: ::core::ffi::c_int = 264; +pub const SQLITE_READONLY_CANTLOCK: ::core::ffi::c_int = 520; +pub const SQLITE_READONLY_ROLLBACK: ::core::ffi::c_int = 776; +pub const SQLITE_READONLY_DBMOVED: ::core::ffi::c_int = 1032; +pub const SQLITE_READONLY_CANTINIT: ::core::ffi::c_int = 1288; +pub const SQLITE_READONLY_DIRECTORY: ::core::ffi::c_int = 1544; +pub const SQLITE_ABORT_ROLLBACK: ::core::ffi::c_int = 516; +pub const SQLITE_CONSTRAINT_CHECK: ::core::ffi::c_int = 275; +pub const SQLITE_CONSTRAINT_COMMITHOOK: ::core::ffi::c_int = 531; +pub const SQLITE_CONSTRAINT_FOREIGNKEY: ::core::ffi::c_int = 787; +pub const SQLITE_CONSTRAINT_FUNCTION: ::core::ffi::c_int = 1043; +pub const SQLITE_CONSTRAINT_NOTNULL: ::core::ffi::c_int = 1299; +pub const SQLITE_CONSTRAINT_PRIMARYKEY: ::core::ffi::c_int = 1555; +pub const SQLITE_CONSTRAINT_TRIGGER: ::core::ffi::c_int = 1811; +pub const SQLITE_CONSTRAINT_UNIQUE: ::core::ffi::c_int = 2067; +pub const SQLITE_CONSTRAINT_VTAB: ::core::ffi::c_int = 2323; +pub const SQLITE_CONSTRAINT_ROWID: ::core::ffi::c_int = 2579; +pub const SQLITE_CONSTRAINT_PINNED: ::core::ffi::c_int = 2835; +pub const SQLITE_CONSTRAINT_DATATYPE: ::core::ffi::c_int = 3091; +pub const SQLITE_NOTICE_RECOVER_WAL: ::core::ffi::c_int = 283; +pub const SQLITE_NOTICE_RECOVER_ROLLBACK: ::core::ffi::c_int = 539; +pub const SQLITE_NOTICE_RBU: ::core::ffi::c_int = 795; +pub const SQLITE_WARNING_AUTOINDEX: ::core::ffi::c_int = 284; +pub const SQLITE_AUTH_USER: ::core::ffi::c_int = 279; +pub const SQLITE_OK_LOAD_PERMANENTLY: ::core::ffi::c_int = 256; +pub const SQLITE_OK_SYMLINK: ::core::ffi::c_int = 512; +pub const SQLITE_OPEN_READONLY: ::core::ffi::c_int = 1; +pub const SQLITE_OPEN_READWRITE: ::core::ffi::c_int = 2; +pub const SQLITE_OPEN_CREATE: ::core::ffi::c_int = 4; +pub const SQLITE_OPEN_DELETEONCLOSE: ::core::ffi::c_int = 8; +pub const SQLITE_OPEN_EXCLUSIVE: ::core::ffi::c_int = 16; +pub const SQLITE_OPEN_AUTOPROXY: ::core::ffi::c_int = 32; +pub const SQLITE_OPEN_URI: ::core::ffi::c_int = 64; +pub const SQLITE_OPEN_MEMORY: ::core::ffi::c_int = 128; +pub const SQLITE_OPEN_MAIN_DB: ::core::ffi::c_int = 256; +pub const SQLITE_OPEN_TEMP_DB: ::core::ffi::c_int = 512; +pub const SQLITE_OPEN_TRANSIENT_DB: ::core::ffi::c_int = 1024; +pub const SQLITE_OPEN_MAIN_JOURNAL: ::core::ffi::c_int = 2048; +pub const SQLITE_OPEN_TEMP_JOURNAL: ::core::ffi::c_int = 4096; +pub const SQLITE_OPEN_SUBJOURNAL: ::core::ffi::c_int = 8192; +pub const SQLITE_OPEN_SUPER_JOURNAL: ::core::ffi::c_int = 16384; +pub const SQLITE_OPEN_NOMUTEX: ::core::ffi::c_int = 32768; +pub const SQLITE_OPEN_FULLMUTEX: ::core::ffi::c_int = 65536; +pub const SQLITE_OPEN_SHAREDCACHE: ::core::ffi::c_int = 131072; +pub const SQLITE_OPEN_PRIVATECACHE: ::core::ffi::c_int = 262144; +pub const SQLITE_OPEN_WAL: ::core::ffi::c_int = 524288; +pub const SQLITE_OPEN_NOFOLLOW: ::core::ffi::c_int = 16777216; +pub const SQLITE_OPEN_EXRESCODE: ::core::ffi::c_int = 33554432; +pub const SQLITE_OPEN_MASTER_JOURNAL: ::core::ffi::c_int = 16384; +pub const SQLITE_IOCAP_ATOMIC: ::core::ffi::c_int = 1; +pub const SQLITE_IOCAP_ATOMIC512: ::core::ffi::c_int = 2; +pub const SQLITE_IOCAP_ATOMIC1K: ::core::ffi::c_int = 4; +pub const SQLITE_IOCAP_ATOMIC2K: ::core::ffi::c_int = 8; +pub const SQLITE_IOCAP_ATOMIC4K: ::core::ffi::c_int = 16; +pub const SQLITE_IOCAP_ATOMIC8K: ::core::ffi::c_int = 32; +pub const SQLITE_IOCAP_ATOMIC16K: ::core::ffi::c_int = 64; +pub const SQLITE_IOCAP_ATOMIC32K: ::core::ffi::c_int = 128; +pub const SQLITE_IOCAP_ATOMIC64K: ::core::ffi::c_int = 256; +pub const SQLITE_IOCAP_SAFE_APPEND: ::core::ffi::c_int = 512; +pub const SQLITE_IOCAP_SEQUENTIAL: ::core::ffi::c_int = 1024; +pub const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: ::core::ffi::c_int = 2048; +pub const SQLITE_IOCAP_POWERSAFE_OVERWRITE: ::core::ffi::c_int = 4096; +pub const SQLITE_IOCAP_IMMUTABLE: ::core::ffi::c_int = 8192; +pub const SQLITE_IOCAP_BATCH_ATOMIC: ::core::ffi::c_int = 16384; +pub const SQLITE_LOCK_NONE: ::core::ffi::c_int = 0; +pub const SQLITE_LOCK_SHARED: ::core::ffi::c_int = 1; +pub const SQLITE_LOCK_RESERVED: ::core::ffi::c_int = 2; +pub const SQLITE_LOCK_PENDING: ::core::ffi::c_int = 3; +pub const SQLITE_LOCK_EXCLUSIVE: ::core::ffi::c_int = 4; +pub const SQLITE_SYNC_NORMAL: ::core::ffi::c_int = 2; +pub const SQLITE_SYNC_FULL: ::core::ffi::c_int = 3; +pub const SQLITE_SYNC_DATAONLY: ::core::ffi::c_int = 16; +pub const SQLITE_FCNTL_LOCKSTATE: ::core::ffi::c_int = 1; +pub const SQLITE_FCNTL_GET_LOCKPROXYFILE: ::core::ffi::c_int = 2; +pub const SQLITE_FCNTL_SET_LOCKPROXYFILE: ::core::ffi::c_int = 3; +pub const SQLITE_FCNTL_LAST_ERRNO: ::core::ffi::c_int = 4; +pub const SQLITE_FCNTL_SIZE_HINT: ::core::ffi::c_int = 5; +pub const SQLITE_FCNTL_CHUNK_SIZE: ::core::ffi::c_int = 6; +pub const SQLITE_FCNTL_FILE_POINTER: ::core::ffi::c_int = 7; +pub const SQLITE_FCNTL_SYNC_OMITTED: ::core::ffi::c_int = 8; +pub const SQLITE_FCNTL_WIN32_AV_RETRY: ::core::ffi::c_int = 9; +pub const SQLITE_FCNTL_PERSIST_WAL: ::core::ffi::c_int = 10; +pub const SQLITE_FCNTL_OVERWRITE: ::core::ffi::c_int = 11; +pub const SQLITE_FCNTL_VFSNAME: ::core::ffi::c_int = 12; +pub const SQLITE_FCNTL_POWERSAFE_OVERWRITE: ::core::ffi::c_int = 13; +pub const SQLITE_FCNTL_PRAGMA: ::core::ffi::c_int = 14; +pub const SQLITE_FCNTL_BUSYHANDLER: ::core::ffi::c_int = 15; +pub const SQLITE_FCNTL_TEMPFILENAME: ::core::ffi::c_int = 16; +pub const SQLITE_FCNTL_MMAP_SIZE: ::core::ffi::c_int = 18; +pub const SQLITE_FCNTL_TRACE: ::core::ffi::c_int = 19; +pub const SQLITE_FCNTL_HAS_MOVED: ::core::ffi::c_int = 20; +pub const SQLITE_FCNTL_SYNC: ::core::ffi::c_int = 21; +pub const SQLITE_FCNTL_COMMIT_PHASETWO: ::core::ffi::c_int = 22; +pub const SQLITE_FCNTL_WIN32_SET_HANDLE: ::core::ffi::c_int = 23; +pub const SQLITE_FCNTL_WAL_BLOCK: ::core::ffi::c_int = 24; +pub const SQLITE_FCNTL_ZIPVFS: ::core::ffi::c_int = 25; +pub const SQLITE_FCNTL_RBU: ::core::ffi::c_int = 26; +pub const SQLITE_FCNTL_VFS_POINTER: ::core::ffi::c_int = 27; +pub const SQLITE_FCNTL_JOURNAL_POINTER: ::core::ffi::c_int = 28; +pub const SQLITE_FCNTL_WIN32_GET_HANDLE: ::core::ffi::c_int = 29; +pub const SQLITE_FCNTL_PDB: ::core::ffi::c_int = 30; +pub const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: ::core::ffi::c_int = 31; +pub const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: ::core::ffi::c_int = 32; +pub const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: ::core::ffi::c_int = 33; +pub const SQLITE_FCNTL_LOCK_TIMEOUT: ::core::ffi::c_int = 34; +pub const SQLITE_FCNTL_DATA_VERSION: ::core::ffi::c_int = 35; +pub const SQLITE_FCNTL_SIZE_LIMIT: ::core::ffi::c_int = 36; +pub const SQLITE_FCNTL_CKPT_DONE: ::core::ffi::c_int = 37; +pub const SQLITE_FCNTL_RESERVE_BYTES: ::core::ffi::c_int = 38; +pub const SQLITE_FCNTL_CKPT_START: ::core::ffi::c_int = 39; +pub const SQLITE_FCNTL_EXTERNAL_READER: ::core::ffi::c_int = 40; +pub const SQLITE_FCNTL_CKSM_FILE: ::core::ffi::c_int = 41; +pub const SQLITE_FCNTL_RESET_CACHE: ::core::ffi::c_int = 42; +pub const SQLITE_GET_LOCKPROXYFILE: ::core::ffi::c_int = 2; +pub const SQLITE_SET_LOCKPROXYFILE: ::core::ffi::c_int = 3; +pub const SQLITE_LAST_ERRNO: ::core::ffi::c_int = 4; +pub const SQLITE_ACCESS_EXISTS: ::core::ffi::c_int = 0; +pub const SQLITE_ACCESS_READWRITE: ::core::ffi::c_int = 1; +pub const SQLITE_ACCESS_READ: ::core::ffi::c_int = 2; +pub const SQLITE_SHM_UNLOCK: ::core::ffi::c_int = 1; +pub const SQLITE_SHM_LOCK: ::core::ffi::c_int = 2; +pub const SQLITE_SHM_SHARED: ::core::ffi::c_int = 4; +pub const SQLITE_SHM_EXCLUSIVE: ::core::ffi::c_int = 8; +pub const SQLITE_SHM_NLOCK: ::core::ffi::c_int = 8; +pub const SQLITE_CONFIG_SINGLETHREAD: ::core::ffi::c_int = 1; +pub const SQLITE_CONFIG_MULTITHREAD: ::core::ffi::c_int = 2; +pub const SQLITE_CONFIG_SERIALIZED: ::core::ffi::c_int = 3; +pub const SQLITE_CONFIG_MALLOC: ::core::ffi::c_int = 4; +pub const SQLITE_CONFIG_GETMALLOC: ::core::ffi::c_int = 5; +pub const SQLITE_CONFIG_SCRATCH: ::core::ffi::c_int = 6; +pub const SQLITE_CONFIG_PAGECACHE: ::core::ffi::c_int = 7; +pub const SQLITE_CONFIG_HEAP: ::core::ffi::c_int = 8; +pub const SQLITE_CONFIG_MEMSTATUS: ::core::ffi::c_int = 9; +pub const SQLITE_CONFIG_MUTEX: ::core::ffi::c_int = 10; +pub const SQLITE_CONFIG_GETMUTEX: ::core::ffi::c_int = 11; +pub const SQLITE_CONFIG_LOOKASIDE: ::core::ffi::c_int = 13; +pub const SQLITE_CONFIG_PCACHE: ::core::ffi::c_int = 14; +pub const SQLITE_CONFIG_GETPCACHE: ::core::ffi::c_int = 15; +pub const SQLITE_CONFIG_LOG: ::core::ffi::c_int = 16; +pub const SQLITE_CONFIG_URI: ::core::ffi::c_int = 17; +pub const SQLITE_CONFIG_PCACHE2: ::core::ffi::c_int = 18; +pub const SQLITE_CONFIG_GETPCACHE2: ::core::ffi::c_int = 19; +pub const SQLITE_CONFIG_COVERING_INDEX_SCAN: ::core::ffi::c_int = 20; +pub const SQLITE_CONFIG_SQLLOG: ::core::ffi::c_int = 21; +pub const SQLITE_CONFIG_MMAP_SIZE: ::core::ffi::c_int = 22; +pub const SQLITE_CONFIG_WIN32_HEAPSIZE: ::core::ffi::c_int = 23; +pub const SQLITE_CONFIG_PCACHE_HDRSZ: ::core::ffi::c_int = 24; +pub const SQLITE_CONFIG_PMASZ: ::core::ffi::c_int = 25; +pub const SQLITE_CONFIG_STMTJRNL_SPILL: ::core::ffi::c_int = 26; +pub const SQLITE_CONFIG_SMALL_MALLOC: ::core::ffi::c_int = 27; +pub const SQLITE_CONFIG_SORTERREF_SIZE: ::core::ffi::c_int = 28; +pub const SQLITE_CONFIG_MEMDB_MAXSIZE: ::core::ffi::c_int = 29; +pub const SQLITE_CONFIG_ROWID_IN_VIEW: ::core::ffi::c_int = 30; +pub const SQLITE_DBCONFIG_MAINDBNAME: ::core::ffi::c_int = 1000; +pub const SQLITE_DBCONFIG_LOOKASIDE: ::core::ffi::c_int = 1001; +pub const SQLITE_DBCONFIG_ENABLE_FKEY: ::core::ffi::c_int = 1002; +pub const SQLITE_DBCONFIG_ENABLE_TRIGGER: ::core::ffi::c_int = 1003; +pub const SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER: ::core::ffi::c_int = 1004; +pub const SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION: ::core::ffi::c_int = 1005; +pub const SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE: ::core::ffi::c_int = 1006; +pub const SQLITE_DBCONFIG_ENABLE_QPSG: ::core::ffi::c_int = 1007; +pub const SQLITE_DBCONFIG_TRIGGER_EQP: ::core::ffi::c_int = 1008; +pub const SQLITE_DBCONFIG_RESET_DATABASE: ::core::ffi::c_int = 1009; +pub const SQLITE_DBCONFIG_DEFENSIVE: ::core::ffi::c_int = 1010; +pub const SQLITE_DBCONFIG_WRITABLE_SCHEMA: ::core::ffi::c_int = 1011; +pub const SQLITE_DBCONFIG_LEGACY_ALTER_TABLE: ::core::ffi::c_int = 1012; +pub const SQLITE_DBCONFIG_DQS_DML: ::core::ffi::c_int = 1013; +pub const SQLITE_DBCONFIG_DQS_DDL: ::core::ffi::c_int = 1014; +pub const SQLITE_DBCONFIG_ENABLE_VIEW: ::core::ffi::c_int = 1015; +pub const SQLITE_DBCONFIG_LEGACY_FILE_FORMAT: ::core::ffi::c_int = 1016; +pub const SQLITE_DBCONFIG_TRUSTED_SCHEMA: ::core::ffi::c_int = 1017; +pub const SQLITE_DBCONFIG_STMT_SCANSTATUS: ::core::ffi::c_int = 1018; +pub const SQLITE_DBCONFIG_REVERSE_SCANORDER: ::core::ffi::c_int = 1019; +pub const SQLITE_DBCONFIG_MAX: ::core::ffi::c_int = 1019; +pub const SQLITE_DENY: ::core::ffi::c_int = 1; +pub const SQLITE_IGNORE: ::core::ffi::c_int = 2; +pub const SQLITE_CREATE_INDEX: ::core::ffi::c_int = 1; +pub const SQLITE_CREATE_TABLE: ::core::ffi::c_int = 2; +pub const SQLITE_CREATE_TEMP_INDEX: ::core::ffi::c_int = 3; +pub const SQLITE_CREATE_TEMP_TABLE: ::core::ffi::c_int = 4; +pub const SQLITE_CREATE_TEMP_TRIGGER: ::core::ffi::c_int = 5; +pub const SQLITE_CREATE_TEMP_VIEW: ::core::ffi::c_int = 6; +pub const SQLITE_CREATE_TRIGGER: ::core::ffi::c_int = 7; +pub const SQLITE_CREATE_VIEW: ::core::ffi::c_int = 8; +pub const SQLITE_DELETE: ::core::ffi::c_int = 9; +pub const SQLITE_DROP_INDEX: ::core::ffi::c_int = 10; +pub const SQLITE_DROP_TABLE: ::core::ffi::c_int = 11; +pub const SQLITE_DROP_TEMP_INDEX: ::core::ffi::c_int = 12; +pub const SQLITE_DROP_TEMP_TABLE: ::core::ffi::c_int = 13; +pub const SQLITE_DROP_TEMP_TRIGGER: ::core::ffi::c_int = 14; +pub const SQLITE_DROP_TEMP_VIEW: ::core::ffi::c_int = 15; +pub const SQLITE_DROP_TRIGGER: ::core::ffi::c_int = 16; +pub const SQLITE_DROP_VIEW: ::core::ffi::c_int = 17; +pub const SQLITE_INSERT: ::core::ffi::c_int = 18; +pub const SQLITE_PRAGMA: ::core::ffi::c_int = 19; +pub const SQLITE_READ: ::core::ffi::c_int = 20; +pub const SQLITE_SELECT: ::core::ffi::c_int = 21; +pub const SQLITE_TRANSACTION: ::core::ffi::c_int = 22; +pub const SQLITE_UPDATE: ::core::ffi::c_int = 23; +pub const SQLITE_ATTACH: ::core::ffi::c_int = 24; +pub const SQLITE_DETACH: ::core::ffi::c_int = 25; +pub const SQLITE_ALTER_TABLE: ::core::ffi::c_int = 26; +pub const SQLITE_REINDEX: ::core::ffi::c_int = 27; +pub const SQLITE_ANALYZE: ::core::ffi::c_int = 28; +pub const SQLITE_CREATE_VTABLE: ::core::ffi::c_int = 29; +pub const SQLITE_DROP_VTABLE: ::core::ffi::c_int = 30; +pub const SQLITE_FUNCTION: ::core::ffi::c_int = 31; +pub const SQLITE_SAVEPOINT: ::core::ffi::c_int = 32; +pub const SQLITE_COPY: ::core::ffi::c_int = 0; +pub const SQLITE_RECURSIVE: ::core::ffi::c_int = 33; +pub const SQLITE_TRACE_STMT: ::core::ffi::c_int = 1; +pub const SQLITE_TRACE_PROFILE: ::core::ffi::c_int = 2; +pub const SQLITE_TRACE_ROW: ::core::ffi::c_int = 4; +pub const SQLITE_TRACE_CLOSE: ::core::ffi::c_int = 8; +pub const SQLITE_LIMIT_LENGTH: ::core::ffi::c_int = 0; +pub const SQLITE_LIMIT_SQL_LENGTH: ::core::ffi::c_int = 1; +pub const SQLITE_LIMIT_COLUMN: ::core::ffi::c_int = 2; +pub const SQLITE_LIMIT_EXPR_DEPTH: ::core::ffi::c_int = 3; +pub const SQLITE_LIMIT_COMPOUND_SELECT: ::core::ffi::c_int = 4; +pub const SQLITE_LIMIT_VDBE_OP: ::core::ffi::c_int = 5; +pub const SQLITE_LIMIT_FUNCTION_ARG: ::core::ffi::c_int = 6; +pub const SQLITE_LIMIT_ATTACHED: ::core::ffi::c_int = 7; +pub const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: ::core::ffi::c_int = 8; +pub const SQLITE_LIMIT_VARIABLE_NUMBER: ::core::ffi::c_int = 9; +pub const SQLITE_LIMIT_TRIGGER_DEPTH: ::core::ffi::c_int = 10; +pub const SQLITE_LIMIT_WORKER_THREADS: ::core::ffi::c_int = 11; +pub const SQLITE_PREPARE_PERSISTENT: ::core::ffi::c_int = 1; +pub const SQLITE_PREPARE_NORMALIZE: ::core::ffi::c_int = 2; +pub const SQLITE_PREPARE_NO_VTAB: ::core::ffi::c_int = 4; +pub const SQLITE_INTEGER: ::core::ffi::c_int = 1; +pub const SQLITE_FLOAT: ::core::ffi::c_int = 2; +pub const SQLITE_BLOB: ::core::ffi::c_int = 4; +pub const SQLITE_NULL: ::core::ffi::c_int = 5; +pub const SQLITE_TEXT: ::core::ffi::c_int = 3; +pub const SQLITE3_TEXT: ::core::ffi::c_int = 3; +pub const SQLITE_UTF8: ::core::ffi::c_int = 1; +pub const SQLITE_UTF16LE: ::core::ffi::c_int = 2; +pub const SQLITE_UTF16BE: ::core::ffi::c_int = 3; +pub const SQLITE_UTF16: ::core::ffi::c_int = 4; +pub const SQLITE_ANY: ::core::ffi::c_int = 5; +pub const SQLITE_UTF16_ALIGNED: ::core::ffi::c_int = 8; +pub const SQLITE_DETERMINISTIC: ::core::ffi::c_int = 2048; +pub const SQLITE_DIRECTONLY: ::core::ffi::c_int = 524288; +pub const SQLITE_SUBTYPE: ::core::ffi::c_int = 1048576; +pub const SQLITE_INNOCUOUS: ::core::ffi::c_int = 2097152; +pub const SQLITE_RESULT_SUBTYPE: ::core::ffi::c_int = 16777216; +pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: ::core::ffi::c_int = 1; +pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: ::core::ffi::c_int = 2; +pub const SQLITE_TXN_NONE: ::core::ffi::c_int = 0; +pub const SQLITE_TXN_READ: ::core::ffi::c_int = 1; +pub const SQLITE_TXN_WRITE: ::core::ffi::c_int = 2; +pub const SQLITE_INDEX_SCAN_UNIQUE: ::core::ffi::c_int = 1; +pub const SQLITE_INDEX_CONSTRAINT_EQ: ::core::ffi::c_int = 2; +pub const SQLITE_INDEX_CONSTRAINT_GT: ::core::ffi::c_int = 4; +pub const SQLITE_INDEX_CONSTRAINT_LE: ::core::ffi::c_int = 8; +pub const SQLITE_INDEX_CONSTRAINT_LT: ::core::ffi::c_int = 16; +pub const SQLITE_INDEX_CONSTRAINT_GE: ::core::ffi::c_int = 32; +pub const SQLITE_INDEX_CONSTRAINT_MATCH: ::core::ffi::c_int = 64; +pub const SQLITE_INDEX_CONSTRAINT_LIKE: ::core::ffi::c_int = 65; +pub const SQLITE_INDEX_CONSTRAINT_GLOB: ::core::ffi::c_int = 66; +pub const SQLITE_INDEX_CONSTRAINT_REGEXP: ::core::ffi::c_int = 67; +pub const SQLITE_INDEX_CONSTRAINT_NE: ::core::ffi::c_int = 68; +pub const SQLITE_INDEX_CONSTRAINT_ISNOT: ::core::ffi::c_int = 69; +pub const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: ::core::ffi::c_int = 70; +pub const SQLITE_INDEX_CONSTRAINT_ISNULL: ::core::ffi::c_int = 71; +pub const SQLITE_INDEX_CONSTRAINT_IS: ::core::ffi::c_int = 72; +pub const SQLITE_INDEX_CONSTRAINT_LIMIT: ::core::ffi::c_int = 73; +pub const SQLITE_INDEX_CONSTRAINT_OFFSET: ::core::ffi::c_int = 74; +pub const SQLITE_INDEX_CONSTRAINT_FUNCTION: ::core::ffi::c_int = 150; +pub const SQLITE_MUTEX_FAST: ::core::ffi::c_int = 0; +pub const SQLITE_MUTEX_RECURSIVE: ::core::ffi::c_int = 1; +pub const SQLITE_MUTEX_STATIC_MAIN: ::core::ffi::c_int = 2; +pub const SQLITE_MUTEX_STATIC_MEM: ::core::ffi::c_int = 3; +pub const SQLITE_MUTEX_STATIC_MEM2: ::core::ffi::c_int = 4; +pub const SQLITE_MUTEX_STATIC_OPEN: ::core::ffi::c_int = 4; +pub const SQLITE_MUTEX_STATIC_PRNG: ::core::ffi::c_int = 5; +pub const SQLITE_MUTEX_STATIC_LRU: ::core::ffi::c_int = 6; +pub const SQLITE_MUTEX_STATIC_LRU2: ::core::ffi::c_int = 7; +pub const SQLITE_MUTEX_STATIC_PMEM: ::core::ffi::c_int = 7; +pub const SQLITE_MUTEX_STATIC_APP1: ::core::ffi::c_int = 8; +pub const SQLITE_MUTEX_STATIC_APP2: ::core::ffi::c_int = 9; +pub const SQLITE_MUTEX_STATIC_APP3: ::core::ffi::c_int = 10; +pub const SQLITE_MUTEX_STATIC_VFS1: ::core::ffi::c_int = 11; +pub const SQLITE_MUTEX_STATIC_VFS2: ::core::ffi::c_int = 12; +pub const SQLITE_MUTEX_STATIC_VFS3: ::core::ffi::c_int = 13; +pub const SQLITE_MUTEX_STATIC_MASTER: ::core::ffi::c_int = 2; +pub const SQLITE_TESTCTRL_FIRST: ::core::ffi::c_int = 5; +pub const SQLITE_TESTCTRL_PRNG_SAVE: ::core::ffi::c_int = 5; +pub const SQLITE_TESTCTRL_PRNG_RESTORE: ::core::ffi::c_int = 6; +pub const SQLITE_TESTCTRL_PRNG_RESET: ::core::ffi::c_int = 7; +pub const SQLITE_TESTCTRL_FK_NO_ACTION: ::core::ffi::c_int = 7; +pub const SQLITE_TESTCTRL_BITVEC_TEST: ::core::ffi::c_int = 8; +pub const SQLITE_TESTCTRL_FAULT_INSTALL: ::core::ffi::c_int = 9; +pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: ::core::ffi::c_int = 10; +pub const SQLITE_TESTCTRL_PENDING_BYTE: ::core::ffi::c_int = 11; +pub const SQLITE_TESTCTRL_ASSERT: ::core::ffi::c_int = 12; +pub const SQLITE_TESTCTRL_ALWAYS: ::core::ffi::c_int = 13; +pub const SQLITE_TESTCTRL_RESERVE: ::core::ffi::c_int = 14; +pub const SQLITE_TESTCTRL_JSON_SELFCHECK: ::core::ffi::c_int = 14; +pub const SQLITE_TESTCTRL_OPTIMIZATIONS: ::core::ffi::c_int = 15; +pub const SQLITE_TESTCTRL_ISKEYWORD: ::core::ffi::c_int = 16; +pub const SQLITE_TESTCTRL_SCRATCHMALLOC: ::core::ffi::c_int = 17; +pub const SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: ::core::ffi::c_int = 17; +pub const SQLITE_TESTCTRL_LOCALTIME_FAULT: ::core::ffi::c_int = 18; +pub const SQLITE_TESTCTRL_EXPLAIN_STMT: ::core::ffi::c_int = 19; +pub const SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: ::core::ffi::c_int = 19; +pub const SQLITE_TESTCTRL_NEVER_CORRUPT: ::core::ffi::c_int = 20; +pub const SQLITE_TESTCTRL_VDBE_COVERAGE: ::core::ffi::c_int = 21; +pub const SQLITE_TESTCTRL_BYTEORDER: ::core::ffi::c_int = 22; +pub const SQLITE_TESTCTRL_ISINIT: ::core::ffi::c_int = 23; +pub const SQLITE_TESTCTRL_SORTER_MMAP: ::core::ffi::c_int = 24; +pub const SQLITE_TESTCTRL_IMPOSTER: ::core::ffi::c_int = 25; +pub const SQLITE_TESTCTRL_PARSER_COVERAGE: ::core::ffi::c_int = 26; +pub const SQLITE_TESTCTRL_RESULT_INTREAL: ::core::ffi::c_int = 27; +pub const SQLITE_TESTCTRL_PRNG_SEED: ::core::ffi::c_int = 28; +pub const SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: ::core::ffi::c_int = 29; +pub const SQLITE_TESTCTRL_SEEK_COUNT: ::core::ffi::c_int = 30; +pub const SQLITE_TESTCTRL_TRACEFLAGS: ::core::ffi::c_int = 31; +pub const SQLITE_TESTCTRL_TUNE: ::core::ffi::c_int = 32; +pub const SQLITE_TESTCTRL_LOGEST: ::core::ffi::c_int = 33; +pub const SQLITE_TESTCTRL_USELONGDOUBLE: ::core::ffi::c_int = 34; +pub const SQLITE_TESTCTRL_LAST: ::core::ffi::c_int = 34; +pub const SQLITE_STATUS_MEMORY_USED: ::core::ffi::c_int = 0; +pub const SQLITE_STATUS_PAGECACHE_USED: ::core::ffi::c_int = 1; +pub const SQLITE_STATUS_PAGECACHE_OVERFLOW: ::core::ffi::c_int = 2; +pub const SQLITE_STATUS_SCRATCH_USED: ::core::ffi::c_int = 3; +pub const SQLITE_STATUS_SCRATCH_OVERFLOW: ::core::ffi::c_int = 4; +pub const SQLITE_STATUS_MALLOC_SIZE: ::core::ffi::c_int = 5; +pub const SQLITE_STATUS_PARSER_STACK: ::core::ffi::c_int = 6; +pub const SQLITE_STATUS_PAGECACHE_SIZE: ::core::ffi::c_int = 7; +pub const SQLITE_STATUS_SCRATCH_SIZE: ::core::ffi::c_int = 8; +pub const SQLITE_STATUS_MALLOC_COUNT: ::core::ffi::c_int = 9; +pub const SQLITE_DBSTATUS_LOOKASIDE_USED: ::core::ffi::c_int = 0; +pub const SQLITE_DBSTATUS_CACHE_USED: ::core::ffi::c_int = 1; +pub const SQLITE_DBSTATUS_SCHEMA_USED: ::core::ffi::c_int = 2; +pub const SQLITE_DBSTATUS_STMT_USED: ::core::ffi::c_int = 3; +pub const SQLITE_DBSTATUS_LOOKASIDE_HIT: ::core::ffi::c_int = 4; +pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: ::core::ffi::c_int = 5; +pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: ::core::ffi::c_int = 6; +pub const SQLITE_DBSTATUS_CACHE_HIT: ::core::ffi::c_int = 7; +pub const SQLITE_DBSTATUS_CACHE_MISS: ::core::ffi::c_int = 8; +pub const SQLITE_DBSTATUS_CACHE_WRITE: ::core::ffi::c_int = 9; +pub const SQLITE_DBSTATUS_DEFERRED_FKS: ::core::ffi::c_int = 10; +pub const SQLITE_DBSTATUS_CACHE_USED_SHARED: ::core::ffi::c_int = 11; +pub const SQLITE_DBSTATUS_CACHE_SPILL: ::core::ffi::c_int = 12; +pub const SQLITE_DBSTATUS_MAX: ::core::ffi::c_int = 12; +pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: ::core::ffi::c_int = 1; +pub const SQLITE_STMTSTATUS_SORT: ::core::ffi::c_int = 2; +pub const SQLITE_STMTSTATUS_AUTOINDEX: ::core::ffi::c_int = 3; +pub const SQLITE_STMTSTATUS_VM_STEP: ::core::ffi::c_int = 4; +pub const SQLITE_STMTSTATUS_REPREPARE: ::core::ffi::c_int = 5; +pub const SQLITE_STMTSTATUS_RUN: ::core::ffi::c_int = 6; +pub const SQLITE_STMTSTATUS_FILTER_MISS: ::core::ffi::c_int = 7; +pub const SQLITE_STMTSTATUS_FILTER_HIT: ::core::ffi::c_int = 8; +pub const SQLITE_STMTSTATUS_MEMUSED: ::core::ffi::c_int = 99; +pub const SQLITE_CHECKPOINT_PASSIVE: ::core::ffi::c_int = 0; +pub const SQLITE_CHECKPOINT_FULL: ::core::ffi::c_int = 1; +pub const SQLITE_CHECKPOINT_RESTART: ::core::ffi::c_int = 2; +pub const SQLITE_CHECKPOINT_TRUNCATE: ::core::ffi::c_int = 3; +pub const SQLITE_VTAB_CONSTRAINT_SUPPORT: ::core::ffi::c_int = 1; +pub const SQLITE_VTAB_INNOCUOUS: ::core::ffi::c_int = 2; +pub const SQLITE_VTAB_DIRECTONLY: ::core::ffi::c_int = 3; +pub const SQLITE_VTAB_USES_ALL_SCHEMAS: ::core::ffi::c_int = 4; +pub const SQLITE_ROLLBACK: ::core::ffi::c_int = 1; +pub const SQLITE_FAIL: ::core::ffi::c_int = 3; +pub const SQLITE_REPLACE: ::core::ffi::c_int = 5; +pub const SQLITE_SCANSTAT_NLOOP: ::core::ffi::c_int = 0; +pub const SQLITE_SCANSTAT_NVISIT: ::core::ffi::c_int = 1; +pub const SQLITE_SCANSTAT_EST: ::core::ffi::c_int = 2; +pub const SQLITE_SCANSTAT_NAME: ::core::ffi::c_int = 3; +pub const SQLITE_SCANSTAT_EXPLAIN: ::core::ffi::c_int = 4; +pub const SQLITE_SCANSTAT_SELECTID: ::core::ffi::c_int = 5; +pub const SQLITE_SCANSTAT_PARENTID: ::core::ffi::c_int = 6; +pub const SQLITE_SCANSTAT_NCYCLE: ::core::ffi::c_int = 7; +pub const SQLITE_SCANSTAT_COMPLEX: ::core::ffi::c_int = 1; +pub const SQLITE_SERIALIZE_NOCOPY: ::core::ffi::c_int = 1; +pub const SQLITE_DESERIALIZE_FREEONCLOSE: ::core::ffi::c_int = 1; +pub const SQLITE_DESERIALIZE_RESIZEABLE: ::core::ffi::c_int = 2; +pub const SQLITE_DESERIALIZE_READONLY: ::core::ffi::c_int = 4; +pub const NOT_WITHIN: ::core::ffi::c_int = 0; +pub const PARTLY_WITHIN: ::core::ffi::c_int = 1; +pub const FULLY_WITHIN: ::core::ffi::c_int = 2; +pub const FTS5_TOKENIZE_QUERY: ::core::ffi::c_int = 1; +pub const FTS5_TOKENIZE_PREFIX: ::core::ffi::c_int = 2; +pub const FTS5_TOKENIZE_DOCUMENT: ::core::ffi::c_int = 4; +pub const FTS5_TOKENIZE_AUX: ::core::ffi::c_int = 8; +pub const FTS5_TOKEN_COLOCATED: ::core::ffi::c_int = 1; +pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +extern "C" { + pub static sqlite3_version: [::core::ffi::c_char; 0usize]; +} +extern "C" { + pub fn sqlite3_libversion() -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_sourceid() -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_libversion_number() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_compileoption_used(zOptName: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_compileoption_get(N: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_threadsafe() -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3 { + _unused: [u8; 0], +} +pub type sqlite_int64 = ::core::ffi::c_longlong; +pub type sqlite_uint64 = ::core::ffi::c_ulonglong; +pub type sqlite3_int64 = sqlite_int64; +pub type sqlite3_uint64 = sqlite_uint64; +extern "C" { + pub fn sqlite3_close(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_close_v2(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +pub type sqlite3_callback = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *mut *mut ::core::ffi::c_char, + arg4: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, +>; +extern "C" { + pub fn sqlite3_exec( + arg1: *mut sqlite3, + sql: *const ::core::ffi::c_char, + callback: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *mut *mut ::core::ffi::c_char, + arg4: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + arg2: *mut ::core::ffi::c_void, + errmsg: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_file { + pub pMethods: *const sqlite3_io_methods, +} +#[test] +fn bindgen_test_layout_sqlite3_file() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(sqlite3_file)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_file)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pMethods) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_file), + "::", + stringify!(pMethods) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_io_methods { + pub iVersion: ::core::ffi::c_int, + pub xClose: + ::core::option::Option ::core::ffi::c_int>, + pub xRead: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + arg2: *mut ::core::ffi::c_void, + iAmt: ::core::ffi::c_int, + iOfst: sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xWrite: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + arg2: *const ::core::ffi::c_void, + iAmt: ::core::ffi::c_int, + iOfst: sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xTruncate: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_file, size: sqlite3_int64) -> ::core::ffi::c_int, + >, + pub xSync: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xFileSize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + pSize: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xLock: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xUnlock: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xCheckReservedLock: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + pResOut: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xFileControl: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + op: ::core::ffi::c_int, + pArg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + pub xSectorSize: + ::core::option::Option ::core::ffi::c_int>, + pub xDeviceCharacteristics: + ::core::option::Option ::core::ffi::c_int>, + pub xShmMap: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + iPg: ::core::ffi::c_int, + pgsz: ::core::ffi::c_int, + arg2: ::core::ffi::c_int, + arg3: *mut *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + pub xShmLock: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + offset: ::core::ffi::c_int, + n: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xShmBarrier: ::core::option::Option, + pub xShmUnmap: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + deleteFlag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xFetch: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + iOfst: sqlite3_int64, + iAmt: ::core::ffi::c_int, + pp: *mut *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + pub xUnfetch: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_file, + iOfst: sqlite3_int64, + p: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_sqlite3_io_methods() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 152usize, + concat!("Size of: ", stringify!(sqlite3_io_methods)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_io_methods)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xClose) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xClose) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRead) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xRead) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xWrite) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xWrite) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xTruncate) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xTruncate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSync) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xSync) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFileSize) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xFileSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xLock) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xLock) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUnlock) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xUnlock) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCheckReservedLock) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xCheckReservedLock) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFileControl) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xFileControl) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSectorSize) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xSectorSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDeviceCharacteristics) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xDeviceCharacteristics) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShmMap) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xShmMap) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShmLock) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xShmLock) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShmBarrier) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xShmBarrier) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShmUnmap) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xShmUnmap) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFetch) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xFetch) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUnfetch) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_io_methods), + "::", + stringify!(xUnfetch) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_mutex { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_api_routines { + _unused: [u8; 0], +} +pub type sqlite3_filename = *const ::core::ffi::c_char; +pub type sqlite3_syscall_ptr = ::core::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_vfs { + pub iVersion: ::core::ffi::c_int, + pub szOsFile: ::core::ffi::c_int, + pub mxPathname: ::core::ffi::c_int, + pub pNext: *mut sqlite3_vfs, + pub zName: *const ::core::ffi::c_char, + pub pAppData: *mut ::core::ffi::c_void, + pub xOpen: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: sqlite3_filename, + arg2: *mut sqlite3_file, + flags: ::core::ffi::c_int, + pOutFlags: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xDelete: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + syncDir: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xAccess: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + flags: ::core::ffi::c_int, + pResOut: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xFullPathname: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + nOut: ::core::ffi::c_int, + zOut: *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xDlOpen: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zFilename: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void, + >, + pub xDlError: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + nByte: ::core::ffi::c_int, + zErrMsg: *mut ::core::ffi::c_char, + ), + >, + pub xDlSym: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + arg2: *mut ::core::ffi::c_void, + zSymbol: *const ::core::ffi::c_char, + ) -> ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + arg2: *mut ::core::ffi::c_void, + zSymbol: *const ::core::ffi::c_char, + ), + >, + >, + pub xDlClose: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut ::core::ffi::c_void), + >, + pub xRandomness: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + nByte: ::core::ffi::c_int, + zOut: *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xSleep: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + microseconds: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xCurrentTime: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut f64) -> ::core::ffi::c_int, + >, + pub xGetLastError: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xCurrentTimeInt64: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + arg2: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xSetSystemCall: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + arg2: sqlite3_syscall_ptr, + ) -> ::core::ffi::c_int, + >, + pub xGetSystemCall: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + ) -> sqlite3_syscall_ptr, + >, + pub xNextSystemCall: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vfs, + zName: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char, + >, +} +#[test] +fn bindgen_test_layout_sqlite3_vfs() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(sqlite3_vfs)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_vfs)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).szOsFile) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(szOsFile) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).mxPathname) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(mxPathname) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pNext) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(pNext) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).zName) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(zName) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pAppData) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(pAppData) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xOpen) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xOpen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDelete) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xDelete) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xAccess) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xAccess) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFullPathname) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xFullPathname) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDlOpen) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xDlOpen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDlError) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xDlError) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDlSym) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xDlSym) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDlClose) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xDlClose) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRandomness) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xRandomness) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSleep) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xSleep) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCurrentTime) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xCurrentTime) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xGetLastError) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xGetLastError) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCurrentTimeInt64) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xCurrentTimeInt64) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSetSystemCall) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xSetSystemCall) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xGetSystemCall) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xGetSystemCall) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xNextSystemCall) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vfs), + "::", + stringify!(xNextSystemCall) + ) + ); +} +extern "C" { + pub fn sqlite3_initialize() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_shutdown() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_os_init() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_os_end() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_config(arg1: ::core::ffi::c_int, ...) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_db_config(arg1: *mut sqlite3, op: ::core::ffi::c_int, ...) + -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_mem_methods { + pub xMalloc: ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int) -> *mut ::core::ffi::c_void, + >, + pub xFree: ::core::option::Option, + pub xRealloc: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void, + >, + pub xSize: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub xRoundup: ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int, + >, + pub xInit: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub xShutdown: ::core::option::Option, + pub pAppData: *mut ::core::ffi::c_void, +} +#[test] +fn bindgen_test_layout_sqlite3_mem_methods() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(sqlite3_mem_methods)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_mem_methods)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMalloc) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xMalloc) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFree) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xFree) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRealloc) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xRealloc) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSize) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRoundup) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xRoundup) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInit) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xInit) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShutdown) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(xShutdown) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pAppData) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mem_methods), + "::", + stringify!(pAppData) + ) + ); +} +extern "C" { + pub fn sqlite3_extended_result_codes( + arg1: *mut sqlite3, + onoff: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_last_insert_rowid(arg1: *mut sqlite3) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_set_last_insert_rowid(arg1: *mut sqlite3, arg2: sqlite3_int64); +} +extern "C" { + pub fn sqlite3_changes(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_changes64(arg1: *mut sqlite3) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_total_changes(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_total_changes64(arg1: *mut sqlite3) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_interrupt(arg1: *mut sqlite3); +} +extern "C" { + pub fn sqlite3_is_interrupted(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_complete(sql: *const ::core::ffi::c_char) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_complete16(sql: *const ::core::ffi::c_void) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_busy_handler( + arg1: *mut sqlite3, + arg2: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_busy_timeout(arg1: *mut sqlite3, ms: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_get_table( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_char, + pazResult: *mut *mut *mut ::core::ffi::c_char, + pnRow: *mut ::core::ffi::c_int, + pnColumn: *mut ::core::ffi::c_int, + pzErrmsg: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_free_table(result: *mut *mut ::core::ffi::c_char); +} +extern "C" { + pub fn sqlite3_mprintf(arg1: *const ::core::ffi::c_char, ...) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_vmprintf( + arg1: *const ::core::ffi::c_char, + arg2: *mut __va_list_tag, + ) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_snprintf( + arg1: ::core::ffi::c_int, + arg2: *mut ::core::ffi::c_char, + arg3: *const ::core::ffi::c_char, + ... + ) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_vsnprintf( + arg1: ::core::ffi::c_int, + arg2: *mut ::core::ffi::c_char, + arg3: *const ::core::ffi::c_char, + arg4: *mut __va_list_tag, + ) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_malloc(arg1: ::core::ffi::c_int) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_malloc64(arg1: sqlite3_uint64) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_realloc( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_realloc64( + arg1: *mut ::core::ffi::c_void, + arg2: sqlite3_uint64, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_free(arg1: *mut ::core::ffi::c_void); +} +extern "C" { + pub fn sqlite3_msize(arg1: *mut ::core::ffi::c_void) -> sqlite3_uint64; +} +extern "C" { + pub fn sqlite3_memory_used() -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_memory_highwater(resetFlag: ::core::ffi::c_int) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_randomness(N: ::core::ffi::c_int, P: *mut ::core::ffi::c_void); +} +extern "C" { + pub fn sqlite3_set_authorizer( + arg1: *mut sqlite3, + xAuth: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: *const ::core::ffi::c_char, + arg5: *const ::core::ffi::c_char, + arg6: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pUserData: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_trace( + arg1: *mut sqlite3, + xTrace: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void, arg2: *const ::core::ffi::c_char), + >, + arg2: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_profile( + arg1: *mut sqlite3, + xProfile: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + arg3: sqlite3_uint64, + ), + >, + arg2: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_trace_v2( + arg1: *mut sqlite3, + uMask: ::core::ffi::c_uint, + xCallback: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::core::ffi::c_uint, + arg2: *mut ::core::ffi::c_void, + arg3: *mut ::core::ffi::c_void, + arg4: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + pCtx: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_progress_handler( + arg1: *mut sqlite3, + arg2: ::core::ffi::c_int, + arg3: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + arg4: *mut ::core::ffi::c_void, + ); +} +extern "C" { + pub fn sqlite3_open( + filename: *const ::core::ffi::c_char, + ppDb: *mut *mut sqlite3, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_open16( + filename: *const ::core::ffi::c_void, + ppDb: *mut *mut sqlite3, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_open_v2( + filename: *const ::core::ffi::c_char, + ppDb: *mut *mut sqlite3, + flags: ::core::ffi::c_int, + zVfs: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_uri_parameter( + z: sqlite3_filename, + zParam: *const ::core::ffi::c_char, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_uri_boolean( + z: sqlite3_filename, + zParam: *const ::core::ffi::c_char, + bDefault: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_uri_int64( + arg1: sqlite3_filename, + arg2: *const ::core::ffi::c_char, + arg3: sqlite3_int64, + ) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_uri_key( + z: sqlite3_filename, + N: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_filename_database(arg1: sqlite3_filename) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_filename_journal(arg1: sqlite3_filename) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_filename_wal(arg1: sqlite3_filename) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_database_file_object(arg1: *const ::core::ffi::c_char) -> *mut sqlite3_file; +} +extern "C" { + pub fn sqlite3_create_filename( + zDatabase: *const ::core::ffi::c_char, + zJournal: *const ::core::ffi::c_char, + zWal: *const ::core::ffi::c_char, + nParam: ::core::ffi::c_int, + azParam: *mut *const ::core::ffi::c_char, + ) -> sqlite3_filename; +} +extern "C" { + pub fn sqlite3_free_filename(arg1: sqlite3_filename); +} +extern "C" { + pub fn sqlite3_errcode(db: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_extended_errcode(db: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_errmsg(arg1: *mut sqlite3) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_errmsg16(arg1: *mut sqlite3) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_errstr(arg1: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_error_offset(db: *mut sqlite3) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_stmt { + _unused: [u8; 0], +} +extern "C" { + pub fn sqlite3_limit( + arg1: *mut sqlite3, + id: ::core::ffi::c_int, + newVal: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_char, + nByte: ::core::ffi::c_int, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare_v2( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_char, + nByte: ::core::ffi::c_int, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare_v3( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_char, + nByte: ::core::ffi::c_int, + prepFlags: ::core::ffi::c_uint, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare16( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_void, + nByte: ::core::ffi::c_int, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare16_v2( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_void, + nByte: ::core::ffi::c_int, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_prepare16_v3( + db: *mut sqlite3, + zSql: *const ::core::ffi::c_void, + nByte: ::core::ffi::c_int, + prepFlags: ::core::ffi::c_uint, + ppStmt: *mut *mut sqlite3_stmt, + pzTail: *mut *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_sql(pStmt: *mut sqlite3_stmt) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_expanded_sql(pStmt: *mut sqlite3_stmt) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_stmt_readonly(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_isexplain(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_explain( + pStmt: *mut sqlite3_stmt, + eMode: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_busy(arg1: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_value { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_context { + _unused: [u8; 0], +} +extern "C" { + pub fn sqlite3_bind_blob( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + n: ::core::ffi::c_int, + arg4: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_blob64( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + arg4: sqlite3_uint64, + arg5: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_double( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: f64, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_int( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_int64( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: sqlite3_int64, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_null( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_text( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + arg5: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_text16( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + arg4: ::core::ffi::c_int, + arg5: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_text64( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: sqlite3_uint64, + arg5: ::core::option::Option, + encoding: ::core::ffi::c_uchar, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_value( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *const sqlite3_value, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_pointer( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: *mut ::core::ffi::c_void, + arg4: *const ::core::ffi::c_char, + arg5: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_zeroblob( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + n: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_zeroblob64( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + arg3: sqlite3_uint64, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_parameter_count(arg1: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_bind_parameter_name( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_bind_parameter_index( + arg1: *mut sqlite3_stmt, + zName: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_clear_bindings(arg1: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_count(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_name( + arg1: *mut sqlite3_stmt, + N: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_column_name16( + arg1: *mut sqlite3_stmt, + N: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_database_name( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_column_database_name16( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_table_name( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_column_table_name16( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_origin_name( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_column_origin_name16( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_decltype( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_column_decltype16( + arg1: *mut sqlite3_stmt, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_step(arg1: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_data_count(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_blob( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_double(arg1: *mut sqlite3_stmt, iCol: ::core::ffi::c_int) -> f64; +} +extern "C" { + pub fn sqlite3_column_int( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_int64(arg1: *mut sqlite3_stmt, iCol: ::core::ffi::c_int) + -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_column_text( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_uchar; +} +extern "C" { + pub fn sqlite3_column_text16( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_column_value( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> *mut sqlite3_value; +} +extern "C" { + pub fn sqlite3_column_bytes( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_bytes16( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_column_type( + arg1: *mut sqlite3_stmt, + iCol: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_finalize(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_reset(pStmt: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_function( + db: *mut sqlite3, + zFunctionName: *const ::core::ffi::c_char, + nArg: ::core::ffi::c_int, + eTextRep: ::core::ffi::c_int, + pApp: *mut ::core::ffi::c_void, + xFunc: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xStep: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xFinal: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_function16( + db: *mut sqlite3, + zFunctionName: *const ::core::ffi::c_void, + nArg: ::core::ffi::c_int, + eTextRep: ::core::ffi::c_int, + pApp: *mut ::core::ffi::c_void, + xFunc: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xStep: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xFinal: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_function_v2( + db: *mut sqlite3, + zFunctionName: *const ::core::ffi::c_char, + nArg: ::core::ffi::c_int, + eTextRep: ::core::ffi::c_int, + pApp: *mut ::core::ffi::c_void, + xFunc: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xStep: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xFinal: ::core::option::Option, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_window_function( + db: *mut sqlite3, + zFunctionName: *const ::core::ffi::c_char, + nArg: ::core::ffi::c_int, + eTextRep: ::core::ffi::c_int, + pApp: *mut ::core::ffi::c_void, + xStep: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xFinal: ::core::option::Option, + xValue: ::core::option::Option, + xInverse: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_aggregate_count(arg1: *mut sqlite3_context) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_transfer_bindings( + arg1: *mut sqlite3_stmt, + arg2: *mut sqlite3_stmt, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_global_recover() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_thread_cleanup(); +} +extern "C" { + pub fn sqlite3_memory_alarm( + arg1: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: sqlite3_int64, + arg3: ::core::ffi::c_int, + ), + >, + arg2: *mut ::core::ffi::c_void, + arg3: sqlite3_int64, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_blob(arg1: *mut sqlite3_value) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_value_double(arg1: *mut sqlite3_value) -> f64; +} +extern "C" { + pub fn sqlite3_value_int(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_int64(arg1: *mut sqlite3_value) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_value_pointer( + arg1: *mut sqlite3_value, + arg2: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_value_text(arg1: *mut sqlite3_value) -> *const ::core::ffi::c_uchar; +} +extern "C" { + pub fn sqlite3_value_text16(arg1: *mut sqlite3_value) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_value_text16le(arg1: *mut sqlite3_value) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_value_text16be(arg1: *mut sqlite3_value) -> *const ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_value_bytes(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_bytes16(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_type(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_numeric_type(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_nochange(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_frombind(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_encoding(arg1: *mut sqlite3_value) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_value_subtype(arg1: *mut sqlite3_value) -> ::core::ffi::c_uint; +} +extern "C" { + pub fn sqlite3_value_dup(arg1: *const sqlite3_value) -> *mut sqlite3_value; +} +extern "C" { + pub fn sqlite3_value_free(arg1: *mut sqlite3_value); +} +extern "C" { + pub fn sqlite3_aggregate_context( + arg1: *mut sqlite3_context, + nBytes: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_user_data(arg1: *mut sqlite3_context) -> *mut ::core::ffi::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: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_set_auxdata( + arg1: *mut sqlite3_context, + N: ::core::ffi::c_int, + arg2: *mut ::core::ffi::c_void, + arg3: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_get_clientdata( + arg1: *mut sqlite3, + arg2: *const ::core::ffi::c_char, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_set_clientdata( + arg1: *mut sqlite3, + arg2: *const ::core::ffi::c_char, + arg3: *mut ::core::ffi::c_void, + arg4: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +pub type sqlite3_destructor_type = + ::core::option::Option; +extern "C" { + pub fn sqlite3_result_blob( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: ::core::ffi::c_int, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_blob64( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: sqlite3_uint64, + arg4: ::core::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 ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ); +} +extern "C" { + pub fn sqlite3_result_error16( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: ::core::ffi::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: ::core::ffi::c_int); +} +extern "C" { + pub fn sqlite3_result_int(arg1: *mut sqlite3_context, arg2: ::core::ffi::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 ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_text64( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_char, + arg3: sqlite3_uint64, + arg4: ::core::option::Option, + encoding: ::core::ffi::c_uchar, + ); +} +extern "C" { + pub fn sqlite3_result_text16( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: ::core::ffi::c_int, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_text16le( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: ::core::ffi::c_int, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_text16be( + arg1: *mut sqlite3_context, + arg2: *const ::core::ffi::c_void, + arg3: ::core::ffi::c_int, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_value(arg1: *mut sqlite3_context, arg2: *mut sqlite3_value); +} +extern "C" { + pub fn sqlite3_result_pointer( + arg1: *mut sqlite3_context, + arg2: *mut ::core::ffi::c_void, + arg3: *const ::core::ffi::c_char, + arg4: ::core::option::Option, + ); +} +extern "C" { + pub fn sqlite3_result_zeroblob(arg1: *mut sqlite3_context, n: ::core::ffi::c_int); +} +extern "C" { + pub fn sqlite3_result_zeroblob64( + arg1: *mut sqlite3_context, + n: sqlite3_uint64, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_result_subtype(arg1: *mut sqlite3_context, arg2: ::core::ffi::c_uint); +} +extern "C" { + pub fn sqlite3_create_collation( + arg1: *mut sqlite3, + zName: *const ::core::ffi::c_char, + eTextRep: ::core::ffi::c_int, + pArg: *mut ::core::ffi::c_void, + xCompare: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + arg4: ::core::ffi::c_int, + arg5: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_collation_v2( + arg1: *mut sqlite3, + zName: *const ::core::ffi::c_char, + eTextRep: ::core::ffi::c_int, + pArg: *mut ::core::ffi::c_void, + xCompare: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + arg4: ::core::ffi::c_int, + arg5: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_collation16( + arg1: *mut sqlite3, + zName: *const ::core::ffi::c_void, + eTextRep: ::core::ffi::c_int, + pArg: *mut ::core::ffi::c_void, + xCompare: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + arg4: ::core::ffi::c_int, + arg5: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_collation_needed( + arg1: *mut sqlite3, + arg2: *mut ::core::ffi::c_void, + arg3: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut sqlite3, + eTextRep: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + ), + >, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_collation_needed16( + arg1: *mut sqlite3, + arg2: *mut ::core::ffi::c_void, + arg3: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut sqlite3, + eTextRep: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_void, + ), + >, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_sleep(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +extern "C" { + pub static mut sqlite3_temp_directory: *mut ::core::ffi::c_char; +} +extern "C" { + pub static mut sqlite3_data_directory: *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_win32_set_directory( + type_: ::core::ffi::c_ulong, + zValue: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_win32_set_directory8( + type_: ::core::ffi::c_ulong, + zValue: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_win32_set_directory16( + type_: ::core::ffi::c_ulong, + zValue: *const ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_get_autocommit(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_db_handle(arg1: *mut sqlite3_stmt) -> *mut sqlite3; +} +extern "C" { + pub fn sqlite3_db_name(db: *mut sqlite3, N: ::core::ffi::c_int) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_db_filename( + db: *mut sqlite3, + zDbName: *const ::core::ffi::c_char, + ) -> sqlite3_filename; +} +extern "C" { + pub fn sqlite3_db_readonly( + db: *mut sqlite3, + zDbName: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_txn_state( + arg1: *mut sqlite3, + zSchema: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +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: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + arg3: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_rollback_hook( + arg1: *mut sqlite3, + arg2: ::core::option::Option, + arg3: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_autovacuum_pages( + db: *mut sqlite3, + arg1: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_uint, + arg4: ::core::ffi::c_uint, + arg5: ::core::ffi::c_uint, + ) -> ::core::ffi::c_uint, + >, + arg2: *mut ::core::ffi::c_void, + arg3: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_update_hook( + arg1: *mut sqlite3, + arg2: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: *const ::core::ffi::c_char, + arg5: sqlite3_int64, + ), + >, + arg3: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_enable_shared_cache(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_release_memory(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_db_release_memory(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_soft_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_hard_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; +} +extern "C" { + pub fn sqlite3_soft_heap_limit(N: ::core::ffi::c_int); +} +extern "C" { + pub fn sqlite3_table_column_metadata( + db: *mut sqlite3, + zDbName: *const ::core::ffi::c_char, + zTableName: *const ::core::ffi::c_char, + zColumnName: *const ::core::ffi::c_char, + pzDataType: *mut *const ::core::ffi::c_char, + pzCollSeq: *mut *const ::core::ffi::c_char, + pNotNull: *mut ::core::ffi::c_int, + pPrimaryKey: *mut ::core::ffi::c_int, + pAutoinc: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_load_extension( + db: *mut sqlite3, + zFile: *const ::core::ffi::c_char, + zProc: *const ::core::ffi::c_char, + pzErrMsg: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_enable_load_extension( + db: *mut sqlite3, + onoff: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_auto_extension( + xEntryPoint: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_cancel_auto_extension( + xEntryPoint: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_reset_auto_extension(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_module { + pub iVersion: ::core::ffi::c_int, + pub xCreate: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + pAux: *mut ::core::ffi::c_void, + argc: ::core::ffi::c_int, + argv: *const *const ::core::ffi::c_char, + ppVTab: *mut *mut sqlite3_vtab, + arg2: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xConnect: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + pAux: *mut ::core::ffi::c_void, + argc: ::core::ffi::c_int, + argv: *const *const ::core::ffi::c_char, + ppVTab: *mut *mut sqlite3_vtab, + arg2: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xBestIndex: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + arg1: *mut sqlite3_index_info, + ) -> ::core::ffi::c_int, + >, + pub xDisconnect: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xDestroy: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xOpen: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + ppCursor: *mut *mut sqlite3_vtab_cursor, + ) -> ::core::ffi::c_int, + >, + pub xClose: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::core::ffi::c_int, + >, + pub xFilter: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vtab_cursor, + idxNum: ::core::ffi::c_int, + idxStr: *const ::core::ffi::c_char, + argc: ::core::ffi::c_int, + argv: *mut *mut sqlite3_value, + ) -> ::core::ffi::c_int, + >, + pub xNext: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::core::ffi::c_int, + >, + pub xEof: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::core::ffi::c_int, + >, + pub xColumn: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vtab_cursor, + arg2: *mut sqlite3_context, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xRowid: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vtab_cursor, + pRowid: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xUpdate: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_vtab, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + arg4: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xBegin: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xSync: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xCommit: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xRollback: ::core::option::Option< + unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::core::ffi::c_int, + >, + pub xFindFunction: ::core::option::Option< + unsafe extern "C" fn( + pVtab: *mut sqlite3_vtab, + nArg: ::core::ffi::c_int, + zName: *const ::core::ffi::c_char, + pxFunc: *mut ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_context, + arg2: ::core::ffi::c_int, + arg3: *mut *mut sqlite3_value, + ), + >, + ppArg: *mut *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + pub xRename: ::core::option::Option< + unsafe extern "C" fn( + pVtab: *mut sqlite3_vtab, + zNew: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, + pub xSavepoint: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + arg1: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xRelease: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + arg1: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xRollbackTo: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + arg1: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xShadowName: ::core::option::Option< + unsafe extern "C" fn(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int, + >, + pub xIntegrity: ::core::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + zSchema: *const ::core::ffi::c_char, + zTabName: *const ::core::ffi::c_char, + mFlags: ::core::ffi::c_int, + pzErr: *mut *mut ::core::ffi::c_char, + ) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_sqlite3_module() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 200usize, + concat!("Size of: ", stringify!(sqlite3_module)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_module)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreate) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xCreate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xConnect) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xConnect) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xBestIndex) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xBestIndex) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDisconnect) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xDisconnect) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDestroy) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xDestroy) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xOpen) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xOpen) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xClose) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xClose) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFilter) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xFilter) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xNext) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xNext) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xEof) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xEof) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xColumn) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xColumn) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRowid) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xRowid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUpdate) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xUpdate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xBegin) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xBegin) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSync) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xSync) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCommit) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xCommit) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRollback) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xRollback) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFindFunction) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xFindFunction) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRename) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xRename) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSavepoint) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xSavepoint) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRelease) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xRelease) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRollbackTo) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xRollbackTo) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShadowName) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xShadowName) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xIntegrity) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_module), + "::", + stringify!(xIntegrity) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_index_info { + pub nConstraint: ::core::ffi::c_int, + pub aConstraint: *mut sqlite3_index_info_sqlite3_index_constraint, + pub nOrderBy: ::core::ffi::c_int, + pub aOrderBy: *mut sqlite3_index_info_sqlite3_index_orderby, + pub aConstraintUsage: *mut sqlite3_index_info_sqlite3_index_constraint_usage, + pub idxNum: ::core::ffi::c_int, + pub idxStr: *mut ::core::ffi::c_char, + pub needToFreeIdxStr: ::core::ffi::c_int, + pub orderByConsumed: ::core::ffi::c_int, + pub estimatedCost: f64, + pub estimatedRows: sqlite3_int64, + pub idxFlags: ::core::ffi::c_int, + pub colUsed: sqlite3_uint64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_index_info_sqlite3_index_constraint { + pub iColumn: ::core::ffi::c_int, + pub op: ::core::ffi::c_uchar, + pub usable: ::core::ffi::c_uchar, + pub iTermOffset: ::core::ffi::c_int, +} +#[test] +fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_constraint() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 12usize, + concat!( + "Size of: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(sqlite3_index_info_sqlite3_index_constraint) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iColumn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint), + "::", + stringify!(iColumn) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint), + "::", + stringify!(op) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).usable) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint), + "::", + stringify!(usable) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iTermOffset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint), + "::", + stringify!(iTermOffset) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_index_info_sqlite3_index_orderby { + pub iColumn: ::core::ffi::c_int, + pub desc: ::core::ffi::c_uchar, +} +#[test] +fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_orderby() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(sqlite3_index_info_sqlite3_index_orderby) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(sqlite3_index_info_sqlite3_index_orderby) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iColumn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_orderby), + "::", + stringify!(iColumn) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_orderby), + "::", + stringify!(desc) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_index_info_sqlite3_index_constraint_usage { + pub argvIndex: ::core::ffi::c_int, + pub omit: ::core::ffi::c_uchar, +} +#[test] +fn bindgen_test_layout_sqlite3_index_info_sqlite3_index_constraint_usage() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint_usage) + ) + ); + assert_eq!( + ::core::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(sqlite3_index_info_sqlite3_index_constraint_usage) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).argvIndex) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint_usage), + "::", + stringify!(argvIndex) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).omit) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info_sqlite3_index_constraint_usage), + "::", + stringify!(omit) + ) + ); +} +#[test] +fn bindgen_test_layout_sqlite3_index_info() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 96usize, + concat!("Size of: ", stringify!(sqlite3_index_info)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_index_info)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nConstraint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(nConstraint) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aConstraint) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(aConstraint) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nOrderBy) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(nOrderBy) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aOrderBy) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(aOrderBy) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aConstraintUsage) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(aConstraintUsage) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).idxNum) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(idxNum) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).idxStr) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(idxStr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).needToFreeIdxStr) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(needToFreeIdxStr) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).orderByConsumed) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(orderByConsumed) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).estimatedCost) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(estimatedCost) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).estimatedRows) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(estimatedRows) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).idxFlags) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(idxFlags) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).colUsed) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_index_info), + "::", + stringify!(colUsed) + ) + ); +} +extern "C" { + pub fn sqlite3_create_module( + db: *mut sqlite3, + zName: *const ::core::ffi::c_char, + p: *const sqlite3_module, + pClientData: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_create_module_v2( + db: *mut sqlite3, + zName: *const ::core::ffi::c_char, + p: *const sqlite3_module, + pClientData: *mut ::core::ffi::c_void, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_drop_modules( + db: *mut sqlite3, + azKeep: *mut *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_vtab { + pub pModule: *const sqlite3_module, + pub nRef: ::core::ffi::c_int, + pub zErrMsg: *mut ::core::ffi::c_char, +} +#[test] +fn bindgen_test_layout_sqlite3_vtab() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(sqlite3_vtab)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_vtab)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pModule) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vtab), + "::", + stringify!(pModule) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nRef) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vtab), + "::", + stringify!(nRef) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).zErrMsg) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vtab), + "::", + stringify!(zErrMsg) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_vtab_cursor { + pub pVtab: *mut sqlite3_vtab, +} +#[test] +fn bindgen_test_layout_sqlite3_vtab_cursor() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(sqlite3_vtab_cursor)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_vtab_cursor)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pVtab) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_vtab_cursor), + "::", + stringify!(pVtab) + ) + ); +} +extern "C" { + pub fn sqlite3_declare_vtab( + arg1: *mut sqlite3, + zSQL: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_overload_function( + arg1: *mut sqlite3, + zFuncName: *const ::core::ffi::c_char, + nArg: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_blob { + _unused: [u8; 0], +} +extern "C" { + pub fn sqlite3_blob_open( + arg1: *mut sqlite3, + zDb: *const ::core::ffi::c_char, + zTable: *const ::core::ffi::c_char, + zColumn: *const ::core::ffi::c_char, + iRow: sqlite3_int64, + flags: ::core::ffi::c_int, + ppBlob: *mut *mut sqlite3_blob, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_blob_reopen(arg1: *mut sqlite3_blob, arg2: sqlite3_int64) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_blob_close(arg1: *mut sqlite3_blob) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_blob_bytes(arg1: *mut sqlite3_blob) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_blob_read( + arg1: *mut sqlite3_blob, + Z: *mut ::core::ffi::c_void, + N: ::core::ffi::c_int, + iOffset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_blob_write( + arg1: *mut sqlite3_blob, + z: *const ::core::ffi::c_void, + n: ::core::ffi::c_int, + iOffset: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vfs_find(zVfsName: *const ::core::ffi::c_char) -> *mut sqlite3_vfs; +} +extern "C" { + pub fn sqlite3_vfs_register( + arg1: *mut sqlite3_vfs, + makeDflt: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vfs_unregister(arg1: *mut sqlite3_vfs) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_mutex_alloc(arg1: ::core::ffi::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) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_mutex_leave(arg1: *mut sqlite3_mutex); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_mutex_methods { + pub xMutexInit: ::core::option::Option ::core::ffi::c_int>, + pub xMutexEnd: ::core::option::Option ::core::ffi::c_int>, + pub xMutexAlloc: ::core::option::Option< + unsafe extern "C" fn(arg1: ::core::ffi::c_int) -> *mut sqlite3_mutex, + >, + pub xMutexFree: ::core::option::Option, + pub xMutexEnter: ::core::option::Option, + pub xMutexTry: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::core::ffi::c_int, + >, + pub xMutexLeave: ::core::option::Option, + pub xMutexHeld: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::core::ffi::c_int, + >, + pub xMutexNotheld: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_sqlite3_mutex_methods() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(sqlite3_mutex_methods)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_mutex_methods)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexInit) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexInit) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexEnd) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexEnd) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexAlloc) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexAlloc) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexFree) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexFree) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexEnter) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexEnter) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexTry) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexTry) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexLeave) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexLeave) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexHeld) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexHeld) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xMutexNotheld) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_mutex_methods), + "::", + stringify!(xMutexNotheld) + ) + ); +} +extern "C" { + pub fn sqlite3_mutex_held(arg1: *mut sqlite3_mutex) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_mutex_notheld(arg1: *mut sqlite3_mutex) -> ::core::ffi::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 ::core::ffi::c_char, + op: ::core::ffi::c_int, + arg2: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_test_control(op: ::core::ffi::c_int, ...) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_keyword_count() -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_keyword_name( + arg1: ::core::ffi::c_int, + arg2: *mut *const ::core::ffi::c_char, + arg3: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_keyword_check( + arg1: *const ::core::ffi::c_char, + arg2: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_str { + _unused: [u8; 0], +} +extern "C" { + pub fn sqlite3_str_new(arg1: *mut sqlite3) -> *mut sqlite3_str; +} +extern "C" { + pub fn sqlite3_str_finish(arg1: *mut sqlite3_str) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_str_appendf(arg1: *mut sqlite3_str, zFormat: *const ::core::ffi::c_char, ...); +} +extern "C" { + pub fn sqlite3_str_vappendf( + arg1: *mut sqlite3_str, + zFormat: *const ::core::ffi::c_char, + arg2: *mut __va_list_tag, + ); +} +extern "C" { + pub fn sqlite3_str_append( + arg1: *mut sqlite3_str, + zIn: *const ::core::ffi::c_char, + N: ::core::ffi::c_int, + ); +} +extern "C" { + pub fn sqlite3_str_appendall(arg1: *mut sqlite3_str, zIn: *const ::core::ffi::c_char); +} +extern "C" { + pub fn sqlite3_str_appendchar( + arg1: *mut sqlite3_str, + N: ::core::ffi::c_int, + C: ::core::ffi::c_char, + ); +} +extern "C" { + pub fn sqlite3_str_reset(arg1: *mut sqlite3_str); +} +extern "C" { + pub fn sqlite3_str_errcode(arg1: *mut sqlite3_str) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_str_length(arg1: *mut sqlite3_str) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_str_value(arg1: *mut sqlite3_str) -> *mut ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_status( + op: ::core::ffi::c_int, + pCurrent: *mut ::core::ffi::c_int, + pHighwater: *mut ::core::ffi::c_int, + resetFlag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_status64( + op: ::core::ffi::c_int, + pCurrent: *mut sqlite3_int64, + pHighwater: *mut sqlite3_int64, + resetFlag: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_db_status( + arg1: *mut sqlite3, + op: ::core::ffi::c_int, + pCur: *mut ::core::ffi::c_int, + pHiwtr: *mut ::core::ffi::c_int, + resetFlg: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_status( + arg1: *mut sqlite3_stmt, + op: ::core::ffi::c_int, + resetFlg: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_pcache { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_pcache_page { + pub pBuf: *mut ::core::ffi::c_void, + pub pExtra: *mut ::core::ffi::c_void, +} +#[test] +fn bindgen_test_layout_sqlite3_pcache_page() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(sqlite3_pcache_page)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_pcache_page)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pBuf) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_page), + "::", + stringify!(pBuf) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_page), + "::", + stringify!(pExtra) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_pcache_methods2 { + pub iVersion: ::core::ffi::c_int, + pub pArg: *mut ::core::ffi::c_void, + pub xInit: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub xShutdown: ::core::option::Option, + pub xCreate: ::core::option::Option< + unsafe extern "C" fn( + szPage: ::core::ffi::c_int, + szExtra: ::core::ffi::c_int, + bPurgeable: ::core::ffi::c_int, + ) -> *mut sqlite3_pcache, + >, + pub xCachesize: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::core::ffi::c_int), + >, + pub xPagecount: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::core::ffi::c_int, + >, + pub xFetch: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + key: ::core::ffi::c_uint, + createFlag: ::core::ffi::c_int, + ) -> *mut sqlite3_pcache_page, + >, + pub xUnpin: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + arg2: *mut sqlite3_pcache_page, + discard: ::core::ffi::c_int, + ), + >, + pub xRekey: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + arg2: *mut sqlite3_pcache_page, + oldKey: ::core::ffi::c_uint, + newKey: ::core::ffi::c_uint, + ), + >, + pub xTruncate: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::core::ffi::c_uint), + >, + pub xDestroy: ::core::option::Option, + pub xShrink: ::core::option::Option, +} +#[test] +fn bindgen_test_layout_sqlite3_pcache_methods2() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(sqlite3_pcache_methods2)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_pcache_methods2)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pArg) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(pArg) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInit) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xInit) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShutdown) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xShutdown) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreate) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xCreate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCachesize) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xCachesize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPagecount) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xPagecount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFetch) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xFetch) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUnpin) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xUnpin) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRekey) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xRekey) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xTruncate) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xTruncate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDestroy) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xDestroy) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShrink) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods2), + "::", + stringify!(xShrink) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_pcache_methods { + pub pArg: *mut ::core::ffi::c_void, + pub xInit: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> ::core::ffi::c_int, + >, + pub xShutdown: ::core::option::Option, + pub xCreate: ::core::option::Option< + unsafe extern "C" fn( + szPage: ::core::ffi::c_int, + bPurgeable: ::core::ffi::c_int, + ) -> *mut sqlite3_pcache, + >, + pub xCachesize: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::core::ffi::c_int), + >, + pub xPagecount: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::core::ffi::c_int, + >, + pub xFetch: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + key: ::core::ffi::c_uint, + createFlag: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void, + >, + pub xUnpin: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + arg2: *mut ::core::ffi::c_void, + discard: ::core::ffi::c_int, + ), + >, + pub xRekey: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_pcache, + arg2: *mut ::core::ffi::c_void, + oldKey: ::core::ffi::c_uint, + newKey: ::core::ffi::c_uint, + ), + >, + pub xTruncate: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::core::ffi::c_uint), + >, + pub xDestroy: ::core::option::Option, +} +#[test] +fn bindgen_test_layout_sqlite3_pcache_methods() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(sqlite3_pcache_methods)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_pcache_methods)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pArg) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(pArg) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInit) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xInit) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xShutdown) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xShutdown) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreate) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xCreate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCachesize) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xCachesize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPagecount) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xPagecount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFetch) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xFetch) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUnpin) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xUnpin) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRekey) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xRekey) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xTruncate) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xTruncate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDestroy) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_pcache_methods), + "::", + stringify!(xDestroy) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_backup { + _unused: [u8; 0], +} +extern "C" { + pub fn sqlite3_backup_init( + pDest: *mut sqlite3, + zDestName: *const ::core::ffi::c_char, + pSource: *mut sqlite3, + zSourceName: *const ::core::ffi::c_char, + ) -> *mut sqlite3_backup; +} +extern "C" { + pub fn sqlite3_backup_step( + p: *mut sqlite3_backup, + nPage: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_unlock_notify( + pBlocked: *mut sqlite3, + xNotify: ::core::option::Option< + unsafe extern "C" fn(apArg: *mut *mut ::core::ffi::c_void, nArg: ::core::ffi::c_int), + >, + pNotifyArg: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stricmp( + arg1: *const ::core::ffi::c_char, + arg2: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_strnicmp( + arg1: *const ::core::ffi::c_char, + arg2: *const ::core::ffi::c_char, + arg3: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_strglob( + zGlob: *const ::core::ffi::c_char, + zStr: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_strlike( + zGlob: *const ::core::ffi::c_char, + zStr: *const ::core::ffi::c_char, + cEsc: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_log(iErrCode: ::core::ffi::c_int, zFormat: *const ::core::ffi::c_char, ...); +} +extern "C" { + pub fn sqlite3_wal_hook( + arg1: *mut sqlite3, + arg2: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: *mut sqlite3, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + arg3: *mut ::core::ffi::c_void, + ) -> *mut ::core::ffi::c_void; +} +extern "C" { + pub fn sqlite3_wal_autocheckpoint( + db: *mut sqlite3, + N: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_wal_checkpoint( + db: *mut sqlite3, + zDb: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_wal_checkpoint_v2( + db: *mut sqlite3, + zDb: *const ::core::ffi::c_char, + eMode: ::core::ffi::c_int, + pnLog: *mut ::core::ffi::c_int, + pnCkpt: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_config( + arg1: *mut sqlite3, + op: ::core::ffi::c_int, + ... + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_on_conflict(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_nochange(arg1: *mut sqlite3_context) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_collation( + arg1: *mut sqlite3_index_info, + arg2: ::core::ffi::c_int, + ) -> *const ::core::ffi::c_char; +} +extern "C" { + pub fn sqlite3_vtab_distinct(arg1: *mut sqlite3_index_info) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_in( + arg1: *mut sqlite3_index_info, + iCons: ::core::ffi::c_int, + bHandle: ::core::ffi::c_int, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_in_first( + pVal: *mut sqlite3_value, + ppOut: *mut *mut sqlite3_value, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_in_next( + pVal: *mut sqlite3_value, + ppOut: *mut *mut sqlite3_value, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_vtab_rhs_value( + arg1: *mut sqlite3_index_info, + arg2: ::core::ffi::c_int, + ppVal: *mut *mut sqlite3_value, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_scanstatus( + pStmt: *mut sqlite3_stmt, + idx: ::core::ffi::c_int, + iScanStatusOp: ::core::ffi::c_int, + pOut: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_scanstatus_v2( + pStmt: *mut sqlite3_stmt, + idx: ::core::ffi::c_int, + iScanStatusOp: ::core::ffi::c_int, + flags: ::core::ffi::c_int, + pOut: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_stmt_scanstatus_reset(arg1: *mut sqlite3_stmt); +} +extern "C" { + pub fn sqlite3_db_cacheflush(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_system_errno(arg1: *mut sqlite3) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_snapshot { + pub hidden: [::core::ffi::c_uchar; 48usize], +} +#[test] +fn bindgen_test_layout_sqlite3_snapshot() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(sqlite3_snapshot)) + ); + assert_eq!( + ::core::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(sqlite3_snapshot)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).hidden) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_snapshot), + "::", + stringify!(hidden) + ) + ); +} +extern "C" { + pub fn sqlite3_snapshot_get( + db: *mut sqlite3, + zSchema: *const ::core::ffi::c_char, + ppSnapshot: *mut *mut sqlite3_snapshot, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_snapshot_open( + db: *mut sqlite3, + zSchema: *const ::core::ffi::c_char, + pSnapshot: *mut sqlite3_snapshot, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_snapshot_free(arg1: *mut sqlite3_snapshot); +} +extern "C" { + pub fn sqlite3_snapshot_cmp( + p1: *mut sqlite3_snapshot, + p2: *mut sqlite3_snapshot, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_snapshot_recover( + db: *mut sqlite3, + zDb: *const ::core::ffi::c_char, + ) -> ::core::ffi::c_int; +} +extern "C" { + pub fn sqlite3_serialize( + db: *mut sqlite3, + zSchema: *const ::core::ffi::c_char, + piSize: *mut sqlite3_int64, + mFlags: ::core::ffi::c_uint, + ) -> *mut ::core::ffi::c_uchar; +} +extern "C" { + pub fn sqlite3_deserialize( + db: *mut sqlite3, + zSchema: *const ::core::ffi::c_char, + pData: *mut ::core::ffi::c_uchar, + szDb: sqlite3_int64, + szBuf: sqlite3_int64, + mFlags: ::core::ffi::c_uint, + ) -> ::core::ffi::c_int; +} +pub type sqlite3_rtree_dbl = f64; +extern "C" { + pub fn sqlite3_rtree_geometry_callback( + db: *mut sqlite3, + zGeom: *const ::core::ffi::c_char, + xGeom: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3_rtree_geometry, + arg2: ::core::ffi::c_int, + arg3: *mut sqlite3_rtree_dbl, + arg4: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pContext: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_rtree_geometry { + pub pContext: *mut ::core::ffi::c_void, + pub nParam: ::core::ffi::c_int, + pub aParam: *mut sqlite3_rtree_dbl, + pub pUser: *mut ::core::ffi::c_void, + pub xDelUser: ::core::option::Option, +} +#[test] +fn bindgen_test_layout_sqlite3_rtree_geometry() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(sqlite3_rtree_geometry)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_rtree_geometry)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pContext) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_geometry), + "::", + stringify!(pContext) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nParam) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_geometry), + "::", + stringify!(nParam) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aParam) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_geometry), + "::", + stringify!(aParam) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pUser) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_geometry), + "::", + stringify!(pUser) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDelUser) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_geometry), + "::", + stringify!(xDelUser) + ) + ); +} +extern "C" { + pub fn sqlite3_rtree_query_callback( + db: *mut sqlite3, + zQueryFunc: *const ::core::ffi::c_char, + xQueryFunc: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut sqlite3_rtree_query_info) -> ::core::ffi::c_int, + >, + pContext: *mut ::core::ffi::c_void, + xDestructor: ::core::option::Option, + ) -> ::core::ffi::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sqlite3_rtree_query_info { + pub pContext: *mut ::core::ffi::c_void, + pub nParam: ::core::ffi::c_int, + pub aParam: *mut sqlite3_rtree_dbl, + pub pUser: *mut ::core::ffi::c_void, + pub xDelUser: ::core::option::Option, + pub aCoord: *mut sqlite3_rtree_dbl, + pub anQueue: *mut ::core::ffi::c_uint, + pub nCoord: ::core::ffi::c_int, + pub iLevel: ::core::ffi::c_int, + pub mxLevel: ::core::ffi::c_int, + pub iRowid: sqlite3_int64, + pub rParentScore: sqlite3_rtree_dbl, + pub eParentWithin: ::core::ffi::c_int, + pub eWithin: ::core::ffi::c_int, + pub rScore: sqlite3_rtree_dbl, + pub apSqlParam: *mut *mut sqlite3_value, +} +#[test] +fn bindgen_test_layout_sqlite3_rtree_query_info() { + const UNINIT: ::core::mem::MaybeUninit = + ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 112usize, + concat!("Size of: ", stringify!(sqlite3_rtree_query_info)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(sqlite3_rtree_query_info)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pContext) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(pContext) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nParam) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(nParam) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aParam) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(aParam) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).pUser) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(pUser) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDelUser) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(xDelUser) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).aCoord) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(aCoord) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).anQueue) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(anQueue) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).nCoord) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(nCoord) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iLevel) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(iLevel) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).mxLevel) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(mxLevel) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iRowid) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(iRowid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rParentScore) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(rParentScore) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).eParentWithin) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(eParentWithin) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).eWithin) as usize - ptr as usize }, + 92usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(eWithin) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).rScore) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(rScore) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).apSqlParam) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(sqlite3_rtree_query_info), + "::", + stringify!(apSqlParam) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Fts5Context { + _unused: [u8; 0], +} +pub type fts5_extension_function = ::core::option::Option< + unsafe extern "C" fn( + pApi: *const Fts5ExtensionApi, + pFts: *mut Fts5Context, + pCtx: *mut sqlite3_context, + nVal: ::core::ffi::c_int, + apVal: *mut *mut sqlite3_value, + ), +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Fts5PhraseIter { + pub a: *const ::core::ffi::c_uchar, + pub b: *const ::core::ffi::c_uchar, +} +#[test] +fn bindgen_test_layout_Fts5PhraseIter() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(Fts5PhraseIter)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(Fts5PhraseIter)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Fts5PhraseIter), + "::", + stringify!(a) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(Fts5PhraseIter), + "::", + stringify!(b) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Fts5ExtensionApi { + pub iVersion: ::core::ffi::c_int, + pub xUserData: ::core::option::Option< + unsafe extern "C" fn(arg1: *mut Fts5Context) -> *mut ::core::ffi::c_void, + >, + pub xColumnCount: + ::core::option::Option ::core::ffi::c_int>, + pub xRowCount: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + pnRow: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xColumnTotalSize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iCol: ::core::ffi::c_int, + pnToken: *mut sqlite3_int64, + ) -> ::core::ffi::c_int, + >, + pub xTokenize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + pText: *const ::core::ffi::c_char, + nText: ::core::ffi::c_int, + pCtx: *mut ::core::ffi::c_void, + xToken: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + arg2: ::core::ffi::c_int, + arg3: *const ::core::ffi::c_char, + arg4: ::core::ffi::c_int, + arg5: ::core::ffi::c_int, + arg6: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int, + >, + pub xPhraseCount: + ::core::option::Option ::core::ffi::c_int>, + pub xPhraseSize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iPhrase: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xInstCount: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + pnInst: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xInst: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iIdx: ::core::ffi::c_int, + piPhrase: *mut ::core::ffi::c_int, + piCol: *mut ::core::ffi::c_int, + piOff: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xRowid: + ::core::option::Option sqlite3_int64>, + pub xColumnText: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iCol: ::core::ffi::c_int, + pz: *mut *const ::core::ffi::c_char, + pn: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xColumnSize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iCol: ::core::ffi::c_int, + pnToken: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xQueryPhrase: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iPhrase: ::core::ffi::c_int, + pUserData: *mut ::core::ffi::c_void, + arg2: ::core::option::Option< + unsafe extern "C" fn( + arg1: *const Fts5ExtensionApi, + arg2: *mut Fts5Context, + arg3: *mut ::core::ffi::c_void, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int, + >, + pub xSetAuxdata: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + pAux: *mut ::core::ffi::c_void, + xDelete: ::core::option::Option, + ) -> ::core::ffi::c_int, + >, + pub xGetAuxdata: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + bClear: ::core::ffi::c_int, + ) -> *mut ::core::ffi::c_void, + >, + pub xPhraseFirst: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iPhrase: ::core::ffi::c_int, + arg2: *mut Fts5PhraseIter, + arg3: *mut ::core::ffi::c_int, + arg4: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xPhraseNext: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + arg2: *mut Fts5PhraseIter, + piCol: *mut ::core::ffi::c_int, + piOff: *mut ::core::ffi::c_int, + ), + >, + pub xPhraseFirstColumn: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iPhrase: ::core::ffi::c_int, + arg2: *mut Fts5PhraseIter, + arg3: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xPhraseNextColumn: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + arg2: *mut Fts5PhraseIter, + piCol: *mut ::core::ffi::c_int, + ), + >, + pub xQueryToken: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iPhrase: ::core::ffi::c_int, + iToken: ::core::ffi::c_int, + ppToken: *mut *const ::core::ffi::c_char, + pnToken: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + pub xInstToken: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Context, + iIdx: ::core::ffi::c_int, + iToken: ::core::ffi::c_int, + arg2: *mut *const ::core::ffi::c_char, + arg3: *mut ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_Fts5ExtensionApi() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 176usize, + concat!("Size of: ", stringify!(Fts5ExtensionApi)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(Fts5ExtensionApi)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xUserData) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xUserData) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xColumnCount) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xColumnCount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRowCount) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xRowCount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xColumnTotalSize) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xColumnTotalSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xTokenize) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xTokenize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseCount) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseCount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseSize) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInstCount) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xInstCount) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInst) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xInst) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xRowid) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xRowid) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xColumnText) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xColumnText) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xColumnSize) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xColumnSize) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xQueryPhrase) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xQueryPhrase) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xSetAuxdata) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xSetAuxdata) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xGetAuxdata) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xGetAuxdata) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseFirst) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseFirst) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseNext) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseNext) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseFirstColumn) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseFirstColumn) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xPhraseNextColumn) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xPhraseNextColumn) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xQueryToken) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xQueryToken) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xInstToken) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(Fts5ExtensionApi), + "::", + stringify!(xInstToken) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Fts5Tokenizer { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct fts5_tokenizer { + pub xCreate: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ::core::ffi::c_void, + azArg: *mut *const ::core::ffi::c_char, + nArg: ::core::ffi::c_int, + ppOut: *mut *mut Fts5Tokenizer, + ) -> ::core::ffi::c_int, + >, + pub xDelete: ::core::option::Option, + pub xTokenize: ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut Fts5Tokenizer, + pCtx: *mut ::core::ffi::c_void, + flags: ::core::ffi::c_int, + pText: *const ::core::ffi::c_char, + nText: ::core::ffi::c_int, + xToken: ::core::option::Option< + unsafe extern "C" fn( + pCtx: *mut ::core::ffi::c_void, + tflags: ::core::ffi::c_int, + pToken: *const ::core::ffi::c_char, + nToken: ::core::ffi::c_int, + iStart: ::core::ffi::c_int, + iEnd: ::core::ffi::c_int, + ) -> ::core::ffi::c_int, + >, + ) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_fts5_tokenizer() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(fts5_tokenizer)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(fts5_tokenizer)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreate) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(fts5_tokenizer), + "::", + stringify!(xCreate) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xDelete) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(fts5_tokenizer), + "::", + stringify!(xDelete) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xTokenize) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(fts5_tokenizer), + "::", + stringify!(xTokenize) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct fts5_api { + pub iVersion: ::core::ffi::c_int, + pub xCreateTokenizer: ::core::option::Option< + unsafe extern "C" fn( + pApi: *mut fts5_api, + zName: *const ::core::ffi::c_char, + pUserData: *mut ::core::ffi::c_void, + pTokenizer: *mut fts5_tokenizer, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int, + >, + pub xFindTokenizer: ::core::option::Option< + unsafe extern "C" fn( + pApi: *mut fts5_api, + zName: *const ::core::ffi::c_char, + ppUserData: *mut *mut ::core::ffi::c_void, + pTokenizer: *mut fts5_tokenizer, + ) -> ::core::ffi::c_int, + >, + pub xCreateFunction: ::core::option::Option< + unsafe extern "C" fn( + pApi: *mut fts5_api, + zName: *const ::core::ffi::c_char, + pUserData: *mut ::core::ffi::c_void, + xFunction: fts5_extension_function, + xDestroy: ::core::option::Option, + ) -> ::core::ffi::c_int, + >, +} +#[test] +fn bindgen_test_layout_fts5_api() { + const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(fts5_api)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(fts5_api)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).iVersion) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(fts5_api), + "::", + stringify!(iVersion) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreateTokenizer) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(fts5_api), + "::", + stringify!(xCreateTokenizer) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xFindTokenizer) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(fts5_api), + "::", + stringify!(xFindTokenizer) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).xCreateFunction) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(fts5_api), + "::", + stringify!(xCreateFunction) + ) + ); +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::core::ffi::c_uint, + pub fp_offset: ::core::ffi::c_uint, + pub overflow_arg_area: *mut ::core::ffi::c_void, + pub reg_save_area: *mut ::core::ffi::c_void, +} +#[test] +fn bindgen_test_layout___va_list_tag() { + const UNINIT: ::core::mem::MaybeUninit<__va_list_tag> = ::core::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::core::mem::size_of::<__va_list_tag>(), + 24usize, + concat!("Size of: ", stringify!(__va_list_tag)) + ); + assert_eq!( + ::core::mem::align_of::<__va_list_tag>(), + 8usize, + concat!("Alignment of ", stringify!(__va_list_tag)) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(gp_offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(fp_offset) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(overflow_arg_area) + ) + ); + assert_eq!( + unsafe { ::core::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(__va_list_tag), + "::", + stringify!(reg_save_area) + ) + ); +} diff --git a/src/constants.rs b/src/constants.rs deleted file mode 100644 index abce54d..0000000 --- a/src/constants.rs +++ /dev/null @@ -1,524 +0,0 @@ -use libc::c_int; - -pub const SQLITE_OK: c_int = 0; -pub const SQLITE_ERROR: c_int = 1; -pub const SQLITE_INTERNAL: c_int = 2; -pub const SQLITE_PERM: c_int = 3; -pub const SQLITE_ABORT: c_int = 4; -pub const SQLITE_BUSY: c_int = 5; -pub const SQLITE_LOCKED: c_int = 6; -pub const SQLITE_NOMEM: c_int = 7; -pub const SQLITE_READONLY: c_int = 8; -pub const SQLITE_INTERRUPT: c_int = 9; -pub const SQLITE_IOERR: c_int = 10; -pub const SQLITE_CORRUPT: c_int = 11; -pub const SQLITE_NOTFOUND: c_int = 12; -pub const SQLITE_FULL: c_int = 13; -pub const SQLITE_CANTOPEN: c_int = 14; -pub const SQLITE_PROTOCOL: c_int = 15; -pub const SQLITE_EMPTY: c_int = 16; -pub const SQLITE_SCHEMA: c_int = 17; -pub const SQLITE_TOOBIG: c_int = 18; -pub const SQLITE_CONSTRAINT: c_int = 19; -pub const SQLITE_MISMATCH: c_int = 20; -pub const SQLITE_MISUSE: c_int = 21; -pub const SQLITE_NOLFS: c_int = 22; -pub const SQLITE_AUTH: c_int = 23; -pub const SQLITE_FORMAT: c_int = 24; -pub const SQLITE_RANGE: c_int = 25; -pub const SQLITE_NOTADB: c_int = 26; -pub const SQLITE_NOTICE: c_int = 27; -pub const SQLITE_WARNING: c_int = 28; -pub const SQLITE_ROW: c_int = 100; -pub const SQLITE_DONE: c_int = 101; - -pub const SQLITE_IOERR_READ: c_int = SQLITE_IOERR | ( 1 << 8); -pub const SQLITE_IOERR_SHORT_READ: c_int = SQLITE_IOERR | ( 2 << 8); -pub const SQLITE_IOERR_WRITE: c_int = SQLITE_IOERR | ( 3 << 8); -pub const SQLITE_IOERR_FSYNC: c_int = SQLITE_IOERR | ( 4 << 8); -pub const SQLITE_IOERR_DIR_FSYNC: c_int = SQLITE_IOERR | ( 5 << 8); -pub const SQLITE_IOERR_TRUNCATE: c_int = SQLITE_IOERR | ( 6 << 8); -pub const SQLITE_IOERR_FSTAT: c_int = SQLITE_IOERR | ( 7 << 8); -pub const SQLITE_IOERR_UNLOCK: c_int = SQLITE_IOERR | ( 8 << 8); -pub const SQLITE_IOERR_RDLOCK: c_int = SQLITE_IOERR | ( 9 << 8); -pub const SQLITE_IOERR_DELETE: c_int = SQLITE_IOERR | (10 << 8); -pub const SQLITE_IOERR_BLOCKED: c_int = SQLITE_IOERR | (11 << 8); -pub const SQLITE_IOERR_NOMEM: c_int = SQLITE_IOERR | (12 << 8); -pub const SQLITE_IOERR_ACCESS: c_int = SQLITE_IOERR | (13 << 8); -pub const SQLITE_IOERR_CHECKRESERVEDLOCK: c_int = SQLITE_IOERR | (14 << 8); -pub const SQLITE_IOERR_LOCK: c_int = SQLITE_IOERR | (15 << 8); -pub const SQLITE_IOERR_CLOSE: c_int = SQLITE_IOERR | (16 << 8); -pub const SQLITE_IOERR_DIR_CLOSE: c_int = SQLITE_IOERR | (17 << 8); -pub const SQLITE_IOERR_SHMOPEN: c_int = SQLITE_IOERR | (18 << 8); -pub const SQLITE_IOERR_SHMSIZE: c_int = SQLITE_IOERR | (19 << 8); -pub const SQLITE_IOERR_SHMLOCK: c_int = SQLITE_IOERR | (20 << 8); -pub const SQLITE_IOERR_SHMMAP: c_int = SQLITE_IOERR | (21 << 8); -pub const SQLITE_IOERR_SEEK: c_int = SQLITE_IOERR | (22 << 8); -pub const SQLITE_IOERR_DELETE_NOENT: c_int = SQLITE_IOERR | (23 << 8); -pub const SQLITE_IOERR_MMAP: c_int = SQLITE_IOERR | (24 << 8); -pub const SQLITE_IOERR_GETTEMPPATH: c_int = SQLITE_IOERR | (25 << 8); -pub const SQLITE_IOERR_CONVPATH: c_int = SQLITE_IOERR | (26 << 8); -pub const SQLITE_IOERR_VNODE: c_int = SQLITE_IOERR | (27 << 8); -pub const SQLITE_IOERR_AUTH: c_int = SQLITE_IOERR | (28 << 8); -pub const SQLITE_IOERR_BEGIN_ATOMIC: c_int = SQLITE_IOERR | (29 << 8); -pub const SQLITE_IOERR_COMMIT_ATOMIC: c_int = SQLITE_IOERR | (30 << 8); -pub const SQLITE_IOERR_ROLLBACK_ATOMIC: c_int = SQLITE_IOERR | (31 << 8); -pub const SQLITE_IOERR_DATA: c_int = SQLITE_IOERR | (32 << 8); -pub const SQLITE_IOERR_CORRUPTFS: c_int = SQLITE_IOERR | (33 << 8); -pub const SQLITE_IOERR_IN_PAGE: c_int = SQLITE_IOERR | (34 << 8); - -pub const SQLITE_LOCKED_SHAREDCACHE: c_int = SQLITE_LOCKED | ( 1 << 8); -pub const SQLITE_LOCKED_VTAB: c_int = SQLITE_LOCKED | ( 2 << 8); - -pub const SQLITE_BUSY_RECOVERY: c_int = SQLITE_BUSY | ( 1 << 8); -pub const SQLITE_BUSY_SNAPSHOT: c_int = SQLITE_BUSY | ( 2 << 8); -pub const SQLITE_BUSY_TIMEOUT: c_int = SQLITE_BUSY | ( 3 << 8); - -pub const SQLITE_CANTOPEN_NOTEMPDIR: c_int = SQLITE_CANTOPEN | ( 1 << 8); -pub const SQLITE_CANTOPEN_ISDIR: c_int = SQLITE_CANTOPEN | ( 2 << 8); -pub const SQLITE_CANTOPEN_FULLPATH: c_int = SQLITE_CANTOPEN | ( 3 << 8); -pub const SQLITE_CANTOPEN_CONVPATH: c_int = SQLITE_CANTOPEN | ( 4 << 8); -pub const SQLITE_CANTOPEN_DIRTYWAL: c_int = SQLITE_CANTOPEN | ( 5 << 8); -pub const SQLITE_CANTOPEN_SYMLINK: c_int = SQLITE_CANTOPEN | ( 6 << 8); - -pub const SQLITE_CORRUPT_VTAB: c_int = SQLITE_CORRUPT | ( 1 << 8); -pub const SQLITE_CORRUPT_SEQUENCE: c_int = SQLITE_CORRUPT | ( 2 << 8); -pub const SQLITE_CORRUPT_INDEX: c_int = SQLITE_CORRUPT | ( 3 << 8); - -pub const SQLITE_READONLY_RECOVERY: c_int = SQLITE_READONLY | ( 1 << 8); -pub const SQLITE_READONLY_CANTLOCK: c_int = SQLITE_READONLY | ( 2 << 8); -pub const SQLITE_READONLY_ROLLBACK: c_int = SQLITE_READONLY | ( 3 << 8); -pub const SQLITE_READONLY_DBMOVED: c_int = SQLITE_READONLY | ( 4 << 8); -pub const SQLITE_READONLY_CANTINIT: c_int = SQLITE_READONLY | ( 5 << 8); -pub const SQLITE_READONLY_DIRECTORY: c_int = SQLITE_READONLY | ( 6 << 8); - -pub const SQLITE_ABORT_ROLLBACK: c_int = SQLITE_ABORT | ( 2 << 8); - -pub const SQLITE_CONSTRAINT_CHECK: c_int = SQLITE_CONSTRAINT | ( 1 << 8); -pub const SQLITE_CONSTRAINT_COMMITHOOK: c_int = SQLITE_CONSTRAINT | ( 2 << 8); -pub const SQLITE_CONSTRAINT_FOREIGNKEY: c_int = SQLITE_CONSTRAINT | ( 3 << 8); -pub const SQLITE_CONSTRAINT_FUNCTION: c_int = SQLITE_CONSTRAINT | ( 4 << 8); -pub const SQLITE_CONSTRAINT_NOTNULL: c_int = SQLITE_CONSTRAINT | ( 5 << 8); -pub const SQLITE_CONSTRAINT_PRIMARYKEY: c_int = SQLITE_CONSTRAINT | ( 6 << 8); -pub const SQLITE_CONSTRAINT_TRIGGER: c_int = SQLITE_CONSTRAINT | ( 7 << 8); -pub const SQLITE_CONSTRAINT_UNIQUE: c_int = SQLITE_CONSTRAINT | ( 8 << 8); -pub const SQLITE_CONSTRAINT_VTAB: c_int = SQLITE_CONSTRAINT | ( 9 << 8); -pub const SQLITE_CONSTRAINT_ROWID: c_int = SQLITE_CONSTRAINT | (10 << 8); -pub const SQLITE_CONSTRAINT_PINNED: c_int = SQLITE_CONSTRAINT | (11 << 8); -pub const SQLITE_CONSTRAINT_DATATYPE: c_int = SQLITE_CONSTRAINT | (12 << 8); - -pub const SQLITE_NOTICE_RECOVER_WAL: c_int = SQLITE_NOTICE | ( 1 << 8); -pub const SQLITE_NOTICE_RECOVER_ROLLBACK: c_int = SQLITE_NOTICE | ( 2 << 8); -pub const SQLITE_NOTICE_RBU: c_int = SQLITE_NOTICE | ( 3 << 8); - -pub const SQLITE_WARNING_AUTOINDEX: c_int = SQLITE_WARNING | ( 1 << 8); - -pub const SQLITE_AUTH_USER: c_int = SQLITE_AUTH | ( 1 << 8); - -pub const SQLITE_OK_LOAD_PERMANENTLY: c_int = SQLITE_OK | ( 1 << 8); -pub const SQLITE_OK_SYMLINK: c_int = SQLITE_OK | ( 2 << 8); - -pub const SQLITE_OPEN_READONLY: c_int = 0x00000001; -pub const SQLITE_OPEN_READWRITE: c_int = 0x00000002; -pub const SQLITE_OPEN_CREATE: c_int = 0x00000004; -pub const SQLITE_OPEN_DELETEONCLOSE: c_int = 0x00000008; -pub const SQLITE_OPEN_EXCLUSIVE: c_int = 0x00000010; -pub const SQLITE_OPEN_AUTOPROXY: c_int = 0x00000020; -pub const SQLITE_OPEN_URI: c_int = 0x00000040; -pub const SQLITE_OPEN_MEMORY: c_int = 0x00000080; -pub const SQLITE_OPEN_MAIN_DB: c_int = 0x00000100; -pub const SQLITE_OPEN_TEMP_DB: c_int = 0x00000200; -pub const SQLITE_OPEN_TRANSIENT_DB: c_int = 0x00000400; -pub const SQLITE_OPEN_MAIN_JOURNAL: c_int = 0x00000800; -pub const SQLITE_OPEN_TEMP_JOURNAL: c_int = 0x00001000; -pub const SQLITE_OPEN_SUBJOURNAL: c_int = 0x00002000; -pub const SQLITE_OPEN_MASTER_JOURNAL: c_int = 0x00004000; -pub const SQLITE_OPEN_NOMUTEX: c_int = 0x00008000; -pub const SQLITE_OPEN_FULLMUTEX: c_int = 0x00010000; -pub const SQLITE_OPEN_SHAREDCACHE: c_int = 0x00020000; -pub const SQLITE_OPEN_PRIVATECACHE: c_int = 0x00040000; -pub const SQLITE_OPEN_WAL: c_int = 0x00080000; -pub const SQLITE_OPEN_NOFOLLOW: c_int = 0x01000000; -pub const SQLITE_OPEN_EXRESCODE: c_int = 0x02000000; - -pub const SQLITE_IOCAP_ATOMIC: c_int = 0x00000001; -pub const SQLITE_IOCAP_ATOMIC512: c_int = 0x00000002; -pub const SQLITE_IOCAP_ATOMIC1K: c_int = 0x00000004; -pub const SQLITE_IOCAP_ATOMIC2K: c_int = 0x00000008; -pub const SQLITE_IOCAP_ATOMIC4K: c_int = 0x00000010; -pub const SQLITE_IOCAP_ATOMIC8K: c_int = 0x00000020; -pub const SQLITE_IOCAP_ATOMIC16K: c_int = 0x00000040; -pub const SQLITE_IOCAP_ATOMIC32K: c_int = 0x00000080; -pub const SQLITE_IOCAP_ATOMIC64K: c_int = 0x00000100; -pub const SQLITE_IOCAP_SAFE_APPEND: c_int = 0x00000200; -pub const SQLITE_IOCAP_SEQUENTIAL: c_int = 0x00000400; -pub const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: c_int = 0x00000800; -pub const SQLITE_IOCAP_POWERSAFE_OVERWRITE: c_int = 0x00001000; -pub const SQLITE_IOCAP_IMMUTABLE: c_int = 0x00002000; -pub const SQLITE_IOCAP_BATCH_ATOMIC: c_int = 0x00004000; - -pub const SQLITE_LOCK_NONE: c_int = 0; -pub const SQLITE_LOCK_SHARED: c_int = 1; -pub const SQLITE_LOCK_RESERVED: c_int = 2; -pub const SQLITE_LOCK_PENDING: c_int = 3; -pub const SQLITE_LOCK_EXCLUSIVE: c_int = 4; - -pub const SQLITE_SYNC_NORMAL: c_int = 0x00002; -pub const SQLITE_SYNC_FULL: c_int = 0x00003; -pub const SQLITE_SYNC_DATAONLY: c_int = 0x00010; - -pub const SQLITE_FCNTL_LOCKSTATE: c_int = 1; -pub const SQLITE_FCNTL_GET_LOCKPROXYFILE: c_int = 2; -pub const SQLITE_FCNTL_SET_LOCKPROXYFILE: c_int = 3; -pub const SQLITE_FCNTL_LAST_ERRNO: c_int = 4; -pub const SQLITE_FCNTL_SIZE_HINT: c_int = 5; -pub const SQLITE_FCNTL_CHUNK_SIZE: c_int = 6; -pub const SQLITE_FCNTL_FILE_POINTER: c_int = 7; -pub const SQLITE_FCNTL_SYNC_OMITTED: c_int = 8; -pub const SQLITE_FCNTL_WIN32_AV_RETRY: c_int = 9; -pub const SQLITE_FCNTL_PERSIST_WAL: c_int = 10; -pub const SQLITE_FCNTL_OVERWRITE: c_int = 11; -pub const SQLITE_FCNTL_VFSNAME: c_int = 12; -pub const SQLITE_FCNTL_POWERSAFE_OVERWRITE: c_int = 13; -pub const SQLITE_FCNTL_PRAGMA: c_int = 14; -pub const SQLITE_FCNTL_BUSYHANDLER: c_int = 15; -pub const SQLITE_FCNTL_TEMPFILENAME: c_int = 16; -pub const SQLITE_FCNTL_MMAP_SIZE: c_int = 18; -pub const SQLITE_FCNTL_TRACE: c_int = 19; -pub const SQLITE_FCNTL_HAS_MOVED: c_int = 20; -pub const SQLITE_FCNTL_SYNC: c_int = 21; -pub const SQLITE_FCNTL_COMMIT_PHASETWO: c_int = 22; -pub const SQLITE_FCNTL_WIN32_SET_HANDLE: c_int = 23; -pub const SQLITE_FCNTL_WAL_BLOCK: c_int = 24; -pub const SQLITE_FCNTL_ZIPVFS: c_int = 25; -pub const SQLITE_FCNTL_RBU: c_int = 26; -pub const SQLITE_FCNTL_VFS_POINTER: c_int = 27; -pub const SQLITE_FCNTL_JOURNAL_POINTER: c_int = 28; -pub const SQLITE_FCNTL_WIN32_GET_HANDLE: c_int = 29; -pub const SQLITE_FCNTL_PDB: c_int = 30; -pub const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: c_int = 31; -pub const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: c_int = 32; -pub const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: c_int = 33; -pub const SQLITE_FCNTL_LOCK_TIMEOUT: c_int = 34; -pub const SQLITE_FCNTL_DATA_VERSION: c_int = 35; -pub const SQLITE_FCNTL_SIZE_LIMIT: c_int = 36; -pub const SQLITE_FCNTL_CKPT_DONE: c_int = 37; -pub const SQLITE_FCNTL_RESERVE_BYTES: c_int = 38; -pub const SQLITE_FCNTL_CKPT_START: c_int = 39; -pub const SQLITE_FCNTL_EXTERNAL_READER: c_int = 40; -pub const SQLITE_FCNTL_CKSM_FILE: c_int = 41; -pub const SQLITE_FCNTL_RESET_CACHE: c_int = 42; - -pub const SQLITE_ACCESS_EXISTS: c_int = 0; -pub const SQLITE_ACCESS_READWRITE: c_int = 1; -pub const SQLITE_ACCESS_READ: c_int = 2; - -pub const SQLITE_SHM_UNLOCK: c_int = 1; -pub const SQLITE_SHM_LOCK: c_int = 2; -pub const SQLITE_SHM_SHARED: c_int = 4; -pub const SQLITE_SHM_EXCLUSIVE: c_int = 8; -pub const SQLITE_SHM_NLOCK: c_int = 8; - -pub const SQLITE_CONFIG_SINGLETHREAD: c_int = 1; -pub const SQLITE_CONFIG_MULTITHREAD: c_int = 2; -pub const SQLITE_CONFIG_SERIALIZED: c_int = 3; -pub const SQLITE_CONFIG_MALLOC: c_int = 4; -pub const SQLITE_CONFIG_GETMALLOC: c_int = 5; -pub const SQLITE_CONFIG_SCRATCH: c_int = 6; -pub const SQLITE_CONFIG_PAGECACHE: c_int = 7; -pub const SQLITE_CONFIG_HEAP: c_int = 8; -pub const SQLITE_CONFIG_MEMSTATUS: c_int = 9; -pub const SQLITE_CONFIG_MUTEX: c_int = 10; -pub const SQLITE_CONFIG_GETMUTEX: c_int = 11; -pub const SQLITE_CONFIG_LOOKASIDE: c_int = 13; -pub const SQLITE_CONFIG_PCACHE: c_int = 14; -pub const SQLITE_CONFIG_GETPCACHE: c_int = 15; -pub const SQLITE_CONFIG_LOG: c_int = 16; -pub const SQLITE_CONFIG_URI: c_int = 17; -pub const SQLITE_CONFIG_PCACHE2: c_int = 18; -pub const SQLITE_CONFIG_GETPCACHE2: c_int = 19; -pub const SQLITE_CONFIG_COVERING_INDEX_SCAN: c_int = 20; -pub const SQLITE_CONFIG_SQLLOG: c_int = 21; -pub const SQLITE_CONFIG_MMAP_SIZE: c_int = 22; -pub const SQLITE_CONFIG_WIN32_HEAPSIZE: c_int = 23; -pub const SQLITE_CONFIG_PCACHE_HDRSZ: c_int = 24; -pub const SQLITE_CONFIG_PMASZ: c_int = 25; -pub const SQLITE_CONFIG_STMTJRNL_SPILL: c_int = 26; -pub const SQLITE_CONFIG_SMALL_MALLOC: c_int = 27; -pub const SQLITE_CONFIG_SORTERREF_SIZE: c_int = 28; -pub const SQLITE_CONFIG_MEMDB_MAXSIZE: c_int = 29; -pub const SQLITE_CONFIG_ROWID_IN_VIEW: c_int = 30; - -pub const SQLITE_DBCONFIG_MAINDBNAME: c_int = 1000; -pub const SQLITE_DBCONFIG_LOOKASIDE: c_int = 1001; -pub const SQLITE_DBCONFIG_ENABLE_FKEY: c_int = 1002; -pub const SQLITE_DBCONFIG_ENABLE_TRIGGER: c_int = 1003; -pub const SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER: c_int = 1004; -pub const SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION: c_int = 1005; -pub const SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE: c_int = 1006; -pub const SQLITE_DBCONFIG_ENABLE_QPSG: c_int = 1007; -pub const SQLITE_DBCONFIG_TRIGGER_EQP: c_int = 1008; -pub const SQLITE_DBCONFIG_RESET_DATABASE: c_int = 1009; -pub const SQLITE_DBCONFIG_DEFENSIVE: c_int = 1010; -pub const SQLITE_DBCONFIG_WRITABLE_SCHEMA: c_int = 1011; -pub const SQLITE_DBCONFIG_LEGACY_ALTER_TABLE: c_int = 1012; -pub const SQLITE_DBCONFIG_DQS_DML: c_int = 1013; -pub const SQLITE_DBCONFIG_DQS_DDL: c_int = 1014; -pub const SQLITE_DBCONFIG_ENABLE_VIEW: c_int = 1015; -pub const SQLITE_DBCONFIG_LEGACY_FILE_FORMAT: c_int = 1016; -pub const SQLITE_DBCONFIG_TRUSTED_SCHEMA: c_int = 1017; -pub const SQLITE_DBCONFIG_STMT_SCANSTATUS: c_int = 1018; -pub const SQLITE_DBCONFIG_REVERSE_SCANORDER: c_int = 1019; -pub const SQLITE_DBCONFIG_MAX: c_int = 1019; - -pub const SQLITE_DENY: c_int = 1; -pub const SQLITE_IGNORE: c_int = 2; - -pub const SQLITE_CREATE_INDEX: c_int = 1; -pub const SQLITE_CREATE_TABLE: c_int = 2; -pub const SQLITE_CREATE_TEMP_INDEX: c_int = 3; -pub const SQLITE_CREATE_TEMP_TABLE: c_int = 4; -pub const SQLITE_CREATE_TEMP_TRIGGER: c_int = 5; -pub const SQLITE_CREATE_TEMP_VIEW: c_int = 6; -pub const SQLITE_CREATE_TRIGGER: c_int = 7; -pub const SQLITE_CREATE_VIEW: c_int = 8; -pub const SQLITE_DELETE: c_int = 9; -pub const SQLITE_DROP_INDEX: c_int = 10; -pub const SQLITE_DROP_TABLE: c_int = 11; -pub const SQLITE_DROP_TEMP_INDEX: c_int = 12; -pub const SQLITE_DROP_TEMP_TABLE: c_int = 13; -pub const SQLITE_DROP_TEMP_TRIGGER: c_int = 14; -pub const SQLITE_DROP_TEMP_VIEW: c_int = 15; -pub const SQLITE_DROP_TRIGGER: c_int = 16; -pub const SQLITE_DROP_VIEW: c_int = 17; -pub const SQLITE_INSERT: c_int = 18; -pub const SQLITE_PRAGMA: c_int = 19; -pub const SQLITE_READ: c_int = 20; -pub const SQLITE_SELECT: c_int = 21; -pub const SQLITE_TRANSACTION: c_int = 22; -pub const SQLITE_UPDATE: c_int = 23; -pub const SQLITE_ATTACH: c_int = 24; -pub const SQLITE_DETACH: c_int = 25; -pub const SQLITE_ALTER_TABLE: c_int = 26; -pub const SQLITE_REINDEX: c_int = 27; -pub const SQLITE_ANALYZE: c_int = 28; -pub const SQLITE_CREATE_VTABLE: c_int = 29; -pub const SQLITE_DROP_VTABLE: c_int = 30; -pub const SQLITE_FUNCTION: c_int = 31; -pub const SQLITE_SAVEPOINT: c_int = 32; -pub const SQLITE_COPY: c_int = 0; -pub const SQLITE_RECURSIVE: c_int = 33; - -pub const SQLITE_TRACE_STMT: c_int = 0x01; -pub const SQLITE_TRACE_PROFILE: c_int = 0x02; -pub const SQLITE_TRACE_ROW: c_int = 0x04; -pub const SQLITE_TRACE_CLOSE: c_int = 0x08; - -pub const SQLITE_LIMIT_LENGTH: c_int = 0; -pub const SQLITE_LIMIT_SQL_LENGTH: c_int = 1; -pub const SQLITE_LIMIT_COLUMN: c_int = 2; -pub const SQLITE_LIMIT_EXPR_DEPTH: c_int = 3; -pub const SQLITE_LIMIT_COMPOUND_SELECT: c_int = 4; -pub const SQLITE_LIMIT_VDBE_OP: c_int = 5; -pub const SQLITE_LIMIT_FUNCTION_ARG: c_int = 6; -pub const SQLITE_LIMIT_ATTACHED: c_int = 7; -pub const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: c_int = 8; -pub const SQLITE_LIMIT_VARIABLE_NUMBER: c_int = 9; -pub const SQLITE_LIMIT_TRIGGER_DEPTH: c_int = 10; -pub const SQLITE_LIMIT_WORKER_THREADS: c_int = 11; - -pub const SQLITE_PREPARE_PERSISTENT: c_int = 0x01; -pub const SQLITE_PREPARE_NORMALIZE: c_int = 0x02; -pub const SQLITE_PREPARE_NO_VTAB: c_int = 0x04; - -pub const SQLITE_INTEGER: c_int = 1; -pub const SQLITE_FLOAT: c_int = 2; -pub const SQLITE_TEXT: c_int = 3; -pub const SQLITE_BLOB: c_int = 4; -pub const SQLITE_NULL: c_int = 5; - -pub const SQLITE_UTF8: c_int = 1; -pub const SQLITE_UTF16LE: c_int = 2; -pub const SQLITE_UTF16BE: c_int = 3; -pub const SQLITE_UTF16: c_int = 4; -pub const SQLITE_ANY: c_int = 5; -pub const SQLITE_UTF16_ALIGNED: c_int = 8; - -pub const SQLITE_DETERMINISTIC: c_int = 0x000000800; -pub const SQLITE_DIRECTONLY: c_int = 0x000080000; -pub const SQLITE_SUBTYPE: c_int = 0x000100000; -pub const SQLITE_INNOCUOUS: c_int = 0x000200000; -pub const SQLITE_RESULT_SUBTYPE:c_int = 0x001000000; - -pub const SQLITE_STATIC: c_int = 0; -pub const SQLITE_TRANSIENT: c_int = -1; - -pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: c_int = 1; -pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: c_int = 2; - -pub const SQLITE_TXN_NONE: c_int = 0; -pub const SQLITE_TXN_READ: c_int = 1; -pub const SQLITE_TXN_WRITE: c_int = 2; - -pub const SQLITE_INDEX_SCAN_UNIQUE: c_int = 1; -pub const SQLITE_INDEX_CONSTRAINT_EQ: c_int = 2; -pub const SQLITE_INDEX_CONSTRAINT_GT: c_int = 4; -pub const SQLITE_INDEX_CONSTRAINT_LE: c_int = 8; -pub const SQLITE_INDEX_CONSTRAINT_LT: c_int = 16; -pub const SQLITE_INDEX_CONSTRAINT_GE: c_int = 32; -pub const SQLITE_INDEX_CONSTRAINT_MATCH: c_int = 64; -pub const SQLITE_INDEX_CONSTRAINT_LIKE: c_int = 65; -pub const SQLITE_INDEX_CONSTRAINT_GLOB: c_int = 66; -pub const SQLITE_INDEX_CONSTRAINT_REGEXP: c_int = 67; -pub const SQLITE_INDEX_CONSTRAINT_NE: c_int = 68; -pub const SQLITE_INDEX_CONSTRAINT_ISNOT: c_int = 69; -pub const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: c_int = 70; -pub const SQLITE_INDEX_CONSTRAINT_ISNULL: c_int = 71; -pub const SQLITE_INDEX_CONSTRAINT_IS: c_int = 72; -pub const SQLITE_INDEX_CONSTRAINT_LIMIT: c_int = 73; -pub const SQLITE_INDEX_CONSTRAINT_OFFSET: c_int = 74; -pub const SQLITE_INDEX_CONSTRAINT_FUNCTION: c_int = 150; - -pub const SQLITE_MUTEX_FAST: c_int = 0; -pub const SQLITE_MUTEX_RECURSIVE: c_int = 1; -pub const SQLITE_MUTEX_STATIC_MAIN: c_int = 2; -pub const SQLITE_MUTEX_STATIC_MASTER: c_int = 2; -pub const SQLITE_MUTEX_STATIC_MEM: c_int = 3; -pub const SQLITE_MUTEX_STATIC_MEM2: c_int = 4; -pub const SQLITE_MUTEX_STATIC_OPEN: c_int = 4; -pub const SQLITE_MUTEX_STATIC_PRNG: c_int = 5; -pub const SQLITE_MUTEX_STATIC_LRU: c_int = 6; -pub const SQLITE_MUTEX_STATIC_LRU2: c_int = 7; -pub const SQLITE_MUTEX_STATIC_PMEM: c_int = 7; -pub const SQLITE_MUTEX_STATIC_APP1: c_int = 8; -pub const SQLITE_MUTEX_STATIC_APP2: c_int = 9; -pub const SQLITE_MUTEX_STATIC_APP3: c_int = 10; -pub const SQLITE_MUTEX_STATIC_VFS1: c_int = 11; -pub const SQLITE_MUTEX_STATIC_VFS2: c_int = 12; -pub const SQLITE_MUTEX_STATIC_VFS3: c_int = 13; - -pub const SQLITE_TESTCTRL_FIRST: c_int = 5; -pub const SQLITE_TESTCTRL_PRNG_SAVE: c_int = 5; -pub const SQLITE_TESTCTRL_PRNG_RESTORE: c_int = 6; -pub const SQLITE_TESTCTRL_PRNG_RESET: c_int = 7; -pub const SQLITE_TESTCTRL_FK_NO_ACTION: c_int = 7; -pub const SQLITE_TESTCTRL_BITVEC_TEST: c_int = 8; -pub const SQLITE_TESTCTRL_FAULT_INSTALL: c_int = 9; -pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: c_int = 10; -pub const SQLITE_TESTCTRL_PENDING_BYTE: c_int = 11; -pub const SQLITE_TESTCTRL_ASSERT: c_int = 12; -pub const SQLITE_TESTCTRL_ALWAYS: c_int = 13; -pub const SQLITE_TESTCTRL_RESERVE: c_int = 14; -pub const SQLITE_TESTCTRL_JSON_SELFCHECK: c_int = 14; -pub const SQLITE_TESTCTRL_OPTIMIZATIONS: c_int = 15; -pub const SQLITE_TESTCTRL_ISKEYWORD: c_int = 16; -pub const SQLITE_TESTCTRL_SCRATCHMALLOC: c_int = 17; -pub const SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: c_int = 17; -pub const SQLITE_TESTCTRL_LOCALTIME_FAULT: c_int = 18; -pub const SQLITE_TESTCTRL_EXPLAIN_STMT: c_int = 19; -pub const SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: c_int = 19; -pub const SQLITE_TESTCTRL_NEVER_CORRUPT: c_int = 20; -pub const SQLITE_TESTCTRL_VDBE_COVERAGE: c_int = 21; -pub const SQLITE_TESTCTRL_BYTEORDER: c_int = 22; -pub const SQLITE_TESTCTRL_ISINIT: c_int = 23; -pub const SQLITE_TESTCTRL_SORTER_MMAP: c_int = 24; -pub const SQLITE_TESTCTRL_IMPOSTER: c_int = 25; -pub const SQLITE_TESTCTRL_PARSER_COVERAGE: c_int = 26; -pub const SQLITE_TESTCTRL_RESULT_INTREAL: c_int = 27; -pub const SQLITE_TESTCTRL_PRNG_SEED: c_int = 28; -pub const SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: c_int = 29; -pub const SQLITE_TESTCTRL_SEEK_COUNT: c_int = 30; -pub const SQLITE_TESTCTRL_TRACEFLAGS: c_int = 31; -pub const SQLITE_TESTCTRL_TUNE: c_int = 32; -pub const SQLITE_TESTCTRL_LOGEST: c_int = 33; -pub const SQLITE_TESTCTRL_USELONGDOUBLE: c_int = 34; -pub const SQLITE_TESTCTRL_LAST: c_int = 34; - -pub const SQLITE_STATUS_MEMORY_USED: c_int = 0; -pub const SQLITE_STATUS_PAGECACHE_USED: c_int = 1; -pub const SQLITE_STATUS_PAGECACHE_OVERFLOW: c_int = 2; -pub const SQLITE_STATUS_SCRATCH_USED: c_int = 3; -pub const SQLITE_STATUS_SCRATCH_OVERFLOW: c_int = 4; -pub const SQLITE_STATUS_MALLOC_SIZE: c_int = 5; -pub const SQLITE_STATUS_PARSER_STACK: c_int = 6; -pub const SQLITE_STATUS_PAGECACHE_SIZE: c_int = 7; -pub const SQLITE_STATUS_SCRATCH_SIZE: c_int = 8; -pub const SQLITE_STATUS_MALLOC_COUNT: c_int = 9; - -pub const SQLITE_DBSTATUS_LOOKASIDE_USED: c_int = 0; -pub const SQLITE_DBSTATUS_CACHE_USED: c_int = 1; -pub const SQLITE_DBSTATUS_SCHEMA_USED: c_int = 2; -pub const SQLITE_DBSTATUS_STMT_USED: c_int = 3; -pub const SQLITE_DBSTATUS_LOOKASIDE_HIT: c_int = 4; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: c_int = 5; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: c_int = 6; -pub const SQLITE_DBSTATUS_CACHE_HIT: c_int = 7; -pub const SQLITE_DBSTATUS_CACHE_MISS: c_int = 8; -pub const SQLITE_DBSTATUS_CACHE_WRITE: c_int = 9; -pub const SQLITE_DBSTATUS_DEFERRED_FKS: c_int = 10; -pub const SQLITE_DBSTATUS_CACHE_USED_SHARED: c_int = 11; -pub const SQLITE_DBSTATUS_CACHE_SPILL: c_int = 12; -pub const SQLITE_DBSTATUS_MAX: c_int = 12; - -pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: c_int = 1; -pub const SQLITE_STMTSTATUS_SORT: c_int = 2; -pub const SQLITE_STMTSTATUS_AUTOINDEX: c_int = 3; -pub const SQLITE_STMTSTATUS_VM_STEP: c_int = 4; -pub const SQLITE_STMTSTATUS_REPREPARE: c_int = 5; -pub const SQLITE_STMTSTATUS_RUN: c_int = 6; -pub const SQLITE_STMTSTATUS_FILTER_MISS: c_int = 7; -pub const SQLITE_STMTSTATUS_FILTER_HIT: c_int = 8; -pub const SQLITE_STMTSTATUS_MEMUSED: c_int = 99; - -pub const SQLITE_CHECKPOINT_PASSIVE: c_int = 0; -pub const SQLITE_CHECKPOINT_FULL: c_int = 1; -pub const SQLITE_CHECKPOINT_RESTART: c_int = 2; -pub const SQLITE_CHECKPOINT_TRUNCATE: c_int = 3; - -pub const SQLITE_VTAB_CONSTRAINT_SUPPORT: c_int = 1; -pub const SQLITE_VTAB_INNOCUOUS: c_int = 2; -pub const SQLITE_VTAB_DIRECTONLY: c_int = 3; -pub const SQLITE_VTAB_USES_ALL_SCHEMAS: c_int = 4; - -pub const SQLITE_ROLLBACK: c_int = 1; -pub const SQLITE_FAIL: c_int = 3; -pub const SQLITE_REPLACE: c_int = 5; - -pub const SQLITE_SCANSTAT_NLOOP: c_int = 0; -pub const SQLITE_SCANSTAT_NVISIT: c_int = 1; -pub const SQLITE_SCANSTAT_EST: c_int = 2; -pub const SQLITE_SCANSTAT_NAME: c_int = 3; -pub const SQLITE_SCANSTAT_EXPLAIN: c_int = 4; -pub const SQLITE_SCANSTAT_SELECTID: c_int = 5; -pub const SQLITE_SCANSTAT_PARENTID: c_int = 6; -pub const SQLITE_SCANSTAT_NCYCLE: c_int = 7; - -pub const SQLITE_SCANSTAT_COMPLEX: c_int = 0x0001; - -pub const SQLITE_SERIALIZE_NOCOPY: c_int = 0x001; - -pub const SQLITE_DESERIALIZE_FREEONCLOSE: c_int = 1; -pub const SQLITE_DESERIALIZE_RESIZEABLE: c_int = 2; -pub const SQLITE_DESERIALIZE_READONLY: c_int = 4; - -pub const SQLITE_SESSION_OBJCONFIG_SIZE: c_int = 1; -pub const SQLITE_SESSION_OBJCONFIG_ROWID: c_int = 2; - -pub const SQLITE_CHANGESETSTART_INVERT: c_int = 0x0002; - -pub const SQLITE_CHANGESETAPPLY_NOSAVEPOINT: c_int = 0x0001; -pub const SQLITE_CHANGESETAPPLY_INVERT: c_int = 0x0002; -pub const SQLITE_CHANGESETAPPLY_IGNORENOOP: c_int = 0x0004; -pub const SQLITE_CHANGESETAPPLY_FKNOACTION: c_int = 0x0008; - -pub const SQLITE_CHANGESET_DATA: c_int = 1; -pub const SQLITE_CHANGESET_NOTFOUND: c_int = 2; -pub const SQLITE_CHANGESET_CONFLICT: c_int = 3; -pub const SQLITE_CHANGESET_CONSTRAINT: c_int = 4; -pub const SQLITE_CHANGESET_FOREIGN_KEY: c_int = 5; - -pub const SQLITE_CHANGESET_OMIT: c_int = 0; -pub const SQLITE_CHANGESET_REPLACE: c_int = 1; -pub const SQLITE_CHANGESET_ABORT: c_int = 2; - -pub const SQLITE_SESSION_CONFIG_STRMSIZE: c_int = 1; diff --git a/src/functions.rs b/src/functions.rs deleted file mode 100644 index f1e1077..0000000 --- a/src/functions.rs +++ /dev/null @@ -1,549 +0,0 @@ -use libc::{c_char, c_double, c_int, c_uchar, c_uint, c_void}; - -use crate::types::*; - -extern "C" { - pub fn sqlite3_activate_cerod(p: *const c_char); - pub fn sqlite3_activate_see(p: *const c_char); - pub fn sqlite3_aggregate_context(p: *mut sqlite3_context, n: c_int) -> *mut c_void; - pub fn sqlite3_aggregate_count(p: *mut sqlite3_context) -> c_int; - pub fn sqlite3_auto_extension(f: Option) -> c_int; - pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) -> c_int; - pub fn sqlite3_backup_init( - p: *mut sqlite3, - p: *const c_char, - p: *mut sqlite3, - p: *const c_char, - ) -> *mut sqlite3_backup; - pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) -> c_int; - pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) -> c_int; - pub fn sqlite3_backup_step(p: *mut sqlite3_backup, n: c_int) -> c_int; - pub fn sqlite3_bind_blob( - p: *mut sqlite3_stmt, - n: c_int, - p: *const c_void, - n: c_int, - f: Option, - ) -> c_int; - pub fn sqlite3_bind_blob64( - p: *mut sqlite3_stmt, - n: c_int, - p: *const c_void, - n: sqlite3_uint64, - f: Option, - ) -> c_int; - pub fn sqlite3_bind_double(p: *mut sqlite3_stmt, n: c_int, n: c_double) -> c_int; - pub fn sqlite3_bind_int(p: *mut sqlite3_stmt, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_bind_int64(p: *mut sqlite3_stmt, n: c_int, n: sqlite3_int64) -> c_int; - pub fn sqlite3_bind_null(p: *mut sqlite3_stmt, n: c_int) -> c_int; - pub fn sqlite3_bind_parameter_count(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_bind_parameter_index(p: *mut sqlite3_stmt, p: *const c_char) -> c_int; - pub fn sqlite3_bind_parameter_name(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_bind_text( - p: *mut sqlite3_stmt, - n: c_int, - p: *const c_char, - n: c_int, - f: Option, - ) -> c_int; - pub fn sqlite3_bind_text16( - p: *mut sqlite3_stmt, - n: c_int, - p: *const c_void, - n: c_int, - f: Option, - ) -> c_int; - pub fn sqlite3_bind_text64( - p: *mut sqlite3_stmt, - n: c_int, - p: *const c_char, - n: sqlite3_uint64, - f: Option, - n: c_uchar, - ) -> c_int; - pub fn sqlite3_bind_value(p: *mut sqlite3_stmt, n: c_int, p: *const sqlite3_value) -> c_int; - pub fn sqlite3_bind_zeroblob(p: *mut sqlite3_stmt, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_bind_zeroblob64(p: *mut sqlite3_stmt, n: c_int, n: sqlite3_uint64) -> c_int; - pub fn sqlite3_blob_bytes(p: *mut sqlite3_blob) -> c_int; - pub fn sqlite3_blob_close(p: *mut sqlite3_blob) -> c_int; - pub fn sqlite3_blob_open( - p: *mut sqlite3, - p: *const c_char, - p: *const c_char, - p: *const c_char, - n: sqlite3_int64, - n: c_int, - pp: *mut *mut sqlite3_blob, - ) -> c_int; - pub fn sqlite3_blob_read(p: *mut sqlite3_blob, p: *mut c_void, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_blob_reopen(p: *mut sqlite3_blob, n: sqlite3_int64) -> c_int; - pub fn sqlite3_blob_write(p: *mut sqlite3_blob, p: *const c_void, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_busy_handler( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_busy_timeout(p: *mut sqlite3, n: c_int) -> c_int; - pub fn sqlite3_cancel_auto_extension(f: Option) -> c_int; - pub fn sqlite3_changes(p: *mut sqlite3) -> c_int; - pub fn sqlite3_clear_bindings(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_close(p: *mut sqlite3) -> c_int; - pub fn sqlite3_close_v2(p: *mut sqlite3) -> c_int; - pub fn sqlite3_collation_needed( - p: *mut sqlite3, - p: *mut c_void, - f: Option, - ) -> c_int; - pub fn sqlite3_collation_needed16( - p: *mut sqlite3, - p: *mut c_void, - f: Option, - ) -> c_int; - pub fn sqlite3_column_blob(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_bytes(p: *mut sqlite3_stmt, n: c_int) -> c_int; - pub fn sqlite3_column_bytes16(p: *mut sqlite3_stmt, n: c_int) -> c_int; - pub fn sqlite3_column_count(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_column_database_name(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_column_database_name16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_decltype(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_column_decltype16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_double(p: *mut sqlite3_stmt, n: c_int) -> c_double; - pub fn sqlite3_column_int(p: *mut sqlite3_stmt, n: c_int) -> c_int; - pub fn sqlite3_column_int64(p: *mut sqlite3_stmt, n: c_int) -> sqlite3_int64; - pub fn sqlite3_column_name(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_column_name16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_origin_name(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_column_origin_name16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_table_name(p: *mut sqlite3_stmt, n: c_int) -> *const c_char; - pub fn sqlite3_column_table_name16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_text(p: *mut sqlite3_stmt, n: c_int) -> *const c_uchar; - pub fn sqlite3_column_text16(p: *mut sqlite3_stmt, n: c_int) -> *const c_void; - pub fn sqlite3_column_type(p: *mut sqlite3_stmt, n: c_int) -> c_int; - pub fn sqlite3_column_value(p: *mut sqlite3_stmt, n: c_int) -> *mut sqlite3_value; - pub fn sqlite3_commit_hook( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_compileoption_get(n: c_int) -> *const c_char; - pub fn sqlite3_compileoption_used(p: *const c_char) -> c_int; - pub fn sqlite3_complete(p: *const c_char) -> c_int; - pub fn sqlite3_complete16(p: *const c_void) -> c_int; - pub fn sqlite3_config(n: c_int, ...) -> c_int; - pub fn sqlite3_context_db_handle(p: *mut sqlite3_context) -> *mut sqlite3; - pub fn sqlite3_create_collation( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - p: *mut c_void, - f: Option, - ) -> c_int; - pub fn sqlite3_create_collation16( - p: *mut sqlite3, - p: *const c_void, - n: c_int, - p: *mut c_void, - f: Option, - ) -> c_int; - pub fn sqlite3_create_collation_v2( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - p: *mut c_void, - f: Option, - f: Option, - ) -> c_int; - pub fn sqlite3_create_function( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - n: c_int, - p: *mut c_void, - f: Option, - f: Option, - f: Option, - ) -> c_int; - pub fn sqlite3_create_function16( - p: *mut sqlite3, - p: *const c_void, - n: c_int, - n: c_int, - p: *mut c_void, - f: Option, - f: Option, - f: Option, - ) -> c_int; - pub fn sqlite3_create_function_v2( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - n: c_int, - p: *mut c_void, - f: Option, - f: Option, - f: Option, - f: Option, - ) -> c_int; - pub fn sqlite3_create_module( - p: *mut sqlite3, - p: *const c_char, - p: *const sqlite3_module, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_create_module_v2( - p: *mut sqlite3, - p: *const c_char, - p: *const sqlite3_module, - p: *mut c_void, - f: Option, - ) -> c_int; - pub fn sqlite3_data_count(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_db_cacheflush(p: *mut sqlite3) -> c_int; - pub fn sqlite3_db_config(p: *mut sqlite3, n: c_int, ...) -> c_int; - pub fn sqlite3_db_filename(p: *mut sqlite3, p: *const c_char) -> *const c_char; - pub fn sqlite3_db_handle(p: *mut sqlite3_stmt) -> *mut sqlite3; - pub fn sqlite3_db_mutex(p: *mut sqlite3) -> *mut sqlite3_mutex; - pub fn sqlite3_db_readonly(p: *mut sqlite3, p: *const c_char) -> c_int; - pub fn sqlite3_db_release_memory(p: *mut sqlite3) -> c_int; - pub fn sqlite3_db_status( - p: *mut sqlite3, - n: c_int, - p: *mut c_int, - p: *mut c_int, - n: c_int, - ) -> c_int; - pub fn sqlite3_declare_vtab(p: *mut sqlite3, p: *const c_char) -> c_int; - pub fn sqlite3_enable_load_extension(p: *mut sqlite3, n: c_int) -> c_int; - pub fn sqlite3_enable_shared_cache(n: c_int) -> c_int; - pub fn sqlite3_errcode(p: *mut sqlite3) -> c_int; - pub fn sqlite3_errmsg(p: *mut sqlite3) -> *const c_char; - pub fn sqlite3_errmsg16(p: *mut sqlite3) -> *const c_void; - pub fn sqlite3_errstr(n: c_int) -> *const c_char; - pub fn sqlite3_exec( - p: *mut sqlite3, - p: *const c_char, - f: Option, - p: *mut c_void, - pp: *mut *mut c_char, - ) -> c_int; - pub fn sqlite3_expired(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_extended_errcode(p: *mut sqlite3) -> c_int; - pub fn sqlite3_extended_result_codes(p: *mut sqlite3, n: c_int) -> c_int; - pub fn sqlite3_expanded_sql(p: *mut sqlite3_stmt) -> *mut c_char; - pub fn sqlite3_file_control( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_finalize(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_free(p: *mut c_void); - pub fn sqlite3_free_table(pp: *mut *mut c_char); - pub fn sqlite3_get_autocommit(p: *mut sqlite3) -> c_int; - pub fn sqlite3_get_auxdata(p: *mut sqlite3_context, n: c_int) -> *mut c_void; - pub fn sqlite3_get_table( - p: *mut sqlite3, - p: *const c_char, - ppp: *mut *mut *mut c_char, - p: *mut c_int, - p: *mut c_int, - pp: *mut *mut c_char, - ) -> c_int; - pub fn sqlite3_global_recover() -> c_int; - pub fn sqlite3_initialize() -> c_int; - pub fn sqlite3_interrupt(p: *mut sqlite3); - pub fn sqlite3_key(p: *mut sqlite3, p: *const c_void, n: c_int) -> c_int; - pub fn sqlite3_key_v2(p: *mut sqlite3, p: *const c_char, p: *const c_void, n: c_int) -> c_int; - pub fn sqlite3_last_insert_rowid(p: *mut sqlite3) -> sqlite3_int64; - pub fn sqlite3_libversion() -> *const c_char; - pub fn sqlite3_libversion_number() -> c_int; - pub fn sqlite3_limit(p: *mut sqlite3, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_load_extension( - p: *mut sqlite3, - p: *const c_char, - p: *const c_char, - pp: *mut *mut c_char, - ) -> c_int; - pub fn sqlite3_log(n: c_int, p: *const c_char, ...); - pub fn sqlite3_malloc(n: c_int) -> *mut c_void; - pub fn sqlite3_malloc64(n: sqlite3_uint64) -> *mut c_void; - pub fn sqlite3_memory_alarm( - f: Option, - p: *mut c_void, - n: sqlite3_int64, - ) -> c_int; - pub fn sqlite3_memory_highwater(n: c_int) -> sqlite3_int64; - pub fn sqlite3_memory_used() -> sqlite3_int64; - pub fn sqlite3_mprintf(p: *const c_char, ...) -> *mut c_char; - pub fn sqlite3_msize(p: *mut c_void) -> sqlite3_uint64; - pub fn sqlite3_mutex_alloc(n: c_int) -> *mut sqlite3_mutex; - pub fn sqlite3_mutex_enter(p: *mut sqlite3_mutex); - pub fn sqlite3_mutex_free(p: *mut sqlite3_mutex); - pub fn sqlite3_mutex_held(p: *mut sqlite3_mutex) -> c_int; - pub fn sqlite3_mutex_leave(p: *mut sqlite3_mutex); - pub fn sqlite3_mutex_notheld(p: *mut sqlite3_mutex) -> c_int; - pub fn sqlite3_mutex_try(p: *mut sqlite3_mutex) -> c_int; - pub fn sqlite3_next_stmt(p: *mut sqlite3, p: *mut sqlite3_stmt) -> *mut sqlite3_stmt; - pub fn sqlite3_open(p: *const c_char, pp: *mut *mut sqlite3) -> c_int; - pub fn sqlite3_open16(p: *const c_void, pp: *mut *mut sqlite3) -> c_int; - pub fn sqlite3_open_v2( - p: *const c_char, - pp: *mut *mut sqlite3, - n: c_int, - p: *const c_char, - ) -> c_int; - pub fn sqlite3_os_end() -> c_int; - pub fn sqlite3_os_init() -> c_int; - pub fn sqlite3_overload_function(p: *mut sqlite3, p: *const c_char, n: c_int) -> c_int; - pub fn sqlite3_prepare( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - pp: *mut *mut sqlite3_stmt, - pp: *mut *const c_char, - ) -> c_int; - pub fn sqlite3_prepare16( - p: *mut sqlite3, - p: *const c_void, - n: c_int, - pp: *mut *mut sqlite3_stmt, - pp: *mut *const c_void, - ) -> c_int; - pub fn sqlite3_prepare16_v2( - p: *mut sqlite3, - p: *const c_void, - n: c_int, - pp: *mut *mut sqlite3_stmt, - pp: *mut *const c_void, - ) -> c_int; - pub fn sqlite3_prepare_v2( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - pp: *mut *mut sqlite3_stmt, - pp: *mut *const c_char, - ) -> c_int; - pub fn sqlite3_preupdate_count(p: *mut sqlite3) -> c_int; - pub fn sqlite3_preupdate_depth(p: *mut sqlite3) -> c_int; - pub fn sqlite3_preupdate_hook( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_preupdate_new(p: *mut sqlite3, n: c_int, pp: *mut *mut sqlite3_value) -> c_int; - pub fn sqlite3_preupdate_old(p: *mut sqlite3, n: c_int, pp: *mut *mut sqlite3_value) -> c_int; - pub fn sqlite3_profile( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_progress_handler( - p: *mut sqlite3, - n: c_int, - f: Option, - p: *mut c_void, - ); - pub fn sqlite3_randomness(n: c_int, p: *mut c_void); - pub fn sqlite3_realloc(p: *mut c_void, n: c_int) -> *mut c_void; - pub fn sqlite3_realloc64(p: *mut c_void, n: sqlite3_uint64) -> *mut c_void; - pub fn sqlite3_rekey(p: *mut sqlite3, p: *const c_void, n: c_int) -> c_int; - pub fn sqlite3_rekey_v2(p: *mut sqlite3, p: *const c_char, p: *const c_void, n: c_int) - -> c_int; - pub fn sqlite3_release_memory(n: c_int) -> c_int; - pub fn sqlite3_reset(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_reset_auto_extension(); - pub fn sqlite3_result_blob( - p: *mut sqlite3_context, - p: *const c_void, - n: c_int, - f: Option, - ); - pub fn sqlite3_result_blob64( - p: *mut sqlite3_context, - p: *const c_void, - n: sqlite3_uint64, - f: Option, - ); - pub fn sqlite3_result_double(p: *mut sqlite3_context, n: c_double); - pub fn sqlite3_result_error(p: *mut sqlite3_context, p: *const c_char, n: c_int); - pub fn sqlite3_result_error16(p: *mut sqlite3_context, p: *const c_void, n: c_int); - pub fn sqlite3_result_error_code(p: *mut sqlite3_context, n: c_int); - pub fn sqlite3_result_error_nomem(p: *mut sqlite3_context); - pub fn sqlite3_result_error_toobig(p: *mut sqlite3_context); - pub fn sqlite3_result_int(p: *mut sqlite3_context, n: c_int); - pub fn sqlite3_result_int64(p: *mut sqlite3_context, n: sqlite3_int64); - pub fn sqlite3_result_null(p: *mut sqlite3_context); - pub fn sqlite3_result_subtype(p: *mut sqlite3_context, n: c_uint); - pub fn sqlite3_result_text( - p: *mut sqlite3_context, - p: *const c_char, - n: c_int, - f: Option, - ); - pub fn sqlite3_result_text16( - p: *mut sqlite3_context, - p: *const c_void, - n: c_int, - f: Option, - ); - pub fn sqlite3_result_text16be( - p: *mut sqlite3_context, - p: *const c_void, - n: c_int, - f: Option, - ); - pub fn sqlite3_result_text16le( - p: *mut sqlite3_context, - p: *const c_void, - n: c_int, - f: Option, - ); - pub fn sqlite3_result_text64( - p: *mut sqlite3_context, - p: *const c_char, - n: sqlite3_uint64, - f: Option, - n: c_uchar, - ); - pub fn sqlite3_result_value(p: *mut sqlite3_context, p: *mut sqlite3_value); - pub fn sqlite3_result_zeroblob(p: *mut sqlite3_context, n: c_int); - pub fn sqlite3_result_zeroblob64(p: *mut sqlite3_context, n: sqlite3_uint64) -> c_int; - pub fn sqlite3_rollback_hook( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_set_authorizer( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_set_auxdata( - p: *mut sqlite3_context, - n: c_int, - p: *mut c_void, - f: Option, - ); - pub fn sqlite3_shutdown() -> c_int; - pub fn sqlite3_sleep(n: c_int) -> c_int; - pub fn sqlite3_snapshot_cmp(p: *mut sqlite3_snapshot, p: *mut sqlite3_snapshot) -> c_int; - pub fn sqlite3_snapshot_free(p: *mut sqlite3_snapshot); - pub fn sqlite3_snapshot_get( - p: *mut sqlite3, - p: *const c_char, - pp: *mut *mut sqlite3_snapshot, - ) -> c_int; - pub fn sqlite3_snapshot_open( - p: *mut sqlite3, - p: *const c_char, - p: *mut sqlite3_snapshot, - ) -> c_int; - pub fn sqlite3_snapshot_recover(p: *mut sqlite3, p: *const c_char) -> c_int; - pub fn sqlite3_snprintf(n: c_int, p: *mut c_char, p: *const c_char, ...) -> *mut c_char; - pub fn sqlite3_soft_heap_limit(n: c_int); - pub fn sqlite3_soft_heap_limit64(n: sqlite3_int64) -> sqlite3_int64; - pub fn sqlite3_sourceid() -> *const c_char; - pub fn sqlite3_sql(p: *mut sqlite3_stmt) -> *const c_char; - pub fn sqlite3_status(n: c_int, p: *mut c_int, p: *mut c_int, n: c_int) -> c_int; - pub fn sqlite3_status64( - n: c_int, - p: *mut sqlite3_int64, - p: *mut sqlite3_int64, - n: c_int, - ) -> c_int; - pub fn sqlite3_step(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_stmt_busy(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_stmt_readonly(p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_stmt_scanstatus( - p: *mut sqlite3_stmt, - n: c_int, - n: c_int, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_stmt_scanstatus_reset(p: *mut sqlite3_stmt); - pub fn sqlite3_stmt_status(p: *mut sqlite3_stmt, n: c_int, n: c_int) -> c_int; - pub fn sqlite3_strglob(p: *const c_char, p: *const c_char) -> c_int; - pub fn sqlite3_stricmp(p: *const c_char, p: *const c_char) -> c_int; - pub fn sqlite3_strlike(p: *const c_char, p: *const c_char, n: c_uint) -> c_int; - pub fn sqlite3_strnicmp(p: *const c_char, p: *const c_char, n: c_int) -> c_int; - pub fn sqlite3_system_errno(p: *mut sqlite3) -> c_int; - pub fn sqlite3_table_column_metadata( - p: *mut sqlite3, - p: *const c_char, - p: *const c_char, - p: *const c_char, - pp: *mut *const c_char, - pp: *mut *const c_char, - p: *mut c_int, - p: *mut c_int, - p: *mut c_int, - ) -> c_int; - pub fn sqlite3_test_control(n: c_int, ...) -> c_int; - pub fn sqlite3_thread_cleanup(); - pub fn sqlite3_threadsafe() -> c_int; - pub fn sqlite3_total_changes(p: *mut sqlite3) -> c_int; - pub fn sqlite3_trace( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_trace_v2( - p: *mut sqlite3, - n: c_uint, - f: Option, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_transfer_bindings(p: *mut sqlite3_stmt, p: *mut sqlite3_stmt) -> c_int; - pub fn sqlite3_unlock_notify( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> c_int; - pub fn sqlite3_update_hook( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; - pub fn sqlite3_uri_boolean(p: *const c_char, p: *const c_char, n: c_int) -> c_int; - pub fn sqlite3_uri_int64(p: *const c_char, p: *const c_char, n: sqlite3_int64) - -> sqlite3_int64; - pub fn sqlite3_uri_parameter(p: *const c_char, p: *const c_char) -> *const c_char; - pub fn sqlite3_user_data(p: *mut sqlite3_context) -> *mut c_void; - pub fn sqlite3_value_blob(p: *mut sqlite3_value) -> *const c_void; - pub fn sqlite3_value_bytes(p: *mut sqlite3_value) -> c_int; - pub fn sqlite3_value_bytes16(p: *mut sqlite3_value) -> c_int; - pub fn sqlite3_value_double(p: *mut sqlite3_value) -> c_double; - pub fn sqlite3_value_dup(p: *const sqlite3_value) -> *mut sqlite3_value; - pub fn sqlite3_value_free(p: *mut sqlite3_value); - pub fn sqlite3_value_int(p: *mut sqlite3_value) -> c_int; - pub fn sqlite3_value_int64(p: *mut sqlite3_value) -> sqlite3_int64; - pub fn sqlite3_value_numeric_type(p: *mut sqlite3_value) -> c_int; - pub fn sqlite3_value_subtype(p: *mut sqlite3_value) -> c_uint; - pub fn sqlite3_value_text(p: *mut sqlite3_value) -> *const c_uchar; - pub fn sqlite3_value_text16(p: *mut sqlite3_value) -> *const c_void; - pub fn sqlite3_value_text16be(p: *mut sqlite3_value) -> *const c_void; - pub fn sqlite3_value_text16le(p: *mut sqlite3_value) -> *const c_void; - pub fn sqlite3_value_type(p: *mut sqlite3_value) -> c_int; - // sqlite3_version - pub fn sqlite3_vfs_find(p: *const c_char) -> *mut sqlite3_vfs; - pub fn sqlite3_vfs_register(p: *mut sqlite3_vfs, n: c_int) -> c_int; - pub fn sqlite3_vfs_unregister(p: *mut sqlite3_vfs) -> c_int; - // sqlite3_vmprintf - // sqlite3_vsnprintf - pub fn sqlite3_vtab_config(p: *mut sqlite3, n: c_int, ...) -> c_int; - pub fn sqlite3_vtab_on_conflict(p: *mut sqlite3) -> c_int; - pub fn sqlite3_wal_autocheckpoint(p: *mut sqlite3, n: c_int) -> c_int; - pub fn sqlite3_wal_checkpoint(p: *mut sqlite3, p: *const c_char) -> c_int; - pub fn sqlite3_wal_checkpoint_v2( - p: *mut sqlite3, - p: *const c_char, - n: c_int, - p: *mut c_int, - p: *mut c_int, - ) -> c_int; - pub fn sqlite3_wal_hook( - p: *mut sqlite3, - f: Option, - p: *mut c_void, - ) -> *mut c_void; -} diff --git a/src/lib.rs b/src/lib.rs index 43763ce..af6e646 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,17 +2,12 @@ //! //! [1]: https://www.sqlite.org -#![allow(improper_ctypes, non_camel_case_types)] +#![allow(non_camel_case_types, non_snake_case)] #![no_std] #[cfg(feature = "linkage")] extern crate sqlite3_src; -#[rustfmt::skip] -mod constants; -mod functions; -mod types; +mod bindings; -pub use constants::*; -pub use functions::*; -pub use types::*; +pub use bindings::*; diff --git a/src/types.rs b/src/types.rs deleted file mode 100644 index 6e6eb3c..0000000 --- a/src/types.rs +++ /dev/null @@ -1,62 +0,0 @@ -use libc::{c_char, c_int, c_longlong, c_uint, c_ulonglong, c_void}; - -pub enum sqlite3 {} -pub enum sqlite3_backup {} -pub enum sqlite3_blob {} -pub enum sqlite3_context {} -pub enum sqlite3_module {} -pub enum sqlite3_mutex {} -pub enum sqlite3_snapshot {} -pub enum sqlite3_stmt {} -pub enum sqlite3_value {} -pub enum sqlite3_vfs {} - -pub type sqlite3_int64 = c_longlong; -pub type sqlite3_uint64 = c_ulonglong; - -pub type sqlite3_callback = extern "C" fn(*mut c_void); - -pub type sqlite3_auto_extension_callback = extern "C" fn(); -pub type sqlite3_busy_callback = extern "C" fn(*mut c_void, c_int) -> c_int; -pub type sqlite3_collation_need_callback = - extern "C" fn(*mut c_void, *mut sqlite3, c_int, *const c_char); -pub type sqlite3_collation_need16_callback = - extern "C" fn(*mut c_void, *mut sqlite3, c_int, *const c_void); -pub type sqlite3_commit_hook_callback = extern "C" fn(*mut c_void) -> c_int; -pub type sqlite3_create_collation_callback = - extern "C" fn(*mut c_void, c_int, *const c_void, c_int, *const c_void) -> c_int; -pub type sqlite3_create_collation16_callback = - extern "C" fn(*mut c_void, c_int, *const c_void, c_int, *const c_void) -> c_int; -pub type sqlite3_create_function_callback1 = - extern "C" fn(*mut sqlite3_context, c_int, *mut *mut sqlite3_value); -pub type sqlite3_create_function_callback2 = extern "C" fn(*mut sqlite3_context); -pub type sqlite3_exec_callback = - extern "C" fn(*mut c_void, c_int, *mut *mut c_char, *mut *mut c_char) -> c_int; -pub type sqlite3_memory_alarm_callback = extern "C" fn(*mut c_void, sqlite3_int64, c_int); -pub type sqlite3_preupdate_hook_callback = extern "C" fn( - *mut c_void, - *mut sqlite3, - c_int, - *const c_char, - *const c_char, - sqlite3_int64, - sqlite3_int64, -); -pub type sqlite3_profile_callback = extern "C" fn(*mut c_void, *const c_char, sqlite3_uint64); -pub type sqlite3_progress_handler_callback = extern "C" fn(*mut c_void) -> c_int; -pub type sqlite3_set_authorizer_callback = extern "C" fn( - *mut c_void, - c_int, - *const c_char, - *const c_char, - *const c_char, - *const c_char, -) -> c_int; -pub type sqlite3_trace_callback = extern "C" fn(*mut c_void, *const c_char); -pub type sqlite3_trace_v2_callback = - extern "C" fn(c_uint, *mut c_void, *mut c_void, *mut c_void) -> c_int; -pub type sqlite3_unlock_notify_callback = extern "C" fn(*mut *mut c_void, c_int); -pub type sqlite3_update_hook_callback = - extern "C" fn(*mut c_void, c_int, *const c_char, *const c_char, sqlite3_int64); -pub type sqlite3_wal_hook_callback = - extern "C" fn(*mut c_void, *mut sqlite3, *const c_char, c_int) -> c_int; diff --git a/tests/lib.rs b/tests/lib.rs deleted file mode 100644 index 1ceec59..0000000 --- a/tests/lib.rs +++ /dev/null @@ -1,148 +0,0 @@ -extern crate libc; -extern crate sqlite3_sys; -extern crate temporary; - -use std::ffi::{CStr, CString}; -use std::ptr; -use temporary::Directory; - -use libc::{c_char, c_int, c_void}; -use sqlite3_sys::*; - -macro_rules! c_str(($pointer:expr) => (CStr::from_ptr($pointer as *const _))); -macro_rules! c_string(($string:expr) => (ok!(CString::new($string)))); -macro_rules! ok(($result:expr) => ($result.unwrap())); -macro_rules! success(($result:expr) => (assert_eq!($result, SQLITE_OK))); - -#[test] -fn failure() { - open(|database| unsafe { test_failure(database) }); -} - -#[test] -fn workflow() { - open(|database| unsafe { test_workflow(database) }); -} - -unsafe fn test_failure(database: *mut sqlite3) { - let query = c_string!(":)"); - match sqlite3_exec( - database, - query.as_ptr(), - None, - ptr::null_mut(), - ptr::null_mut(), - ) { - SQLITE_OK => assert!(false), - _ => assert_eq!( - c_str!(sqlite3_errmsg(database)), - &c_string!(r#"unrecognized token: ":""#)[..] - ), - } -} - -unsafe fn test_workflow(database: *mut sqlite3) { - { - let query = c_string!("CREATE TABLE `users` (id INTEGER, name VARCHAR(255), age REAL);"); - success!(sqlite3_exec( - database, - query.as_ptr(), - None, - ptr::null_mut(), - ptr::null_mut() - )); - } - { - let query = c_string!("INSERT INTO `users` (id, name, age) VALUES (?, ?, ?);"); - let mut statement = ptr::null_mut(); - success!(sqlite3_prepare( - database, - query.as_ptr(), - -1, - &mut statement, - ptr::null_mut() - )); - let name = c_string!("Alice"); - success!(sqlite3_bind_int(statement, 1, 1)); - success!(sqlite3_bind_text(statement, 2, name.as_ptr(), -1, None)); - success!(sqlite3_bind_double(statement, 3, 20.99)); - assert_eq!(sqlite3_step(statement), SQLITE_DONE); - assert_eq!(sqlite3_column_count(statement), 0); - success!(sqlite3_finalize(statement)); - } - { - let query = c_string!("SELECT * FROM `users`;"); - let mut done = false; - success!(sqlite3_exec( - database, - query.as_ptr(), - Some(list), - &mut done as *mut _ as *mut _, - ptr::null_mut() - )); - assert!(done); - } - { - let query = c_string!("SELECT * FROM `users`;"); - let mut statement = ptr::null_mut(); - success!(sqlite3_prepare( - database, - query.as_ptr(), - -1, - &mut statement, - ptr::null_mut() - )); - assert_eq!(sqlite3_step(statement), SQLITE_ROW); - assert_eq!(sqlite3_column_count(statement), 3); - assert_eq!(sqlite3_column_int(statement, 0), 1); - assert_eq!( - c_str!(sqlite3_column_text(statement, 1)), - &c_string!("Alice")[..] - ); - assert_eq!(sqlite3_column_double(statement, 2), 20.99); - assert_eq!(sqlite3_step(statement), SQLITE_DONE); - assert_eq!(sqlite3_column_count(statement), 3); - success!(sqlite3_finalize(statement)); - } - - extern "C" fn list( - done: *mut c_void, - count: c_int, - values: *mut *mut c_char, - _: *mut *mut c_char, - ) -> c_int { - unsafe { - assert_eq!(count, 3); - assert_eq!(c_str!(*values), &c_string!("1")[..]); - assert_eq!(c_str!(*values.offset(1)), &c_string!("Alice")[..]); - assert_eq!(c_str!(*values.offset(2)), &c_string!("20.99")[..]); - *(done as *mut bool) = true; - } - 0 - } -} - -fn open(mut code: F) -where - F: FnMut(*mut sqlite3), -{ - let (path, _directory) = setup(); - let mut database = ptr::null_mut(); - unsafe { - success!(sqlite3_open_v2( - path.as_ptr(), - &mut database, - SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, - ptr::null() - )); - code(database); - success!(sqlite3_close(database)); - } -} - -fn setup() -> (CString, Directory) { - let directory = ok!(Directory::new("sqlite3-sys")); - let path = directory.path().join("database.sqlite3"); - let path = c_string!(ok!(path.to_str())); - (path, directory) -}