@evolu/sqlite-wasm 2.2.4 → 3.53.4-build1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -218
  3. package/dist/src/CApi.d.ts +2108 -0
  4. package/dist/src/CApi.d.ts.map +1 -0
  5. package/dist/src/CApi.js +1919 -0
  6. package/dist/src/Constants.d.ts +868 -0
  7. package/dist/src/Constants.d.ts.map +1 -0
  8. package/dist/src/Constants.js +602 -0
  9. package/dist/src/Database.d.ts +641 -0
  10. package/dist/src/Database.d.ts.map +1 -0
  11. package/dist/src/Database.js +1177 -0
  12. package/dist/src/Memory.d.ts +119 -0
  13. package/dist/src/Memory.d.ts.map +1 -0
  14. package/dist/src/Memory.js +207 -0
  15. package/dist/src/Pointer.d.ts +100 -0
  16. package/dist/src/Pointer.d.ts.map +1 -0
  17. package/dist/src/Pointer.js +15 -0
  18. package/dist/src/SahPool.d.ts +744 -0
  19. package/dist/src/SahPool.d.ts.map +1 -0
  20. package/dist/src/SahPool.js +1985 -0
  21. package/dist/src/Wasm.d.ts +315 -0
  22. package/dist/src/Wasm.d.ts.map +1 -0
  23. package/dist/src/Wasm.js +756 -0
  24. package/dist/src/WasmUrl.d.ts +21 -0
  25. package/dist/src/WasmUrl.d.ts.map +1 -0
  26. package/dist/src/WasmUrl.js +20 -0
  27. package/dist/src/c-api/index.d.ts +9 -0
  28. package/dist/src/c-api/index.d.ts.map +1 -0
  29. package/dist/src/c-api/index.js +8 -0
  30. package/dist/src/index.d.ts +15 -0
  31. package/dist/src/index.d.ts.map +1 -0
  32. package/dist/src/index.js +13 -0
  33. package/dist/wasm/sqlite3.wasm +0 -0
  34. package/package.json +60 -60
  35. package/src/CApi.test.ts +217 -0
  36. package/src/CApi.ts +3294 -0
  37. package/src/Constants.ts +803 -0
  38. package/src/Database.ts +1714 -0
  39. package/src/Memory.test.ts +319 -0
  40. package/src/Memory.ts +237 -0
  41. package/src/Pointer.ts +121 -0
  42. package/src/SahPool.test.ts +180 -0
  43. package/src/SahPool.ts +2627 -0
  44. package/src/Wasm.test.ts +444 -0
  45. package/src/Wasm.ts +1026 -0
  46. package/src/WasmUrl.ts +26 -0
  47. package/src/c-api/index.ts +9 -0
  48. package/src/index.ts +15 -0
  49. package/bin/index.js +0 -110
  50. package/index.d.ts +0 -8118
  51. package/index.mjs +0 -7
  52. package/node.mjs +0 -3
  53. package/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs +0 -13659
  54. package/sqlite-wasm/jswasm/sqlite3-node.mjs +0 -11671
  55. package/sqlite-wasm/jswasm/sqlite3-opfs-async-proxy.js +0 -691
  56. package/sqlite-wasm/jswasm/sqlite3-worker1-bundler-friendly.mjs +0 -35
  57. package/sqlite-wasm/jswasm/sqlite3-worker1-promiser.js +0 -193
  58. package/sqlite-wasm/jswasm/sqlite3-worker1-promiser.mjs +0 -187
  59. package/sqlite-wasm/jswasm/sqlite3-worker1.js +0 -46
  60. package/sqlite-wasm/jswasm/sqlite3.js +0 -13697
  61. package/sqlite-wasm/jswasm/sqlite3.mjs +0 -13661
  62. package/sqlite-wasm/jswasm/sqlite3.wasm +0 -0
@@ -0,0 +1,2108 @@
1
+ /**
2
+ * SQLite's C API as standalone functions: one for every public C function the
3
+ * binary exports, and one for each of the variadic {@link sqlite3_config},
4
+ * {@link sqlite3_db_config} and {@link sqlite3_vtab_config}, which the binary
5
+ * exports only as the build's `sqlite3__wasm_*` shims.
6
+ *
7
+ * Each function takes {@link SqliteWasmDep} and returns the wasm export itself,
8
+ * typed with branded pointers and raw result codes, so a call costs no
9
+ * JavaScript wrapper. A variadic function whose options need different shims
10
+ * returns a function that passes each option to its shim, as SQLite's
11
+ * JavaScript does. Bind once per database, never per row. Strings are C string
12
+ * pointers; nothing allocates implicitly. A callback parameter takes a function
13
+ * pointer, such as one {@link installWasmFunctions} returns.
14
+ *
15
+ * Each function's documentation gives its wasm type and its signature in the
16
+ * syntax of SQLite's table, where `funcptr:` and the callback's signature stand
17
+ * for a callback argument.
18
+ *
19
+ * Generated by `scripts/generate.mts` from SQLite's own signature table in
20
+ * `scripts/upstream/sqlite3-api-glue.c-pp.js` and the metadata in
21
+ * `scripts/bindings.mts`, with every wasm type checked against the binary's
22
+ * pinned exports. Do not edit.
23
+ *
24
+ * @module
25
+ */
26
+ import { SQLITE_CONFIG_COVERING_INDEX_SCAN, SQLITE_CONFIG_LOOKASIDE, SQLITE_CONFIG_MEMDB_MAXSIZE, SQLITE_CONFIG_MEMSTATUS, SQLITE_CONFIG_SMALL_MALLOC, SQLITE_CONFIG_SORTERREF_SIZE, SQLITE_CONFIG_STMTJRNL_SPILL, SQLITE_CONFIG_URI, SQLITE_DBCONFIG_DEFENSIVE, SQLITE_DBCONFIG_DQS_DDL, SQLITE_DBCONFIG_DQS_DML, SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE, SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE, SQLITE_DBCONFIG_ENABLE_COMMENTS, SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SQLITE_DBCONFIG_ENABLE_QPSG, SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_DBCONFIG_ENABLE_VIEW, SQLITE_DBCONFIG_FP_DIGITS, SQLITE_DBCONFIG_LEGACY_ALTER_TABLE, SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, SQLITE_DBCONFIG_LOOKASIDE, SQLITE_DBCONFIG_MAINDBNAME, SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE, SQLITE_DBCONFIG_RESET_DATABASE, SQLITE_DBCONFIG_REVERSE_SCANORDER, SQLITE_DBCONFIG_STMT_SCANSTATUS, SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_DBCONFIG_TRUSTED_SCHEMA, SQLITE_DBCONFIG_WRITABLE_SCHEMA, type SQLITE_VTAB_CONSTRAINT_SUPPORT, type SQLITE_VTAB_DIRECTONLY, type SQLITE_VTAB_INNOCUOUS, type SqliteDataType, type SqliteResultCode } from "./Constants.ts";
27
+ import type { CStringPtr, NullPtr, SqliteContextPtr, SqliteDbPtr, SqliteDestructor, SqliteFilenamePtr, SqliteFunctionPtr, SqliteIndexInfoPtr, SqliteOwnedCStringPtr, SqliteOwnedPtr, SqliteOwnedValuePtr, SqliteStmtPtr, SqliteValuePtr, SqliteVfsPtr, WasmPtr } from "./Pointer.ts";
28
+ import type { SqliteWasmDep } from "./Wasm.ts";
29
+ /**
30
+ * The C functions this package binds, and the build's shims of the variadic
31
+ * ones, as the wasm exports them.
32
+ */
33
+ export interface SqliteCExports {
34
+ readonly sqlite3_initialize: () => SqliteResultCode;
35
+ readonly sqlite3_shutdown: () => SqliteResultCode;
36
+ readonly sqlite3_libversion: () => CStringPtr;
37
+ readonly sqlite3_libversion_number: () => number;
38
+ readonly sqlite3_sourceid: () => CStringPtr;
39
+ readonly sqlite3_compileoption_get: (N: number) => CStringPtr | NullPtr;
40
+ readonly sqlite3_compileoption_used: (zOptName: CStringPtr) => number;
41
+ readonly sqlite3_status: (op: number, pCurrent: WasmPtr, pHighwater: WasmPtr, resetFlag: number) => SqliteResultCode;
42
+ readonly sqlite3_status64: (op: number, pCurrent: WasmPtr, pHighwater: WasmPtr, resetFlag: number) => SqliteResultCode;
43
+ readonly sqlite3_auto_extension: (xEntryPoint: SqliteFunctionPtr) => SqliteResultCode;
44
+ readonly sqlite3_cancel_auto_extension: (xEntryPoint: SqliteFunctionPtr) => number;
45
+ readonly sqlite3_reset_auto_extension: () => void;
46
+ readonly sqlite3_randomness: (N: number, P: WasmPtr | NullPtr) => void;
47
+ readonly sqlite3_complete: (sql: CStringPtr) => number;
48
+ readonly sqlite3_keyword_count: () => number;
49
+ readonly sqlite3_keyword_name: (index: number, pzName: WasmPtr, pnName: WasmPtr) => SqliteResultCode;
50
+ readonly sqlite3_keyword_check: (zName: WasmPtr, nName: number) => number;
51
+ readonly sqlite3_strglob: (zGlob: CStringPtr, zStr: CStringPtr) => number;
52
+ readonly sqlite3_strlike: (zGlob: CStringPtr, zStr: CStringPtr, cEsc: number) => number;
53
+ readonly sqlite3_stricmp: (zLeft: CStringPtr, zRight: CStringPtr) => number;
54
+ readonly sqlite3_strnicmp: (zLeft: CStringPtr, zRight: CStringPtr, N: number) => number;
55
+ readonly sqlite3_malloc: (byteLength: number) => SqliteOwnedPtr | NullPtr;
56
+ readonly sqlite3_malloc64: (byteLength: bigint) => SqliteOwnedPtr | NullPtr;
57
+ readonly sqlite3_realloc: (ptr: SqliteOwnedPtr | NullPtr, byteLength: number) => SqliteOwnedPtr | NullPtr;
58
+ readonly sqlite3_realloc64: (ptr: SqliteOwnedPtr | NullPtr, byteLength: bigint) => SqliteOwnedPtr | NullPtr;
59
+ readonly sqlite3_msize: (ptr: SqliteOwnedPtr | NullPtr) => bigint;
60
+ readonly sqlite3_free: (ptr: SqliteOwnedPtr | NullPtr) => void;
61
+ readonly sqlite3_open: (filename: CStringPtr, ppDb: WasmPtr) => SqliteResultCode;
62
+ readonly sqlite3_open_v2: (filename: CStringPtr, ppDb: WasmPtr, flags: number, zVfs: CStringPtr | NullPtr) => SqliteResultCode;
63
+ readonly sqlite3_close_v2: (db: SqliteDbPtr | NullPtr) => SqliteResultCode;
64
+ readonly sqlite3_db_filename: (db: SqliteDbPtr, zDbName: CStringPtr) => SqliteFilenamePtr | NullPtr;
65
+ readonly sqlite3_db_name: (db: SqliteDbPtr, N: number) => CStringPtr | NullPtr;
66
+ readonly sqlite3_db_readonly: (db: SqliteDbPtr, zDbName: CStringPtr) => number;
67
+ readonly sqlite3_txn_state: (db: SqliteDbPtr, zSchema: CStringPtr | NullPtr) => number;
68
+ readonly sqlite3_get_autocommit: (db: SqliteDbPtr) => number;
69
+ readonly sqlite3_limit: (db: SqliteDbPtr, id: number, newVal: number) => number;
70
+ readonly sqlite3_busy_handler: (db: SqliteDbPtr, xBusy: SqliteFunctionPtr | NullPtr, pArg: WasmPtr | NullPtr) => SqliteResultCode;
71
+ readonly sqlite3_busy_timeout: (db: SqliteDbPtr, ms: number) => SqliteResultCode;
72
+ readonly sqlite3_interrupt: (db: SqliteDbPtr) => void;
73
+ readonly sqlite3_is_interrupted: (db: SqliteDbPtr) => number;
74
+ readonly sqlite3_extended_result_codes: (db: SqliteDbPtr, onoff: number) => SqliteResultCode;
75
+ readonly sqlite3_file_control: (db: SqliteDbPtr, zDbName: CStringPtr | NullPtr, op: number, pArg: WasmPtr | NullPtr) => SqliteResultCode;
76
+ readonly sqlite3_table_column_metadata: (db: SqliteDbPtr, zDbName: CStringPtr | NullPtr, zTableName: CStringPtr, zColumnName: CStringPtr | NullPtr, pzDataType: WasmPtr | NullPtr, pzCollSeq: WasmPtr | NullPtr, pNotNull: WasmPtr | NullPtr, pPrimaryKey: WasmPtr | NullPtr, pAutoinc: WasmPtr | NullPtr) => SqliteResultCode;
77
+ readonly sqlite3_db_status: (db: SqliteDbPtr, op: number, pCur: WasmPtr, pHiwtr: WasmPtr, resetFlg: number) => SqliteResultCode;
78
+ readonly sqlite3_db_status64: (db: SqliteDbPtr, op: number, pCur: WasmPtr, pHiwtr: WasmPtr, resetFlg: number) => SqliteResultCode;
79
+ readonly sqlite3_last_insert_rowid: (db: SqliteDbPtr) => bigint;
80
+ readonly sqlite3_set_last_insert_rowid: (db: SqliteDbPtr, rowid: bigint) => void;
81
+ readonly sqlite3_changes: (db: SqliteDbPtr) => number;
82
+ readonly sqlite3_changes64: (db: SqliteDbPtr) => bigint;
83
+ readonly sqlite3_total_changes: (db: SqliteDbPtr) => number;
84
+ readonly sqlite3_total_changes64: (db: SqliteDbPtr) => bigint;
85
+ readonly sqlite3_exec: (db: SqliteDbPtr, sql: CStringPtr | NullPtr, callback: SqliteFunctionPtr | NullPtr, pArg: WasmPtr | NullPtr, errmsg: WasmPtr | NullPtr) => SqliteResultCode;
86
+ readonly sqlite3_serialize: {
87
+ (db: SqliteDbPtr, zSchema: CStringPtr | NullPtr, piSize: WasmPtr | NullPtr, mFlags: 0): SqliteOwnedPtr | NullPtr;
88
+ (db: SqliteDbPtr, zSchema: CStringPtr | NullPtr, piSize: WasmPtr | NullPtr, mFlags: number): WasmPtr | NullPtr;
89
+ };
90
+ readonly sqlite3_deserialize: (db: SqliteDbPtr, zSchema: CStringPtr | NullPtr, pData: WasmPtr, szDb: bigint, szBuf: bigint, mFlags: number) => SqliteResultCode;
91
+ readonly sqlite3_errcode: (db: SqliteDbPtr) => SqliteResultCode;
92
+ readonly sqlite3_extended_errcode: (db: SqliteDbPtr) => SqliteResultCode;
93
+ readonly sqlite3_errmsg: (db: SqliteDbPtr) => CStringPtr | NullPtr;
94
+ readonly sqlite3_errstr: (code: SqliteResultCode) => CStringPtr | NullPtr;
95
+ readonly sqlite3_error_offset: (db: SqliteDbPtr) => number;
96
+ readonly sqlite3_set_errmsg: (db: SqliteDbPtr, errcode: SqliteResultCode, zErrMsg: CStringPtr | NullPtr) => SqliteResultCode;
97
+ readonly sqlite3_commit_hook: (db: SqliteDbPtr, xCallback: SqliteFunctionPtr | NullPtr, pArg: WasmPtr | NullPtr) => WasmPtr | NullPtr;
98
+ readonly sqlite3_rollback_hook: (db: SqliteDbPtr, xCallback: SqliteFunctionPtr | NullPtr, pArg: WasmPtr | NullPtr) => WasmPtr | NullPtr;
99
+ readonly sqlite3_update_hook: (db: SqliteDbPtr, xCallback: SqliteFunctionPtr | NullPtr, pArg: WasmPtr | NullPtr) => WasmPtr | NullPtr;
100
+ readonly sqlite3_trace_v2: (db: SqliteDbPtr, uMask: number, xCallback: SqliteFunctionPtr | NullPtr, pCtx: WasmPtr | NullPtr) => SqliteResultCode;
101
+ readonly sqlite3_collation_needed: (db: SqliteDbPtr, pArg: WasmPtr | NullPtr, xCollNeeded: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
102
+ readonly sqlite3_prepare_v2: (db: SqliteDbPtr, zSql: WasmPtr, nByte: number, ppStmt: WasmPtr, pzTail: WasmPtr | NullPtr) => SqliteResultCode;
103
+ readonly sqlite3_prepare_v3: (db: SqliteDbPtr, zSql: WasmPtr, nByte: number, prepFlags: number, ppStmt: WasmPtr, pzTail: WasmPtr | NullPtr) => SqliteResultCode;
104
+ readonly sqlite3_step: (pStmt: SqliteStmtPtr) => SqliteResultCode;
105
+ readonly sqlite3_reset: (pStmt: SqliteStmtPtr) => SqliteResultCode;
106
+ readonly sqlite3_finalize: (pStmt: SqliteStmtPtr | NullPtr) => SqliteResultCode;
107
+ readonly sqlite3_next_stmt: (pDb: SqliteDbPtr, pStmt: SqliteStmtPtr | NullPtr) => SqliteStmtPtr | NullPtr;
108
+ readonly sqlite3_db_handle: (pStmt: SqliteStmtPtr) => SqliteDbPtr;
109
+ readonly sqlite3_sql: (pStmt: SqliteStmtPtr) => CStringPtr | NullPtr;
110
+ readonly sqlite3_expanded_sql: (pStmt: SqliteStmtPtr) => SqliteOwnedCStringPtr | NullPtr;
111
+ readonly sqlite3_stmt_busy: (pStmt: SqliteStmtPtr | NullPtr) => number;
112
+ readonly sqlite3_stmt_readonly: (pStmt: SqliteStmtPtr) => number;
113
+ readonly sqlite3_stmt_explain: (pStmt: SqliteStmtPtr, eMode: number) => SqliteResultCode;
114
+ readonly sqlite3_stmt_isexplain: (pStmt: SqliteStmtPtr | NullPtr) => number;
115
+ readonly sqlite3_stmt_status: (pStmt: SqliteStmtPtr, op: number, resetFlg: number) => number;
116
+ readonly sqlite3_bind_parameter_count: (pStmt: SqliteStmtPtr) => number;
117
+ readonly sqlite3_bind_parameter_index: (pStmt: SqliteStmtPtr, zName: CStringPtr) => number;
118
+ readonly sqlite3_bind_parameter_name: (pStmt: SqliteStmtPtr, index: number) => CStringPtr | NullPtr;
119
+ readonly sqlite3_bind_null: (pStmt: SqliteStmtPtr, index: number) => SqliteResultCode;
120
+ readonly sqlite3_bind_int: (pStmt: SqliteStmtPtr, index: number, value: number) => SqliteResultCode;
121
+ readonly sqlite3_bind_int64: (pStmt: SqliteStmtPtr, index: number, value: bigint) => SqliteResultCode;
122
+ readonly sqlite3_bind_double: (pStmt: SqliteStmtPtr, index: number, value: number) => SqliteResultCode;
123
+ readonly sqlite3_bind_text: (pStmt: SqliteStmtPtr, index: number, value: WasmPtr | NullPtr, n: number, destructor: SqliteDestructor) => SqliteResultCode;
124
+ readonly sqlite3_bind_blob: (pStmt: SqliteStmtPtr, index: number, value: WasmPtr | NullPtr, n: number, destructor: SqliteDestructor) => SqliteResultCode;
125
+ readonly sqlite3_bind_zeroblob: (pStmt: SqliteStmtPtr, index: number, n: number) => SqliteResultCode;
126
+ readonly sqlite3_bind_pointer: (pStmt: SqliteStmtPtr, index: number, pPtr: WasmPtr | NullPtr, zPType: CStringPtr, xDestructor: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
127
+ readonly sqlite3_clear_bindings: (pStmt: SqliteStmtPtr) => SqliteResultCode;
128
+ readonly sqlite3_column_count: (pStmt: SqliteStmtPtr) => number;
129
+ readonly sqlite3_data_count: (pStmt: SqliteStmtPtr | NullPtr) => number;
130
+ readonly sqlite3_column_name: (pStmt: SqliteStmtPtr, N: number) => CStringPtr | NullPtr;
131
+ readonly sqlite3_column_decltype: (pStmt: SqliteStmtPtr, iCol: number) => CStringPtr | NullPtr;
132
+ readonly sqlite3_column_type: (pStmt: SqliteStmtPtr, iCol: number) => SqliteDataType;
133
+ readonly sqlite3_column_int: (pStmt: SqliteStmtPtr, iCol: number) => number;
134
+ readonly sqlite3_column_int64: (pStmt: SqliteStmtPtr, iCol: number) => bigint;
135
+ readonly sqlite3_column_double: (pStmt: SqliteStmtPtr, iCol: number) => number;
136
+ readonly sqlite3_column_text: (pStmt: SqliteStmtPtr, iCol: number) => WasmPtr | NullPtr;
137
+ readonly sqlite3_column_blob: (pStmt: SqliteStmtPtr, iCol: number) => WasmPtr | NullPtr;
138
+ readonly sqlite3_column_bytes: (pStmt: SqliteStmtPtr, iCol: number) => number;
139
+ readonly sqlite3_column_value: (pStmt: SqliteStmtPtr, iCol: number) => SqliteValuePtr;
140
+ readonly sqlite3_value_type: (value: SqliteValuePtr) => SqliteDataType;
141
+ readonly sqlite3_value_numeric_type: (value: SqliteValuePtr) => SqliteDataType;
142
+ readonly sqlite3_value_int: (value: SqliteValuePtr) => number;
143
+ readonly sqlite3_value_int64: (value: SqliteValuePtr) => bigint;
144
+ readonly sqlite3_value_double: (value: SqliteValuePtr) => number;
145
+ readonly sqlite3_value_text: (value: SqliteValuePtr) => WasmPtr | NullPtr;
146
+ readonly sqlite3_value_blob: (value: SqliteValuePtr) => WasmPtr | NullPtr;
147
+ readonly sqlite3_value_bytes: (value: SqliteValuePtr) => number;
148
+ readonly sqlite3_value_pointer: (value: SqliteValuePtr, zPType: CStringPtr) => WasmPtr | NullPtr;
149
+ readonly sqlite3_value_subtype: (value: SqliteValuePtr) => number;
150
+ readonly sqlite3_value_frombind: (value: SqliteValuePtr) => number;
151
+ readonly sqlite3_value_nochange: (value: SqliteValuePtr) => number;
152
+ readonly sqlite3_value_dup: (value: SqliteValuePtr | NullPtr) => SqliteOwnedValuePtr | NullPtr;
153
+ readonly sqlite3_value_free: (value: SqliteOwnedValuePtr | NullPtr) => void;
154
+ readonly sqlite3_create_function: (db: SqliteDbPtr, zFunctionName: CStringPtr, nArg: number, eTextRep: number, pApp: WasmPtr | NullPtr, xFunc: SqliteFunctionPtr | NullPtr, xStep: SqliteFunctionPtr | NullPtr, xFinal: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
155
+ readonly sqlite3_create_function_v2: (db: SqliteDbPtr, zFunctionName: CStringPtr, nArg: number, eTextRep: number, pApp: WasmPtr | NullPtr, xFunc: SqliteFunctionPtr | NullPtr, xStep: SqliteFunctionPtr | NullPtr, xFinal: SqliteFunctionPtr | NullPtr, xDestroy: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
156
+ readonly sqlite3_overload_function: (db: SqliteDbPtr, zFuncName: CStringPtr, nArg: number) => SqliteResultCode;
157
+ readonly sqlite3_create_collation: (db: SqliteDbPtr, zName: CStringPtr, eTextRep: number, pArg: WasmPtr | NullPtr, xCompare: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
158
+ readonly sqlite3_create_collation_v2: (db: SqliteDbPtr, zName: CStringPtr, eTextRep: number, pArg: WasmPtr | NullPtr, xCompare: SqliteFunctionPtr | NullPtr, xDestroy: SqliteFunctionPtr | NullPtr) => SqliteResultCode;
159
+ readonly sqlite3_user_data: (context: SqliteContextPtr) => WasmPtr | NullPtr;
160
+ readonly sqlite3_context_db_handle: (context: SqliteContextPtr) => SqliteDbPtr;
161
+ readonly sqlite3_aggregate_context: (context: SqliteContextPtr, nBytes: number) => WasmPtr | NullPtr;
162
+ readonly sqlite3_get_auxdata: (context: SqliteContextPtr, N: number) => WasmPtr | NullPtr;
163
+ readonly sqlite3_set_auxdata: (context: SqliteContextPtr, N: number, pAux: WasmPtr | NullPtr, xDelete: SqliteFunctionPtr | NullPtr) => void;
164
+ readonly sqlite3_result_null: (context: SqliteContextPtr) => void;
165
+ readonly sqlite3_result_int: (context: SqliteContextPtr, value: number) => void;
166
+ readonly sqlite3_result_int64: (context: SqliteContextPtr, value: bigint) => void;
167
+ readonly sqlite3_result_double: (context: SqliteContextPtr, value: number) => void;
168
+ readonly sqlite3_result_text: (context: SqliteContextPtr, value: WasmPtr | NullPtr, n: number, destructor: SqliteDestructor) => void;
169
+ readonly sqlite3_result_blob: (context: SqliteContextPtr, value: WasmPtr | NullPtr, n: number, destructor: SqliteDestructor) => void;
170
+ readonly sqlite3_result_zeroblob: (context: SqliteContextPtr, n: number) => void;
171
+ readonly sqlite3_result_zeroblob64: (context: SqliteContextPtr, n: bigint) => SqliteResultCode;
172
+ readonly sqlite3_result_pointer: (context: SqliteContextPtr, pPtr: WasmPtr | NullPtr, zPType: CStringPtr, xDestructor: SqliteFunctionPtr | NullPtr) => void;
173
+ readonly sqlite3_result_subtype: (context: SqliteContextPtr, subtype: number) => void;
174
+ readonly sqlite3_result_error: (context: SqliteContextPtr, message: WasmPtr, n: number) => void;
175
+ readonly sqlite3_result_error_code: (context: SqliteContextPtr, code: SqliteResultCode) => void;
176
+ readonly sqlite3_result_error_nomem: (context: SqliteContextPtr) => void;
177
+ readonly sqlite3_result_error_toobig: (context: SqliteContextPtr) => void;
178
+ readonly sqlite3_uri_parameter: (z: SqliteFilenamePtr | NullPtr, zParam: CStringPtr) => CStringPtr | NullPtr;
179
+ readonly sqlite3_uri_boolean: (z: SqliteFilenamePtr | NullPtr, zParam: CStringPtr, bDefault: number) => number;
180
+ readonly sqlite3_uri_int64: (z: SqliteFilenamePtr | NullPtr, zParam: CStringPtr, iDefault: bigint) => bigint;
181
+ readonly sqlite3_uri_key: (z: SqliteFilenamePtr, N: number) => CStringPtr | NullPtr;
182
+ readonly sqlite3_vfs_find: (zVfsName: CStringPtr | NullPtr) => SqliteVfsPtr | NullPtr;
183
+ readonly sqlite3_vfs_register: (vfs: SqliteVfsPtr, makeDflt: number) => SqliteResultCode;
184
+ readonly sqlite3_vfs_unregister: (vfs: SqliteVfsPtr) => SqliteResultCode;
185
+ readonly sqlite3_vtab_on_conflict: (db: SqliteDbPtr) => number;
186
+ readonly sqlite3_vtab_nochange: (context: SqliteContextPtr) => number;
187
+ readonly sqlite3_vtab_collation: (indexInfo: SqliteIndexInfoPtr, iCons: number) => CStringPtr | NullPtr;
188
+ readonly sqlite3_vtab_distinct: (indexInfo: SqliteIndexInfoPtr) => number;
189
+ readonly sqlite3_vtab_in: (indexInfo: SqliteIndexInfoPtr, iCons: number, bHandle: number) => number;
190
+ readonly sqlite3_vtab_in_first: (pVal: SqliteValuePtr, ppOut: WasmPtr) => SqliteResultCode;
191
+ readonly sqlite3_vtab_in_next: (pVal: SqliteValuePtr, ppOut: WasmPtr) => SqliteResultCode;
192
+ readonly sqlite3_vtab_rhs_value: (indexInfo: SqliteIndexInfoPtr, iCons: number, ppVal: WasmPtr) => SqliteResultCode;
193
+ /**
194
+ * The build's shim that calls {@link sqlite3_config} with one int for any
195
+ * option, unchecked. sqlite3_config calls it only for the options that take
196
+ * an int.
197
+ *
198
+ * Wasm type `i(ii)`.
199
+ */
200
+ readonly sqlite3__wasm_config_i: (op: number, value: number) => SqliteResultCode;
201
+ /**
202
+ * The build's shim that calls {@link sqlite3_config} with two ints for any
203
+ * option, unchecked. sqlite3_config calls it only for
204
+ * SQLITE_CONFIG_LOOKASIDE.
205
+ *
206
+ * Wasm type `i(iii)`.
207
+ */
208
+ readonly sqlite3__wasm_config_ii: (op: number, sz: number, cnt: number) => SqliteResultCode;
209
+ /**
210
+ * The build's shim that calls {@link sqlite3_config} with a 64-bit integer for
211
+ * any option, unchecked. sqlite3_config calls it only for
212
+ * SQLITE_CONFIG_MEMDB_MAXSIZE.
213
+ *
214
+ * Wasm type `i(ij)`.
215
+ */
216
+ readonly sqlite3__wasm_config_j: (op: number, value: bigint) => SqliteResultCode;
217
+ /**
218
+ * The build's shim that calls {@link sqlite3_db_config} with a string for
219
+ * SQLITE_DBCONFIG_MAINDBNAME, and returns SQLITE_MISUSE for any other
220
+ * option.
221
+ *
222
+ * Wasm type `i(iii)`.
223
+ */
224
+ readonly sqlite3__wasm_db_config_s: (db: SqliteDbPtr, op: number, zName: CStringPtr) => SqliteResultCode;
225
+ /**
226
+ * The build's shim that calls {@link sqlite3_db_config} with a pointer and two
227
+ * ints for SQLITE_DBCONFIG_LOOKASIDE, and returns SQLITE_MISUSE for any other
228
+ * option.
229
+ *
230
+ * Wasm type `i(iiiii)`.
231
+ */
232
+ readonly sqlite3__wasm_db_config_pii: (db: SqliteDbPtr, op: number, buf: WasmPtr | NullPtr, sz: number, cnt: number) => SqliteResultCode;
233
+ /**
234
+ * The build's shim that calls {@link sqlite3_db_config} with an int and an
235
+ * `int*` for the options that take them, and returns SQLITE_MISUSE for any
236
+ * other option.
237
+ *
238
+ * Wasm type `i(iiii)`.
239
+ */
240
+ readonly sqlite3__wasm_db_config_ip: (db: SqliteDbPtr, op: number, value: number, pResult: WasmPtr | NullPtr) => SqliteResultCode;
241
+ /**
242
+ * The build's shim that calls {@link sqlite3_vtab_config} with an int for
243
+ * SQLITE_VTAB_CONSTRAINT_SUPPORT and without it for SQLITE_VTAB_INNOCUOUS and
244
+ * SQLITE_VTAB_DIRECTONLY, and returns SQLITE_MISUSE for any other option.
245
+ *
246
+ * Wasm type `i(iii)`.
247
+ */
248
+ readonly sqlite3__wasm_vtab_config: (db: SqliteDbPtr, op: number, value: number) => SqliteResultCode;
249
+ }
250
+ /**
251
+ * Initializes the library, returning SQLITE_OK or an error code. Once the
252
+ * library is initialized, further calls are harmless no-ops until
253
+ * {@link sqlite3_shutdown}.
254
+ *
255
+ * Wasm type `i()`. Signature `["sqlite3_initialize", undefined]` from SQLite's
256
+ * table, with the result corrected: SQLite's table declares no result, but the
257
+ * C function returns a result code, as the wasm type shows.
258
+ *
259
+ * See https://sqlite.org/c3ref/initialize.html.
260
+ */
261
+ export declare const sqlite3_initialize: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_initialize"];
262
+ /**
263
+ * Deallocates the resources {@link sqlite3_initialize} allocated. Every
264
+ * connection must be closed and every other SQLite resource freed first; only
265
+ * the first call after an initialization has an effect. Then initialize the
266
+ * library again with initializeSqliteWasm. sqlite3_initialize alone, or any
267
+ * call that initializes the library itself, such as an open, makes the unix VFS
268
+ * the default again, from which the generator of {@link sqlite3_randomness},
269
+ * when reset or unused since loading, seeds itself with the time and a constant
270
+ * pid instead of RandomBytes, and registers kvvfs again, which traps when
271
+ * :localStorage: is opened.
272
+ *
273
+ * Wasm type `i()`. Signature `["sqlite3_shutdown", undefined]` from SQLite's
274
+ * table, with the result corrected: SQLite's table declares no result, but the
275
+ * C function returns a result code, as the wasm type shows.
276
+ *
277
+ * See https://sqlite.org/c3ref/initialize.html.
278
+ */
279
+ export declare const sqlite3_shutdown: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_shutdown"];
280
+ /**
281
+ * Returns the library's version string, the SQLITE_VERSION it was built with,
282
+ * in static memory.
283
+ *
284
+ * Wasm type `i()`. Signature `["sqlite3_libversion", "string"]` from SQLite's
285
+ * table.
286
+ *
287
+ * See https://sqlite.org/c3ref/libversion.html.
288
+ */
289
+ export declare const sqlite3_libversion: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_libversion"];
290
+ /**
291
+ * Returns the SQLITE_VERSION_NUMBER the library was built with.
292
+ *
293
+ * Wasm type `i()`. Signature `["sqlite3_libversion_number", "int"]` from
294
+ * SQLite's table.
295
+ *
296
+ * See https://sqlite.org/c3ref/libversion.html.
297
+ */
298
+ export declare const sqlite3_libversion_number: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_libversion_number"];
299
+ /**
300
+ * Returns the date, time and check-in hash of the SQLite source the library was
301
+ * built from, as a static string.
302
+ *
303
+ * Wasm type `i()`. Signature `["sqlite3_sourceid", "string"]` from SQLite's
304
+ * table.
305
+ *
306
+ * See https://sqlite.org/c3ref/libversion.html.
307
+ */
308
+ export declare const sqlite3_sourceid: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_sourceid"];
309
+ /**
310
+ * Returns the N-th option defined at compile time, without its SQLITE_ prefix,
311
+ * or NULL when N is out of range. The string is static.
312
+ *
313
+ * Wasm type `i(i)`. Signature `["sqlite3_compileoption_get", "string", "int"]`
314
+ * from SQLite's table.
315
+ *
316
+ * See https://sqlite.org/c3ref/compileoption_get.html.
317
+ */
318
+ export declare const sqlite3_compileoption_get: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_compileoption_get"];
319
+ /**
320
+ * Returns 1 if the named option, with or without its SQLITE_ prefix, was
321
+ * defined at compile time, and 0 otherwise.
322
+ *
323
+ * Wasm type `i(i)`. Signature `["sqlite3_compileoption_used", "int", "string"]`
324
+ * from SQLite's table.
325
+ *
326
+ * See https://sqlite.org/c3ref/compileoption_get.html.
327
+ */
328
+ export declare const sqlite3_compileoption_used: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_compileoption_used"];
329
+ /**
330
+ * Reads a global SQLITE_STATUS_* counter into `*pCurrent` and its highwater
331
+ * mark into `*pHighwater`, resetting the mark when resetFlag is non-zero. A
332
+ * counter that tracks only one of the two leaves the other unwritten, and
333
+ * values beyond 32 bits are undefined.
334
+ *
335
+ * Wasm type `i(iiii)`. Signature `["sqlite3_status", "int", "int", "*", "*",
336
+ * "int"]` from SQLite's table.
337
+ *
338
+ * See https://sqlite.org/c3ref/status.html.
339
+ */
340
+ export declare const sqlite3_status: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_status"];
341
+ /**
342
+ * Reads a global SQLITE_STATUS_* counter into the sqlite3_int64 at pCurrent and
343
+ * its highwater mark into the sqlite3_int64 at pHighwater, 8 bytes each,
344
+ * resetting the mark when resetFlag is non-zero. Some counters leave one of the
345
+ * two outputs unwritten.
346
+ *
347
+ * Wasm type `i(iiii)`. Signature `["sqlite3_status64", "int", "int", "*", "*",
348
+ * "int"]` from SQLite's table.
349
+ *
350
+ * See https://sqlite.org/c3ref/status.html.
351
+ */
352
+ export declare const sqlite3_status64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_status64"];
353
+ /**
354
+ * Registers an entry point that SQLite calls for every new connection, where an
355
+ * error it returns fails the open; registering one twice is a no-op. Despite
356
+ * the `void (*)(void)` prototype SQLite calls it as `int xEntryPoint(sqlite3
357
+ * *db, char **pzErrMsg, const sqlite3_api_routines *pThunk)`, so its function
358
+ * table entry must have that type.
359
+ *
360
+ * Wasm type `i(i)`. Signature `["sqlite3_auto_extension", "int",
361
+ * "funcptr:i(ppp)"]` from Evolu's supplement: SQLite binds the auto-extension
362
+ * functions by hand to manage the JavaScript functions it converts.
363
+ *
364
+ * See https://sqlite.org/c3ref/auto_extension.html.
365
+ */
366
+ export declare const sqlite3_auto_extension: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_auto_extension"];
367
+ /**
368
+ * Unregisters an entry point {@link sqlite3_auto_extension} registered,
369
+ * returning 1 when it was registered and 0 otherwise.
370
+ *
371
+ * Wasm type `i(i)`. Signature `["sqlite3_cancel_auto_extension", "int",
372
+ * "funcptr:i(ppp)"]` from Evolu's supplement: SQLite binds the auto-extension
373
+ * functions by hand to manage the JavaScript functions it converts.
374
+ *
375
+ * See https://sqlite.org/c3ref/cancel_auto_extension.html.
376
+ */
377
+ export declare const sqlite3_cancel_auto_extension: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_cancel_auto_extension"];
378
+ /**
379
+ * Unregisters every entry point {@link sqlite3_auto_extension} registered.
380
+ *
381
+ * Wasm type `v()`. Signature `["sqlite3_reset_auto_extension", undefined]` from
382
+ * Evolu's supplement: SQLite binds the auto-extension functions by hand to
383
+ * manage the JavaScript functions it converts.
384
+ *
385
+ * See https://sqlite.org/c3ref/reset_auto_extension.html.
386
+ */
387
+ export declare const sqlite3_reset_auto_extension: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_reset_auto_extension"];
388
+ /**
389
+ * Writes N pseudo-random bytes to P. A call with N below 1 or a NULL P writes
390
+ * nothing and makes the next call reseed from the default VFS's xRandomness.
391
+ *
392
+ * Wasm type `v(ii)`. Signature `["sqlite3_randomness", undefined, "int", "*"]`
393
+ * from Evolu's supplement: SQLite binds it by hand to fill typed arrays.
394
+ *
395
+ * See https://sqlite.org/c3ref/randomness.html.
396
+ */
397
+ export declare const sqlite3_randomness: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_randomness"];
398
+ /**
399
+ * Returns 1 when UTF-8 SQL text ends with a complete statement, a final
400
+ * semicolon token that does not end inside a CREATE TRIGGER body, and 0
401
+ * otherwise. It tokenizes without parsing, so it does not detect invalid SQL.
402
+ *
403
+ * Wasm type `i(i)`. Signature `["sqlite3_complete", "int", "string:flexible"]`
404
+ * from SQLite's table.
405
+ *
406
+ * See https://sqlite.org/c3ref/complete.html.
407
+ */
408
+ export declare const sqlite3_complete: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_complete"];
409
+ /**
410
+ * Returns the number of distinct SQL keywords the library recognizes, which
411
+ * depends on compile-time options.
412
+ *
413
+ * Wasm type `i()`. Signature `["sqlite3_keyword_count", "int"]` from SQLite's
414
+ * table.
415
+ *
416
+ * See https://sqlite.org/c3ref/keyword_check.html.
417
+ */
418
+ export declare const sqlite3_keyword_count: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_keyword_count"];
419
+ /**
420
+ * Writes the address and byte length of the 0-based index-th SQL keyword, UTF-8
421
+ * without a NUL terminator in static memory, and returns SQLITE_ERROR when the
422
+ * index is out of range. Both output pointers must be valid.
423
+ *
424
+ * Wasm type `i(iii)`. Signature `["sqlite3_keyword_name", "int", "int", "**",
425
+ * "*"]` from SQLite's table.
426
+ *
427
+ * See https://sqlite.org/c3ref/keyword_check.html.
428
+ */
429
+ export declare const sqlite3_keyword_name: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_keyword_name"];
430
+ /**
431
+ * Returns non-zero if the nName bytes of UTF-8 at zName, which need no NUL
432
+ * terminator, are an SQL keyword in any letter case, and 0 otherwise.
433
+ *
434
+ * Wasm type `i(ii)`. Signature `["sqlite3_keyword_check", "int", "string",
435
+ * "int"]` from SQLite's table.
436
+ *
437
+ * See https://sqlite.org/c3ref/keyword_check.html.
438
+ */
439
+ export declare const sqlite3_keyword_check: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_keyword_check"];
440
+ /**
441
+ * Returns 0 when zStr matches the GLOB pattern zGlob, case-sensitively as SQL's
442
+ * GLOB operator does, and non-zero otherwise.
443
+ *
444
+ * Wasm type `i(ii)`. Signature `["sqlite3_strglob", "int", "string", "string"]`
445
+ * from SQLite's table.
446
+ *
447
+ * See https://sqlite.org/c3ref/strglob.html.
448
+ */
449
+ export declare const sqlite3_strglob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_strglob"];
450
+ /**
451
+ * Returns 0 when zStr matches the LIKE pattern zGlob with escape character
452
+ * cEsc, or none for 0, and non-zero otherwise. Like SQL's LIKE operator, it
453
+ * folds only ASCII case.
454
+ *
455
+ * Wasm type `i(iii)`. Signature `["sqlite3_strlike", "int", "string", "string",
456
+ * "int"]` from SQLite's table.
457
+ *
458
+ * See https://sqlite.org/c3ref/strlike.html.
459
+ */
460
+ export declare const sqlite3_strlike: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_strlike"];
461
+ /**
462
+ * Compares two UTF-8 strings, folding only ASCII case as SQLite does for
463
+ * identifiers, and returns 0 when they are equal or a negative or positive
464
+ * number that orders them.
465
+ *
466
+ * Wasm type `i(ii)`. Signature `["sqlite3_stricmp", "int", "string", "string"]`
467
+ * from SQLite's table.
468
+ *
469
+ * See https://sqlite.org/c3ref/stricmp.html.
470
+ */
471
+ export declare const sqlite3_stricmp: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stricmp"];
472
+ /**
473
+ * Compares at most N bytes of two UTF-8 strings, folding only ASCII case as
474
+ * SQLite does for identifiers, and returns 0 when they are equal or a negative
475
+ * or positive number that orders them.
476
+ *
477
+ * Wasm type `i(iii)`. Signature `["sqlite3_strnicmp", "int", "string",
478
+ * "string", "int"]` from SQLite's table.
479
+ *
480
+ * See https://sqlite.org/c3ref/stricmp.html.
481
+ */
482
+ export declare const sqlite3_strnicmp: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_strnicmp"];
483
+ /**
484
+ * Allocates at least byteLength bytes, returning NULL when out of memory or
485
+ * when byteLength is zero or negative.
486
+ *
487
+ * Wasm type `i(i)`. Signature `["sqlite3_malloc", "*", "int"]` from SQLite's
488
+ * table.
489
+ *
490
+ * See https://sqlite.org/c3ref/free.html.
491
+ */
492
+ export declare const sqlite3_malloc: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_malloc"];
493
+ /**
494
+ * Allocates memory like {@link sqlite3_malloc} with a 64-bit size, returning
495
+ * NULL when out of memory or for zero bytes.
496
+ *
497
+ * Wasm type `i(j)`. Signature `["sqlite3_malloc64", "*", "i64"]` from SQLite's
498
+ * table.
499
+ *
500
+ * See https://sqlite.org/c3ref/free.html.
501
+ */
502
+ export declare const sqlite3_malloc64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_malloc64"];
503
+ /**
504
+ * Resizes memory from {@link sqlite3_malloc}, keeping its leading bytes, and
505
+ * returns the new address, after which the old one is invalid. A NULL pointer
506
+ * allocates, a size of 0 or less frees and returns NULL, and when out of memory
507
+ * it returns NULL and leaves the old allocation intact.
508
+ *
509
+ * Wasm type `i(ii)`. Signature `["sqlite3_realloc", "*", "*", "int"]` from
510
+ * SQLite's table.
511
+ *
512
+ * See https://sqlite.org/c3ref/free.html.
513
+ */
514
+ export declare const sqlite3_realloc: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_realloc"];
515
+ /**
516
+ * Resizes memory from {@link sqlite3_malloc}, moving its contents to the
517
+ * returned address; NULL memory allocates, and a zero size frees it and returns
518
+ * NULL. When out of memory it returns NULL and leaves the old memory
519
+ * allocated.
520
+ *
521
+ * Wasm type `i(ij)`. Signature `["sqlite3_realloc64", "*", "*", "i64"]` from
522
+ * SQLite's table.
523
+ *
524
+ * See https://sqlite.org/c3ref/free.html.
525
+ */
526
+ export declare const sqlite3_realloc64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_realloc64"];
527
+ /**
528
+ * Returns the usable byte size of memory from {@link sqlite3_malloc},
529
+ * {@link sqlite3_realloc} or their 64-bit variants, which can exceed the
530
+ * requested size, or 0 for NULL.
531
+ *
532
+ * Wasm type `j(i)`. Signature `["sqlite3_msize", "i64", "*"]` from SQLite's
533
+ * table.
534
+ *
535
+ * See https://sqlite.org/c3ref/free.html.
536
+ */
537
+ export declare const sqlite3_msize: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_msize"];
538
+ /**
539
+ * Frees memory from {@link sqlite3_malloc} or from a SQLite function that
540
+ * returns owned memory.
541
+ *
542
+ * Wasm type `v(i)`. Signature `["sqlite3_free", undefined, "*"]` from SQLite's
543
+ * table.
544
+ *
545
+ * See https://sqlite.org/c3ref/free.html.
546
+ */
547
+ export declare const sqlite3_free: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_free"];
548
+ /**
549
+ * Opens a database connection for reading and writing, creating the database
550
+ * when it does not exist, with the default VFS. SQLite writes a handle even
551
+ * when opening fails, except when out of memory, and that handle must be
552
+ * closed.
553
+ *
554
+ * Wasm type `i(ii)`. Signature `["sqlite3_open", "int", "string", "*"]` from
555
+ * SQLite's table.
556
+ *
557
+ * See https://sqlite.org/c3ref/open.html.
558
+ */
559
+ export declare const sqlite3_open: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_open"];
560
+ /**
561
+ * Opens a database connection. SQLite writes a handle even when opening fails,
562
+ * except when out of memory, and that handle must be closed.
563
+ *
564
+ * Wasm type `i(iiii)`. Signature `["sqlite3_open_v2", "int", "string", "*",
565
+ * "int", "string"]` from SQLite's table.
566
+ *
567
+ * See https://sqlite.org/c3ref/open.html.
568
+ */
569
+ export declare const sqlite3_open_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_open_v2"];
570
+ /**
571
+ * Closes a connection. With unfinalized statements the close is deferred and
572
+ * the connection keeps its files open.
573
+ *
574
+ * Wasm type `i(i)`. Signature `["sqlite3_close_v2", "int", "sqlite3*"]` from
575
+ * Evolu's supplement: SQLite binds it by hand to release JavaScript callbacks
576
+ * first.
577
+ *
578
+ * See https://sqlite.org/c3ref/close.html.
579
+ */
580
+ export declare const sqlite3_close_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_close_v2"];
581
+ /**
582
+ * Returns the absolute filename of a schema of the connection, valid until the
583
+ * schema is detached or the connection closes, or NULL or an empty string for a
584
+ * temporary or in-memory database or an unknown schema. A non-NULL result can
585
+ * be passed to the `sqlite3_uri_*` functions.
586
+ *
587
+ * Wasm type `i(ii)`. Signature `["sqlite3_db_filename", "string", "sqlite3*",
588
+ * "string"]` from SQLite's table.
589
+ *
590
+ * See https://sqlite.org/c3ref/db_filename.html.
591
+ */
592
+ export declare const sqlite3_db_filename: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_filename"];
593
+ /**
594
+ * Returns the schema name of the connection's N-th database, where 0 is main
595
+ * and 1 is temp, or NULL when N is out of range. SQLite owns the string, which
596
+ * any schema change, such as ATTACH, DETACH, {@link sqlite3_serialize} or
597
+ * {@link sqlite3_deserialize}, can free.
598
+ *
599
+ * Wasm type `i(ii)`. Signature `["sqlite3_db_name", "string", "sqlite3*",
600
+ * "int"]` from SQLite's table.
601
+ *
602
+ * See https://sqlite.org/c3ref/db_name.html.
603
+ */
604
+ export declare const sqlite3_db_name: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_name"];
605
+ /**
606
+ * Returns 1 if a schema of the connection is read-only, 0 if it is read/write,
607
+ * or -1 when no schema has that name.
608
+ *
609
+ * Wasm type `i(ii)`. Signature `["sqlite3_db_readonly", "int", "sqlite3*",
610
+ * "string"]` from SQLite's table.
611
+ *
612
+ * See https://sqlite.org/c3ref/db_readonly.html.
613
+ */
614
+ export declare const sqlite3_db_readonly: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_readonly"];
615
+ /**
616
+ * Returns a schema's transaction state, SQLITE_TXN_NONE, SQLITE_TXN_READ or
617
+ * SQLITE_TXN_WRITE, the highest across all schemas for NULL, or -1 for an
618
+ * unknown schema.
619
+ *
620
+ * Wasm type `i(ii)`. Signature `["sqlite3_txn_state", "int", "sqlite3*",
621
+ * "string"]` from SQLite's table.
622
+ *
623
+ * See https://sqlite.org/c3ref/txn_state.html.
624
+ */
625
+ export declare const sqlite3_txn_state: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_txn_state"];
626
+ /**
627
+ * Returns 0 from BEGIN until the COMMIT or ROLLBACK that ends the transaction,
628
+ * and non-zero otherwise. It is the only way to tell whether SQLite rolled back
629
+ * a transaction automatically after an error such as SQLITE_FULL or
630
+ * SQLITE_BUSY.
631
+ *
632
+ * Wasm type `i(i)`. Signature `["sqlite3_get_autocommit", "int", "sqlite3*"]`
633
+ * from SQLite's table.
634
+ *
635
+ * See https://sqlite.org/c3ref/get_autocommit.html.
636
+ */
637
+ export declare const sqlite3_get_autocommit: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_get_autocommit"];
638
+ /**
639
+ * Sets a run-time limit of the connection and returns its prior value; a
640
+ * negative newVal only reads it, and a value above the compile-time maximum is
641
+ * lowered to that maximum.
642
+ *
643
+ * Wasm type `i(iii)`. Signature `["sqlite3_limit", "int", "sqlite3*", "int",
644
+ * "int"]` from SQLite's table.
645
+ *
646
+ * See https://sqlite.org/c3ref/limit.html.
647
+ */
648
+ export declare const sqlite3_limit: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_limit"];
649
+ /**
650
+ * Sets the connection's only busy handler, replacing any other, including the
651
+ * one {@link sqlite3_busy_timeout} sets, or removes it for NULL so a lock fails
652
+ * with SQLITE_BUSY at once. SQLite calls it with pArg and the number of earlier
653
+ * calls for the same lock and retries while it returns non-zero; it must not
654
+ * modify the connection.
655
+ *
656
+ * Wasm type `i(iii)`. Signature `["sqlite3_busy_handler", "int", "sqlite3*",
657
+ * "funcptr:i(pi)", "*"]` from SQLite's table.
658
+ *
659
+ * See https://sqlite.org/c3ref/busy_handler.html.
660
+ */
661
+ export declare const sqlite3_busy_handler: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_busy_handler"];
662
+ /**
663
+ * Sets a busy handler that sleeps and retries until at least ms milliseconds
664
+ * have passed, replacing any other busy handler; ms of zero or less removes all
665
+ * busy handlers.
666
+ *
667
+ * Wasm type `i(ii)`. Signature `["sqlite3_busy_timeout", "int", "sqlite3*",
668
+ * "int"]` from SQLite's table.
669
+ *
670
+ * See https://sqlite.org/c3ref/busy_timeout.html.
671
+ */
672
+ export declare const sqlite3_busy_timeout: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_busy_timeout"];
673
+ /**
674
+ * Stops the connection's running statements, and statements started before they
675
+ * all finish, at their earliest opportunity with SQLITE_INTERRUPT; an
676
+ * interrupted write in an explicit transaction rolls the transaction back. With
677
+ * no running statement it does nothing.
678
+ *
679
+ * Wasm type `v(i)`. Signature `["sqlite3_interrupt", undefined, "sqlite3*"]`
680
+ * from SQLite's table.
681
+ *
682
+ * See https://sqlite.org/c3ref/interrupt.html.
683
+ */
684
+ export declare const sqlite3_interrupt: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_interrupt"];
685
+ /**
686
+ * Returns 1 while an {@link sqlite3_interrupt} is in effect for the connection,
687
+ * and 0 otherwise.
688
+ *
689
+ * Wasm type `i(i)`. Signature `["sqlite3_is_interrupted", "int", "sqlite3*"]`
690
+ * from SQLite's table.
691
+ *
692
+ * See https://sqlite.org/c3ref/interrupt.html.
693
+ */
694
+ export declare const sqlite3_is_interrupted: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_is_interrupted"];
695
+ /**
696
+ * Enables extended result codes for the connection when onoff is non-zero and
697
+ * disables them otherwise. They are disabled by default, and
698
+ * {@link sqlite3_extended_errcode} returns them regardless.
699
+ *
700
+ * Wasm type `i(ii)`. Signature `["sqlite3_extended_result_codes", "int",
701
+ * "sqlite3*", "int"]` from SQLite's table.
702
+ *
703
+ * See https://sqlite.org/c3ref/extended_result_codes.html.
704
+ */
705
+ export declare const sqlite3_extended_result_codes: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_extended_result_codes"];
706
+ /**
707
+ * Calls the xFileControl method of a schema's file, main for a NULL zDbName,
708
+ * with an opcode and its argument and returns its result; the core handles a
709
+ * few opcodes, such as SQLITE_FCNTL_FILE_POINTER, itself. An unknown schema
710
+ * returns SQLITE_ERROR without recording it for {@link sqlite3_errcode}.
711
+ *
712
+ * Wasm type `i(iiii)`. Signature `["sqlite3_file_control", "int", "sqlite3*",
713
+ * "string", "int", "*"]` from SQLite's table.
714
+ *
715
+ * See https://sqlite.org/c3ref/file_control.html.
716
+ */
717
+ export declare const sqlite3_file_control: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_file_control"];
718
+ /**
719
+ * Writes a table column's declared type, collation sequence and NOT NULL,
720
+ * PRIMARY KEY and AUTOINCREMENT flags through the non-NULL output pointers,
721
+ * failing for a missing column or a view; a NULL column name only checks that
722
+ * the table exists. The returned strings stay valid only until the next SQLite
723
+ * call.
724
+ *
725
+ * Wasm type `i(iiiiiiiii)`. Signature `["sqlite3_table_column_metadata", "int",
726
+ * "sqlite3*", "string", "string", "string", "**", "**", "*", "*", "*"]` from
727
+ * SQLite's table.
728
+ *
729
+ * See https://sqlite.org/c3ref/table_column_metadata.html.
730
+ */
731
+ export declare const sqlite3_table_column_metadata: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_table_column_metadata"];
732
+ /**
733
+ * Writes the current and highest values of a connection status counter to pCur
734
+ * and pHiwtr, resetting the highest to the current value when resetFlg is
735
+ * non-zero. Values above the int range are truncated;
736
+ * {@link sqlite3_db_status64} returns them in full.
737
+ *
738
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_db_status", "int", "sqlite3*",
739
+ * "int", "*", "*", "int"]` from SQLite's table.
740
+ *
741
+ * See https://sqlite.org/c3ref/db_status.html.
742
+ */
743
+ export declare const sqlite3_db_status: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_status"];
744
+ /**
745
+ * Reads a connection's SQLITE_DBSTATUS_* counter into the sqlite3_int64 at pCur
746
+ * and its highwater mark into the sqlite3_int64 at pHiwtr, 8 bytes each,
747
+ * resetting the mark to the current value when resetFlg is non-zero.
748
+ *
749
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_db_status64", "int", "sqlite3*",
750
+ * "int", "*", "*", "int"]` from SQLite's table.
751
+ *
752
+ * See https://sqlite.org/c3ref/db_status.html.
753
+ */
754
+ export declare const sqlite3_db_status64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_status64"];
755
+ /**
756
+ * Returns the rowid of the connection's most recent successful INSERT into a
757
+ * rowid table, or 0 if there was none. Inside a trigger it returns the
758
+ * trigger's insert until the trigger ends, and a failed INSERT leaves it
759
+ * unchanged.
760
+ *
761
+ * Wasm type `j(i)`. Signature `["sqlite3_last_insert_rowid", "i64",
762
+ * "sqlite3*"]` from SQLite's table.
763
+ *
764
+ * See https://sqlite.org/c3ref/last_insert_rowid.html.
765
+ */
766
+ export declare const sqlite3_last_insert_rowid: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_last_insert_rowid"];
767
+ /**
768
+ * Sets the value {@link sqlite3_last_insert_rowid} returns for the connection
769
+ * without inserting a row.
770
+ *
771
+ * Wasm type `v(ij)`. Signature `["sqlite3_set_last_insert_rowid", undefined,
772
+ * "sqlite3*", "i64"]` from SQLite's table.
773
+ *
774
+ * See https://sqlite.org/c3ref/set_last_insert_rowid.html.
775
+ */
776
+ export declare const sqlite3_set_last_insert_rowid: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_set_last_insert_rowid"];
777
+ /**
778
+ * Returns the rows changed by the connection's most recently completed INSERT,
779
+ * UPDATE or DELETE, without changes by triggers, foreign key actions or
780
+ * REPLACE; other statements leave it unchanged, except a DROP TABLE that, with
781
+ * foreign keys on, first deletes the rows of a table that foreign keys
782
+ * reference. The result is undefined above the int range, which
783
+ * {@link sqlite3_changes64} covers.
784
+ *
785
+ * Wasm type `i(i)`. Signature `["sqlite3_changes", "int", "sqlite3*"]` from
786
+ * SQLite's table.
787
+ *
788
+ * See https://sqlite.org/c3ref/changes.html.
789
+ */
790
+ export declare const sqlite3_changes: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_changes"];
791
+ /**
792
+ * Returns the rows changed by the connection's most recently completed INSERT,
793
+ * UPDATE or DELETE, without changes by triggers, foreign key actions or
794
+ * REPLACE; other statements leave it unchanged, except a DROP TABLE that, with
795
+ * foreign keys on, first deletes the rows of a table that foreign keys
796
+ * reference.
797
+ *
798
+ * Wasm type `j(i)`. Signature `["sqlite3_changes64", "i64", "sqlite3*"]` from
799
+ * SQLite's table.
800
+ *
801
+ * See https://sqlite.org/c3ref/changes.html.
802
+ */
803
+ export declare const sqlite3_changes64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_changes64"];
804
+ /**
805
+ * Returns the rows inserted, updated or deleted by the connection's completed
806
+ * statements since it opened, including those of triggers and foreign key
807
+ * actions. The result is undefined beyond the int range, which
808
+ * {@link sqlite3_total_changes64} avoids.
809
+ *
810
+ * Wasm type `i(i)`. Signature `["sqlite3_total_changes", "int", "sqlite3*"]`
811
+ * from SQLite's table.
812
+ *
813
+ * See https://sqlite.org/c3ref/total_changes.html.
814
+ */
815
+ export declare const sqlite3_total_changes: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_total_changes"];
816
+ /**
817
+ * Returns the number of rows changed by INSERT, UPDATE and DELETE statements on
818
+ * the connection since it opened, counting trigger and foreign key action
819
+ * changes but not REPLACE conflict deletions. Other connections do not change
820
+ * it, and other statements do not either, except a DROP TABLE that, with
821
+ * foreign keys on, first deletes the rows of a table that foreign keys
822
+ * reference.
823
+ *
824
+ * Wasm type `j(i)`. Signature `["sqlite3_total_changes64", "i64", "sqlite3*"]`
825
+ * from SQLite's table.
826
+ *
827
+ * See https://sqlite.org/c3ref/total_changes.html.
828
+ */
829
+ export declare const sqlite3_total_changes64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_total_changes64"];
830
+ /**
831
+ * Runs zero or more semicolon-separated UTF-8 SQL statements, stopping at the
832
+ * first error, and calls the callback, unless NULL, with pArg for each result
833
+ * row; a non-zero callback result stops with SQLITE_ABORT. Unless errmsg is
834
+ * NULL, it receives NULL on success or an error message the caller frees with
835
+ * {@link sqlite3_free}.
836
+ *
837
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_exec", "int", "sqlite3*",
838
+ * "string:flexible", "funcptr:i(pipp)", "*", "**"]` from SQLite's table.
839
+ *
840
+ * See https://sqlite.org/c3ref/exec.html.
841
+ */
842
+ export declare const sqlite3_exec: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_exec"];
843
+ /**
844
+ * Copies a schema, NULL meaning main, into memory from {@link sqlite3_malloc64}
845
+ * that the caller frees, writing its byte size as an 8-byte sqlite3_int64 to
846
+ * piSize unless NULL. An empty database first gets its first page from an empty
847
+ * write transaction. Pages are read through the pager, so an encrypted database
848
+ * comes out decrypted, and a page that fails to read comes out zero-filled.
849
+ * Returns NULL when out of memory, for an unknown schema or a database without
850
+ * pages, and with SQLITE_SERIALIZE_NOCOPY returns SQLite's own buffer of a
851
+ * deserialized database, or NULL, instead of a copy, which the caller must
852
+ * neither free nor modify. Only a call whose mFlags is 0 returns memory
853
+ * {@link sqlite3_free} accepts.
854
+ *
855
+ * Wasm type `i(iiii)`. Signature `["sqlite3_serialize", "*", "sqlite3*",
856
+ * "string", "*", "int"]` from SQLite's table.
857
+ *
858
+ * See https://sqlite.org/c3ref/serialize.html.
859
+ */
860
+ export declare const sqlite3_serialize: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_serialize"];
861
+ /**
862
+ * Reopens a schema, main for NULL, as an in-memory database over the first szDb
863
+ * bytes of a szBuf-byte buffer, which must stay valid and unmodified until the
864
+ * connection closes. With SQLITE_DESERIALIZE_FREEONCLOSE, SQLite takes
865
+ * ownership of the {@link sqlite3_malloc}'d buffer and frees it, even when
866
+ * deserializing fails.
867
+ *
868
+ * Wasm type `i(iiijji)`. Signature `["sqlite3_deserialize", "int", "sqlite3*",
869
+ * "string", "*", "i64", "i64", "int"]` from SQLite's table.
870
+ *
871
+ * See https://sqlite.org/c3ref/deserialize.html.
872
+ */
873
+ export declare const sqlite3_deserialize: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_deserialize"];
874
+ /**
875
+ * Returns the result code of the connection's most recent API call if that call
876
+ * failed, as a primary code unless extended result codes are enabled.
877
+ *
878
+ * Wasm type `i(i)`. Signature `["sqlite3_errcode", "int", "sqlite3*"]` from
879
+ * SQLite's table.
880
+ *
881
+ * See https://sqlite.org/c3ref/errcode.html.
882
+ */
883
+ export declare const sqlite3_errcode: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_errcode"];
884
+ /**
885
+ * Returns the connection's most recent extended result code.
886
+ *
887
+ * Wasm type `i(i)`. Signature `["sqlite3_extended_errcode", "int", "sqlite3*"]`
888
+ * from SQLite's table.
889
+ *
890
+ * See https://sqlite.org/c3ref/errcode.html.
891
+ */
892
+ export declare const sqlite3_extended_errcode: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_extended_errcode"];
893
+ /**
894
+ * Returns the English message of the connection's most recent error, or NULL
895
+ * when none is available. SQLite owns the string, which the next call on the
896
+ * connection can overwrite or free.
897
+ *
898
+ * Wasm type `i(i)`. Signature `["sqlite3_errmsg", "string", "sqlite3*"]` from
899
+ * SQLite's table.
900
+ *
901
+ * See https://sqlite.org/c3ref/errcode.html.
902
+ */
903
+ export declare const sqlite3_errmsg: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_errmsg"];
904
+ /**
905
+ * Returns the English description of a result code, or NULL when none is
906
+ * available. The string is static and must not be freed.
907
+ *
908
+ * Wasm type `i(i)`. Signature `["sqlite3_errstr", "string", "int"]` from
909
+ * SQLite's table.
910
+ *
911
+ * See https://sqlite.org/c3ref/errcode.html.
912
+ */
913
+ export declare const sqlite3_errstr: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_errstr"];
914
+ /**
915
+ * Returns the byte offset in the SQL of the most recent error, or -1.
916
+ *
917
+ * Wasm type `i(i)`. Signature `["sqlite3_error_offset", "int", "sqlite3*"]`
918
+ * from SQLite's table.
919
+ *
920
+ * See https://sqlite.org/c3ref/errcode.html.
921
+ */
922
+ export declare const sqlite3_error_offset: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_error_offset"];
923
+ /**
924
+ * Sets the error code and a copy of zErrMsg, or the code's default message for
925
+ * NULL, that {@link sqlite3_errcode} and {@link sqlite3_errmsg} report for a
926
+ * connection until SQLite or another call replaces them.
927
+ *
928
+ * Wasm type `i(iii)`. Signature `["sqlite3_set_errmsg", "int", "sqlite3*",
929
+ * "int", "string"]` from SQLite's table.
930
+ *
931
+ * See https://sqlite.org/c3ref/set_errmsg.html.
932
+ */
933
+ export declare const sqlite3_set_errmsg: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_set_errmsg"];
934
+ /**
935
+ * Sets the connection's commit callback, replacing the previous one, or removes
936
+ * it for NULL, and returns the previous call's pArg, NULL for the first call.
937
+ * SQLite calls it with pArg before each commit and turns the commit into a
938
+ * rollback when it returns non-zero; it must not modify the connection.
939
+ *
940
+ * Wasm type `i(iii)`. Signature `["sqlite3_commit_hook", "void*", "sqlite3*",
941
+ * "funcptr:i(p)", "*"]` from SQLite's table.
942
+ *
943
+ * See https://sqlite.org/c3ref/commit_hook.html.
944
+ */
945
+ export declare const sqlite3_commit_hook: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_commit_hook"];
946
+ /**
947
+ * Registers the callback SQLite calls with pArg whenever a transaction rolls
948
+ * back, except when closing the connection, replacing the previous one; NULL
949
+ * removes it. Returns the previous pArg or NULL; the callback must not use the
950
+ * connection, not even to prepare or step a statement.
951
+ *
952
+ * Wasm type `i(iii)`. Signature `["sqlite3_rollback_hook", "void*", "sqlite3*",
953
+ * "funcptr:v(p)", "*"]` from SQLite's table.
954
+ *
955
+ * See https://sqlite.org/c3ref/commit_hook.html.
956
+ */
957
+ export declare const sqlite3_rollback_hook: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_rollback_hook"];
958
+ /**
959
+ * Registers the connection's callback for each row inserted, updated or deleted
960
+ * in a rowid table, replacing the previous one or removing it for NULL, and
961
+ * returns the previous pArg or NULL. The callback must not modify the
962
+ * connection and does not fire for WITHOUT ROWID tables, REPLACE conflict
963
+ * deletions or the truncate optimization.
964
+ *
965
+ * Wasm type `i(iii)`. Signature `["sqlite3_update_hook", "*", "sqlite3*",
966
+ * "funcptr:v(pippj)", "*"]` from SQLite's table.
967
+ *
968
+ * See https://sqlite.org/c3ref/update_hook.html.
969
+ */
970
+ export declare const sqlite3_update_hook: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_update_hook"];
971
+ /**
972
+ * Registers the connection's one trace callback for the SQLITE_TRACE_* events
973
+ * in uMask, replacing any previous one; a NULL callback or a zero mask disables
974
+ * tracing. The callback receives the event code, pCtx and two event-specific
975
+ * pointers, and should return 0.
976
+ *
977
+ * Wasm type `i(iiii)`. Signature `["sqlite3_trace_v2", "int", "sqlite3*",
978
+ * "int", "funcptr:i(ippp)", "*"]` from SQLite's table.
979
+ *
980
+ * See https://sqlite.org/c3ref/trace_v2.html.
981
+ */
982
+ export declare const sqlite3_trace_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_trace_v2"];
983
+ /**
984
+ * Sets the connection's callback for an undefined collation sequence, replacing
985
+ * the previous one. SQLite calls it with pArg, the connection, the preferred
986
+ * text encoding and the UTF-8 collation name, and the callback should register
987
+ * that collation.
988
+ *
989
+ * Wasm type `i(iii)`. Signature `["sqlite3_collation_needed", "int",
990
+ * "sqlite3*", "*", "*"]` from SQLite's table.
991
+ *
992
+ * See https://sqlite.org/c3ref/collation_needed.html.
993
+ */
994
+ export declare const sqlite3_collation_needed: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_collation_needed"];
995
+ /**
996
+ * Compiles the first statement of UTF-8 SQL as {@link sqlite3_prepare_v3} does
997
+ * with no flags, reading at most nByte bytes or up to a NUL when nByte is
998
+ * negative, and writes the statement to `*ppStmt` and the address of the
999
+ * uncompiled rest to `*pzTail`. `*ppStmt` is NULL on error and for SQL without
1000
+ * a statement, such as only a comment; the caller finalizes a non-NULL one.
1001
+ *
1002
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_prepare_v2", "int", "sqlite3*",
1003
+ * "*", "int", "**", "**"]` from Evolu's supplement: SQLite binds it by hand to
1004
+ * accept JavaScript strings.
1005
+ *
1006
+ * See https://sqlite.org/c3ref/prepare.html.
1007
+ */
1008
+ export declare const sqlite3_prepare_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_prepare_v2"];
1009
+ /**
1010
+ * Compiles the first statement of UTF-8 SQL, reading at most nByte bytes or up
1011
+ * to a NUL when nByte is negative, and writes the statement to `*ppStmt` and
1012
+ * the address of the uncompiled rest to `*pzTail`. `*ppStmt` is NULL on error
1013
+ * and for SQL without a statement, such as only a comment; the caller finalizes
1014
+ * a non-NULL one.
1015
+ *
1016
+ * Wasm type `i(iiiiii)`. Signature `["sqlite3_prepare_v3", "int", "sqlite3*",
1017
+ * "*", "int", "int", "**", "**"]` from Evolu's supplement: SQLite binds it by
1018
+ * hand to accept JavaScript strings.
1019
+ *
1020
+ * See https://sqlite.org/c3ref/prepare.html.
1021
+ */
1022
+ export declare const sqlite3_prepare_v3: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_prepare_v3"];
1023
+ /**
1024
+ * Evaluates a statement one step, returning SQLITE_ROW, SQLITE_DONE or an
1025
+ * error.
1026
+ *
1027
+ * Wasm type `i(i)`. Signature `["sqlite3_step", "int", "sqlite3_stmt*"]` from
1028
+ * SQLite's table.
1029
+ *
1030
+ * See https://sqlite.org/c3ref/step.html.
1031
+ */
1032
+ export declare const sqlite3_step: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_step"];
1033
+ /**
1034
+ * Resets a statement so it can run again, keeping its bindings. It returns the
1035
+ * error of a failed most recent step, and can fail on its own, such as with
1036
+ * SQLITE_BUSY when an INSERT with RETURNING stepped only once cannot commit.
1037
+ *
1038
+ * Wasm type `i(i)`. Signature `["sqlite3_reset", "int", "sqlite3_stmt*"]` from
1039
+ * SQLite's table.
1040
+ *
1041
+ * See https://sqlite.org/c3ref/reset.html.
1042
+ */
1043
+ export declare const sqlite3_reset: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_reset"];
1044
+ /**
1045
+ * Destroys a prepared statement and returns the error of its most recent
1046
+ * evaluation if that failed, otherwise SQLITE_OK; NULL is a harmless no-op.
1047
+ *
1048
+ * Wasm type `i(i)`. Signature `["sqlite3_finalize", "int", "sqlite3_stmt*"]`
1049
+ * from SQLite's table.
1050
+ *
1051
+ * See https://sqlite.org/c3ref/finalize.html.
1052
+ */
1053
+ export declare const sqlite3_finalize: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_finalize"];
1054
+ /**
1055
+ * Returns the connection's first prepared statement for a NULL pStmt, otherwise
1056
+ * the one after pStmt, or NULL when there is none.
1057
+ *
1058
+ * Wasm type `i(ii)`. Signature `["sqlite3_next_stmt", "sqlite3_stmt*",
1059
+ * "sqlite3*", "sqlite3_stmt*"]` from SQLite's table.
1060
+ *
1061
+ * See https://sqlite.org/c3ref/next_stmt.html.
1062
+ */
1063
+ export declare const sqlite3_next_stmt: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_next_stmt"];
1064
+ /**
1065
+ * Returns the connection a prepared statement belongs to.
1066
+ *
1067
+ * Wasm type `i(i)`. Signature `["sqlite3_db_handle", "sqlite3*",
1068
+ * "sqlite3_stmt*"]` from SQLite's table.
1069
+ *
1070
+ * See https://sqlite.org/c3ref/db_handle.html.
1071
+ */
1072
+ export declare const sqlite3_db_handle: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_db_handle"];
1073
+ /**
1074
+ * Returns the SQL text a statement was prepared from, which SQLite frees when
1075
+ * the statement is finalized, or NULL for a statement from the legacy
1076
+ * sqlite3_prepare, which this build does not export.
1077
+ *
1078
+ * Wasm type `i(i)`. Signature `["sqlite3_sql", "string", "sqlite3_stmt*"]` from
1079
+ * SQLite's table.
1080
+ *
1081
+ * See https://sqlite.org/c3ref/expanded_sql.html.
1082
+ */
1083
+ export declare const sqlite3_sql: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_sql"];
1084
+ /**
1085
+ * Returns the statement's SQL with bound parameters expanded as literals, in
1086
+ * memory the caller frees with {@link sqlite3_free}, or NULL when out of memory,
1087
+ * above SQLITE_LIMIT_LENGTH, or when built with SQLITE_OMIT_TRACE.
1088
+ *
1089
+ * Wasm type `i(i)`. Signature `["sqlite3_expanded_sql", "string",
1090
+ * "sqlite3_stmt*"]` from SQLite's table.
1091
+ *
1092
+ * See https://sqlite.org/c3ref/expanded_sql.html.
1093
+ */
1094
+ export declare const sqlite3_expanded_sql: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_expanded_sql"];
1095
+ /**
1096
+ * Returns non-zero when a statement has been stepped but has neither returned
1097
+ * SQLITE_DONE nor been reset, and 0 for NULL.
1098
+ *
1099
+ * Wasm type `i(i)`. Signature `["sqlite3_stmt_busy", "int", "sqlite3_stmt*"]`
1100
+ * from SQLite's table.
1101
+ *
1102
+ * See https://sqlite.org/c3ref/stmt_busy.html.
1103
+ */
1104
+ export declare const sqlite3_stmt_busy: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stmt_busy"];
1105
+ /**
1106
+ * Returns non-zero when a statement cannot directly change the database file,
1107
+ * though application-defined functions or virtual tables it calls still might.
1108
+ * Transaction control, ATTACH and DETACH count as read-only; BEGIN IMMEDIATE,
1109
+ * BEGIN EXCLUSIVE and any statement that might write do not.
1110
+ *
1111
+ * Wasm type `i(i)`. Signature `["sqlite3_stmt_readonly", "int",
1112
+ * "sqlite3_stmt*"]` from SQLite's table.
1113
+ *
1114
+ * See https://sqlite.org/c3ref/stmt_readonly.html.
1115
+ */
1116
+ export declare const sqlite3_stmt_readonly: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stmt_readonly"];
1117
+ /**
1118
+ * Makes a statement behave as if its SQL began with EXPLAIN (eMode 1), EXPLAIN
1119
+ * QUERY PLAN (2) or neither (0), possibly re-preparing it. It fails while the
1120
+ * statement is active, so reset it first.
1121
+ *
1122
+ * Wasm type `i(ii)`. Signature `["sqlite3_stmt_explain", "int",
1123
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1124
+ *
1125
+ * See https://sqlite.org/c3ref/stmt_explain.html.
1126
+ */
1127
+ export declare const sqlite3_stmt_explain: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stmt_explain"];
1128
+ /**
1129
+ * Returns 1 for an EXPLAIN statement, 2 for EXPLAIN QUERY PLAN, and 0 for an
1130
+ * ordinary statement or NULL.
1131
+ *
1132
+ * Wasm type `i(i)`. Signature `["sqlite3_stmt_isexplain", "int",
1133
+ * "sqlite3_stmt*"]` from SQLite's table.
1134
+ *
1135
+ * See https://sqlite.org/c3ref/stmt_isexplain.html.
1136
+ */
1137
+ export declare const sqlite3_stmt_isexplain: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stmt_isexplain"];
1138
+ /**
1139
+ * Returns one of a statement's SQLITE_STMTSTATUS_* counters, and resets it to 0
1140
+ * afterwards when resetFlg is non-zero.
1141
+ *
1142
+ * Wasm type `i(iii)`. Signature `["sqlite3_stmt_status", "int",
1143
+ * "sqlite3_stmt*", "int", "int"]` from SQLite's table.
1144
+ *
1145
+ * See https://sqlite.org/c3ref/stmt_status.html.
1146
+ */
1147
+ export declare const sqlite3_stmt_status: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_stmt_status"];
1148
+ /**
1149
+ * Returns the index of a statement's largest SQL parameter, which is the number
1150
+ * of parameters unless `?NNN` parameters leave gaps.
1151
+ *
1152
+ * Wasm type `i(i)`. Signature `["sqlite3_bind_parameter_count", "int",
1153
+ * "sqlite3_stmt*"]` from SQLite's table.
1154
+ *
1155
+ * See https://sqlite.org/c3ref/bind_parameter_count.html.
1156
+ */
1157
+ export declare const sqlite3_bind_parameter_count: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_parameter_count"];
1158
+ /**
1159
+ * Returns the 1-based index of the SQL parameter with a UTF-8 name that
1160
+ * includes its prefix, such as `:name`, or 0 when no parameter matches.
1161
+ *
1162
+ * Wasm type `i(ii)`. Signature `["sqlite3_bind_parameter_index", "int",
1163
+ * "sqlite3_stmt*", "string"]` from SQLite's table.
1164
+ *
1165
+ * See https://sqlite.org/c3ref/bind_parameter_index.html.
1166
+ */
1167
+ export declare const sqlite3_bind_parameter_index: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_parameter_index"];
1168
+ /**
1169
+ * Returns the name of the SQL parameter at a 1-based index, including its
1170
+ * prefix as in `:name` or `?NNN`, or NULL for a nameless `?` parameter or an
1171
+ * index out of range. The statement owns the string.
1172
+ *
1173
+ * Wasm type `i(ii)`. Signature `["sqlite3_bind_parameter_name", "string",
1174
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1175
+ *
1176
+ * See https://sqlite.org/c3ref/bind_parameter_name.html.
1177
+ */
1178
+ export declare const sqlite3_bind_parameter_name: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_parameter_name"];
1179
+ /**
1180
+ * Binds NULL to a parameter.
1181
+ *
1182
+ * Wasm type `i(ii)`. Signature `["sqlite3_bind_null", undefined,
1183
+ * "sqlite3_stmt*", "int"]` from SQLite's table, with the result corrected:
1184
+ * SQLite's table declares no result, but the C function returns a result code,
1185
+ * as the wasm type shows.
1186
+ *
1187
+ * See https://sqlite.org/c3ref/bind_blob.html.
1188
+ */
1189
+ export declare const sqlite3_bind_null: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_null"];
1190
+ /**
1191
+ * Binds a 32-bit integer to a parameter. The wasm boundary converts the number
1192
+ * with ToInt32, so a fraction is truncated and a value outside the int32 range
1193
+ * wraps silently.
1194
+ *
1195
+ * Wasm type `i(iii)`. Signature `["sqlite3_bind_int", "int", "sqlite3_stmt*",
1196
+ * "int", "int"]` from SQLite's table.
1197
+ *
1198
+ * See https://sqlite.org/c3ref/bind_blob.html.
1199
+ */
1200
+ export declare const sqlite3_bind_int: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_int"];
1201
+ /**
1202
+ * Binds a 64-bit integer to a parameter. The wasm boundary wraps a bigint
1203
+ * outside the int64 range silently.
1204
+ *
1205
+ * Wasm type `i(iij)`. Signature `["sqlite3_bind_int64", "int", "sqlite3_stmt*",
1206
+ * "int", "i64"]` from SQLite's table.
1207
+ *
1208
+ * See https://sqlite.org/c3ref/bind_blob.html.
1209
+ */
1210
+ export declare const sqlite3_bind_int64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_int64"];
1211
+ /**
1212
+ * Binds a double to a parameter; SQLite stores NaN as NULL.
1213
+ *
1214
+ * Wasm type `i(iid)`. Signature `["sqlite3_bind_double", "int",
1215
+ * "sqlite3_stmt*", "int", "f64"]` from SQLite's table.
1216
+ *
1217
+ * See https://sqlite.org/c3ref/bind_blob.html.
1218
+ */
1219
+ export declare const sqlite3_bind_double: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_double"];
1220
+ /**
1221
+ * Binds UTF-8 text to a parameter: n bytes, which may include NUL characters,
1222
+ * or up to the first NUL when n is negative. A NULL address binds SQL NULL.
1223
+ *
1224
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_bind_text", "int",
1225
+ * "sqlite3_stmt*", "int", "*", "int", "*"]` from Evolu's supplement: SQLite
1226
+ * binds it by hand to accept JavaScript strings and typed arrays.
1227
+ *
1228
+ * See https://sqlite.org/c3ref/bind_blob.html.
1229
+ */
1230
+ export declare const sqlite3_bind_text: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_text"];
1231
+ /**
1232
+ * Binds n bytes to a parameter; a negative n is undefined behavior. A NULL
1233
+ * address binds SQL NULL, so an empty blob needs a non-NULL address.
1234
+ *
1235
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_bind_blob", "int",
1236
+ * "sqlite3_stmt*", "int", "*", "int", "*"]` from Evolu's supplement: SQLite
1237
+ * binds it by hand to accept typed arrays.
1238
+ *
1239
+ * See https://sqlite.org/c3ref/bind_blob.html.
1240
+ */
1241
+ export declare const sqlite3_bind_blob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_blob"];
1242
+ /**
1243
+ * Binds a blob of n zero bytes to a parameter without allocating its content; a
1244
+ * negative n binds a zero-length blob.
1245
+ *
1246
+ * Wasm type `i(iii)`. Signature `["sqlite3_bind_zeroblob", "int",
1247
+ * "sqlite3_stmt*", "int", "int"]` from SQLite's table.
1248
+ *
1249
+ * See https://sqlite.org/c3ref/bind_blob.html.
1250
+ */
1251
+ export declare const sqlite3_bind_zeroblob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_zeroblob"];
1252
+ /**
1253
+ * Binds SQL NULL carrying pPtr tagged with the type string zPType, which only
1254
+ * {@link sqlite3_value_pointer} with an equal type string returns. The type
1255
+ * string should be static because SQLite keeps its address, and SQLite calls
1256
+ * xDestructor, unless NULL, with pPtr when done, even when binding fails.
1257
+ *
1258
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_bind_pointer", "int",
1259
+ * "sqlite3_stmt*", "int", "*", "string:static", "*"]` from SQLite's table.
1260
+ *
1261
+ * See https://sqlite.org/c3ref/bind_blob.html.
1262
+ */
1263
+ export declare const sqlite3_bind_pointer: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_bind_pointer"];
1264
+ /**
1265
+ * Sets every parameter of a statement to NULL, which {@link sqlite3_reset} does
1266
+ * not do.
1267
+ *
1268
+ * Wasm type `i(i)`. Signature `["sqlite3_clear_bindings", "int",
1269
+ * "sqlite3_stmt*"]` from SQLite's table.
1270
+ *
1271
+ * See https://sqlite.org/c3ref/clear_bindings.html.
1272
+ */
1273
+ export declare const sqlite3_clear_bindings: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_clear_bindings"];
1274
+ /**
1275
+ * Returns the number of result columns of a statement.
1276
+ *
1277
+ * Wasm type `i(i)`. Signature `["sqlite3_column_count", "int",
1278
+ * "sqlite3_stmt*"]` from SQLite's table.
1279
+ *
1280
+ * See https://sqlite.org/c3ref/column_count.html.
1281
+ */
1282
+ export declare const sqlite3_column_count: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_count"];
1283
+ /**
1284
+ * Returns the number of columns in the statement's current row, or 0 when the
1285
+ * last step did not return SQLITE_ROW or the statement is NULL.
1286
+ *
1287
+ * Wasm type `i(i)`. Signature `["sqlite3_data_count", "int", "sqlite3_stmt*"]`
1288
+ * from SQLite's table.
1289
+ *
1290
+ * See https://sqlite.org/c3ref/data_count.html.
1291
+ */
1292
+ export declare const sqlite3_data_count: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_data_count"];
1293
+ /**
1294
+ * Returns the name of a result column, which is its AS alias or else
1295
+ * unspecified, or NULL when out of memory or the index is out of range. The
1296
+ * statement owns the string until it is finalized or re-prepared.
1297
+ *
1298
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_name", "string",
1299
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1300
+ *
1301
+ * See https://sqlite.org/c3ref/column_name.html.
1302
+ */
1303
+ export declare const sqlite3_column_name: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_name"];
1304
+ /**
1305
+ * Returns the declared type of the table column a result column comes from, or
1306
+ * NULL when the result column is an expression or subquery. The statement owns
1307
+ * the string.
1308
+ *
1309
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_decltype", "string",
1310
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1311
+ *
1312
+ * See https://sqlite.org/c3ref/column_decltype.html.
1313
+ */
1314
+ export declare const sqlite3_column_decltype: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_decltype"];
1315
+ /**
1316
+ * Returns the storage class of a result column in the current row. Read it
1317
+ * before any other column function, which can convert the value.
1318
+ *
1319
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_type", "int", "sqlite3_stmt*",
1320
+ * "int"]` from SQLite's table.
1321
+ *
1322
+ * See https://sqlite.org/c3ref/column_blob.html.
1323
+ */
1324
+ export declare const sqlite3_column_type: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_type"];
1325
+ /**
1326
+ * Returns a result column of the current row as a 32-bit integer, converting
1327
+ * other types; an integer outside the 32-bit range keeps only its low 32 bits.
1328
+ *
1329
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_int", "int", "sqlite3_stmt*",
1330
+ * "int"]` from SQLite's table.
1331
+ *
1332
+ * See https://sqlite.org/c3ref/column_blob.html.
1333
+ */
1334
+ export declare const sqlite3_column_int: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_int"];
1335
+ /**
1336
+ * Returns a result column of the current row as a 64-bit integer, converting
1337
+ * other types as CAST does, and 0 for NULL.
1338
+ *
1339
+ * Wasm type `j(ii)`. Signature `["sqlite3_column_int64", "i64",
1340
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1341
+ *
1342
+ * See https://sqlite.org/c3ref/column_blob.html.
1343
+ */
1344
+ export declare const sqlite3_column_int64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_int64"];
1345
+ /**
1346
+ * Returns a result column of the current row as a double, converting other
1347
+ * types, such as NULL to 0.0.
1348
+ *
1349
+ * Wasm type `d(ii)`. Signature `["sqlite3_column_double", "f64",
1350
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1351
+ *
1352
+ * See https://sqlite.org/c3ref/column_blob.html.
1353
+ */
1354
+ export declare const sqlite3_column_double: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_double"];
1355
+ /**
1356
+ * Returns the address of a result column as NUL-terminated UTF-8 text that can
1357
+ * contain NUL characters, so read its length with {@link sqlite3_column_bytes}
1358
+ * afterwards. Returns NULL for SQL NULL and when out of memory, which
1359
+ * {@link sqlite3_errcode} tells apart; the text stays valid until the next step,
1360
+ * reset or finalize, or a conversion by another column call.
1361
+ *
1362
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_text", "*", "sqlite3_stmt*",
1363
+ * "int"]` from Evolu's supplement: SQLite's build replaces it with a JavaScript
1364
+ * proxy that keeps embedded NUL characters (proxy-text-apis).
1365
+ *
1366
+ * See https://sqlite.org/c3ref/column_blob.html.
1367
+ */
1368
+ export declare const sqlite3_column_text: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_text"];
1369
+ /**
1370
+ * Returns the address of a result column's bytes, or NULL for a zero-length
1371
+ * blob, SQL NULL or out of memory; call it before {@link sqlite3_column_bytes}.
1372
+ * The memory stays valid until a type conversion of the column or the next
1373
+ * step, reset or finalize, and SQLite frees it.
1374
+ *
1375
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_blob", "*", "sqlite3_stmt*",
1376
+ * "int"]` from SQLite's table.
1377
+ *
1378
+ * See https://sqlite.org/c3ref/column_blob.html.
1379
+ */
1380
+ export declare const sqlite3_column_blob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_blob"];
1381
+ /**
1382
+ * Returns the byte length of the text or blob the preceding column call
1383
+ * returned.
1384
+ *
1385
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_bytes", "int",
1386
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1387
+ *
1388
+ * See https://sqlite.org/c3ref/column_blob.html.
1389
+ */
1390
+ export declare const sqlite3_column_bytes: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_bytes"];
1391
+ /**
1392
+ * Returns a result column of the current row as an unprotected sqlite3_value,
1393
+ * valid until the next step, reset or finalize. This build is single-threaded
1394
+ * (SQLITE_THREADSAFE=0), so an unprotected value works wherever a protected one
1395
+ * does, and {@link sqlite3_value_dup} copies it to outlive the row.
1396
+ *
1397
+ * Wasm type `i(ii)`. Signature `["sqlite3_column_value", "sqlite3_value*",
1398
+ * "sqlite3_stmt*", "int"]` from SQLite's table.
1399
+ *
1400
+ * See https://sqlite.org/c3ref/column_blob.html.
1401
+ */
1402
+ export declare const sqlite3_column_value: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_column_value"];
1403
+ /**
1404
+ * Returns a value's initial fundamental data type. Read it before the other
1405
+ * value functions, whose conversions can change it.
1406
+ *
1407
+ * Wasm type `i(i)`. Signature `["sqlite3_value_type", "int", "sqlite3_value*"]`
1408
+ * from SQLite's table.
1409
+ *
1410
+ * See https://sqlite.org/c3ref/value_blob.html.
1411
+ */
1412
+ export declare const sqlite3_value_type: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_type"];
1413
+ /**
1414
+ * Converts a value that looks like a number to INTEGER or FLOAT when no
1415
+ * information is lost, and returns its resulting fundamental data type.
1416
+ *
1417
+ * Wasm type `i(i)`. Signature `["sqlite3_value_numeric_type", "int",
1418
+ * "sqlite3_value*"]` from SQLite's table.
1419
+ *
1420
+ * See https://sqlite.org/c3ref/value_blob.html.
1421
+ */
1422
+ export declare const sqlite3_value_numeric_type: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_numeric_type"];
1423
+ /**
1424
+ * Returns a value as a 32-bit integer, converting other types as CAST does and
1425
+ * truncating a larger integer to its low 32 bits, and 0 for NULL.
1426
+ *
1427
+ * Wasm type `i(i)`. Signature `["sqlite3_value_int", "int", "sqlite3_value*"]`
1428
+ * from SQLite's table.
1429
+ *
1430
+ * See https://sqlite.org/c3ref/value_blob.html.
1431
+ */
1432
+ export declare const sqlite3_value_int: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_int"];
1433
+ /**
1434
+ * Returns a value as a 64-bit integer, converting other storage classes as
1435
+ * {@link sqlite3_column_int64} does.
1436
+ *
1437
+ * Wasm type `j(i)`. Signature `["sqlite3_value_int64", "i64",
1438
+ * "sqlite3_value*"]` from SQLite's table.
1439
+ *
1440
+ * See https://sqlite.org/c3ref/value_blob.html.
1441
+ */
1442
+ export declare const sqlite3_value_int64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_int64"];
1443
+ /**
1444
+ * Returns a value as a double, converting other types as CAST does, and 0.0 for
1445
+ * NULL.
1446
+ *
1447
+ * Wasm type `d(i)`. Signature `["sqlite3_value_double", "f64",
1448
+ * "sqlite3_value*"]` from SQLite's table.
1449
+ *
1450
+ * See https://sqlite.org/c3ref/value_blob.html.
1451
+ */
1452
+ export declare const sqlite3_value_double: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_double"];
1453
+ /**
1454
+ * Returns the address of a protected value as NUL-terminated UTF-8 text that
1455
+ * can contain NUL characters, so read its length with
1456
+ * {@link sqlite3_value_bytes} afterwards. Returns NULL for SQL NULL and when out
1457
+ * of memory, and a later call that converts the value can invalidate the text.
1458
+ *
1459
+ * Wasm type `i(i)`. Signature `["sqlite3_value_text", "*", "sqlite3_value*"]`
1460
+ * from Evolu's supplement: SQLite's build replaces it with a JavaScript proxy
1461
+ * that keeps embedded NUL characters (proxy-text-apis).
1462
+ *
1463
+ * See https://sqlite.org/c3ref/value_blob.html.
1464
+ */
1465
+ export declare const sqlite3_value_text: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_text"];
1466
+ /**
1467
+ * Returns the address of a value's bytes, rendering a number as text, or NULL
1468
+ * for a zero-length value or SQL NULL. Call it before
1469
+ * {@link sqlite3_value_bytes}; a later text conversion invalidates the address.
1470
+ *
1471
+ * Wasm type `i(i)`. Signature `["sqlite3_value_blob", "*", "sqlite3_value*"]`
1472
+ * from SQLite's table.
1473
+ *
1474
+ * See https://sqlite.org/c3ref/value_blob.html.
1475
+ */
1476
+ export declare const sqlite3_value_blob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_blob"];
1477
+ /**
1478
+ * Returns the byte length of the blob or UTF-8 text the preceding
1479
+ * {@link sqlite3_value_blob} or {@link sqlite3_value_text} call returned, without
1480
+ * the NUL terminator; 0 for NULL.
1481
+ *
1482
+ * Wasm type `i(i)`. Signature `["sqlite3_value_bytes", "int",
1483
+ * "sqlite3_value*"]` from SQLite's table.
1484
+ *
1485
+ * See https://sqlite.org/c3ref/value_blob.html.
1486
+ */
1487
+ export declare const sqlite3_value_bytes: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_bytes"];
1488
+ /**
1489
+ * Returns the pointer {@link sqlite3_bind_pointer} or
1490
+ * {@link sqlite3_result_pointer} attached to a value under a type name equal to
1491
+ * zPType by strcmp, and NULL otherwise.
1492
+ *
1493
+ * Wasm type `i(ii)`. Signature `["sqlite3_value_pointer", "*",
1494
+ * "sqlite3_value*", "string:static"]` from SQLite's table.
1495
+ *
1496
+ * See https://sqlite.org/c3ref/value_blob.html.
1497
+ */
1498
+ export declare const sqlite3_value_pointer: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_pointer"];
1499
+ /**
1500
+ * Returns the subtype of an application-defined function argument, as
1501
+ * {@link sqlite3_result_subtype} set it, or 0. The reading function should be
1502
+ * registered with SQLITE_SUBTYPE, or it might get 0 in corner cases.
1503
+ *
1504
+ * Wasm type `i(i)`. Signature `["sqlite3_value_subtype", "int",
1505
+ * "sqlite3_value*"]` from SQLite's table.
1506
+ *
1507
+ * See https://sqlite.org/c3ref/value_subtype.html.
1508
+ */
1509
+ export declare const sqlite3_value_subtype: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_subtype"];
1510
+ /**
1511
+ * Returns non-zero when a value came from a bound parameter rather than a
1512
+ * literal, a column or an expression.
1513
+ *
1514
+ * Wasm type `i(i)`. Signature `["sqlite3_value_frombind", "int",
1515
+ * "sqlite3_value*"]` from SQLite's table.
1516
+ *
1517
+ * See https://sqlite.org/c3ref/value_blob.html.
1518
+ */
1519
+ export declare const sqlite3_value_frombind: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_frombind"];
1520
+ /**
1521
+ * Within a virtual table's xUpdate, returns non-zero when the value's column is
1522
+ * unchanged by the UPDATE because xColumn set no result; such a value otherwise
1523
+ * looks like NULL. Anywhere else the result is meaningless.
1524
+ *
1525
+ * Wasm type `i(i)`. Signature `["sqlite3_value_nochange", "int",
1526
+ * "sqlite3_value*"]` from SQLite's table.
1527
+ *
1528
+ * See https://sqlite.org/c3ref/value_blob.html.
1529
+ */
1530
+ export declare const sqlite3_value_nochange: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_nochange"];
1531
+ /**
1532
+ * Copies a value into a protected value the caller frees with
1533
+ * {@link sqlite3_value_free}. Returns NULL for NULL or when out of memory, and a
1534
+ * pointer value copies as SQL NULL.
1535
+ *
1536
+ * Wasm type `i(i)`. Signature `["sqlite3_value_dup", "sqlite3_value*",
1537
+ * "sqlite3_value*"]` from SQLite's table.
1538
+ *
1539
+ * See https://sqlite.org/c3ref/value_dup.html.
1540
+ */
1541
+ export declare const sqlite3_value_dup: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_dup"];
1542
+ /**
1543
+ * Frees a value from {@link sqlite3_value_dup}; NULL is a no-op.
1544
+ *
1545
+ * Wasm type `v(i)`. Signature `["sqlite3_value_free", undefined,
1546
+ * "sqlite3_value*"]` from SQLite's table.
1547
+ *
1548
+ * See https://sqlite.org/c3ref/value_dup.html.
1549
+ */
1550
+ export declare const sqlite3_value_free: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_value_free"];
1551
+ /**
1552
+ * Adds, redefines or, with xFunc, xStep and xFinal all NULL, removes an SQL
1553
+ * function of the connection: xFunc implements a scalar function, xStep with
1554
+ * xFinal an aggregate. nArg is the argument count or -1 for any, and eTextRep
1555
+ * the preferred text encoding, optionally with flags such as
1556
+ * SQLITE_DETERMINISTIC and SQLITE_DIRECTONLY.
1557
+ *
1558
+ * Wasm type `i(iiiiiiii)`. Signature `["sqlite3_create_function", "int",
1559
+ * "sqlite3*", "string", "int", "int", "*", "funcptr:v(pip)", "funcptr:v(pip)",
1560
+ * "funcptr:v(p)"]` from Evolu's supplement: SQLite binds it by hand to accept
1561
+ * JavaScript functions as callbacks.
1562
+ *
1563
+ * See https://sqlite.org/c3ref/create_function.html.
1564
+ */
1565
+ export declare const sqlite3_create_function: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_create_function"];
1566
+ /**
1567
+ * Works like {@link sqlite3_create_function}, and SQLite calls a non-NULL
1568
+ * xDestroy with pApp when the function is redefined or removed, when the
1569
+ * connection closes, and when this call fails.
1570
+ *
1571
+ * Wasm type `i(iiiiiiiii)`. Signature `["sqlite3_create_function_v2", "int",
1572
+ * "sqlite3*", "string", "int", "int", "*", "funcptr:v(pip)", "funcptr:v(pip)",
1573
+ * "funcptr:v(p)", "funcptr:v(p)"]` from Evolu's supplement: SQLite binds it by
1574
+ * hand to accept JavaScript functions as callbacks.
1575
+ *
1576
+ * See https://sqlite.org/c3ref/create_function.html.
1577
+ */
1578
+ export declare const sqlite3_create_function_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_create_function_v2"];
1579
+ /**
1580
+ * Ensures a global SQL function with this name and argument count exists,
1581
+ * creating a placeholder that raises an error when called, so a virtual table's
1582
+ * xFindFunction can overload it.
1583
+ *
1584
+ * Wasm type `i(iii)`. Signature `["sqlite3_overload_function", "int",
1585
+ * "sqlite3*", "string", "int"]` from SQLite's table.
1586
+ *
1587
+ * See https://sqlite.org/c3ref/overload_function.html.
1588
+ */
1589
+ export declare const sqlite3_overload_function: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_overload_function"];
1590
+ /**
1591
+ * Adds, replaces or, with a NULL xCompare, removes a collation named zName for
1592
+ * text in the eTextRep encoding. `xCompare(pArg, n1, s1, n2, s2)` compares two
1593
+ * strings of the given byte lengths and returns a negative number, zero or a
1594
+ * positive number; SQLite behavior is undefined when the comparison is
1595
+ * inconsistent.
1596
+ *
1597
+ * Wasm type `i(iiiii)`. Signature `["sqlite3_create_collation", "int",
1598
+ * "sqlite3*", "string", "int", "*", "funcptr:i(pipip)"]` from Evolu's
1599
+ * supplement: SQLite binds it by hand to accept JavaScript functions as
1600
+ * callbacks.
1601
+ *
1602
+ * See https://sqlite.org/c3ref/create_collation.html.
1603
+ */
1604
+ export declare const sqlite3_create_collation: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_create_collation"];
1605
+ /**
1606
+ * Works like {@link sqlite3_create_collation}, and SQLite calls a non-NULL
1607
+ * xDestroy with pArg when the collation is replaced or the connection closes.
1608
+ * Unlike other SQLite functions, it does not call xDestroy when this call
1609
+ * fails, so the caller then disposes of pArg.
1610
+ *
1611
+ * Wasm type `i(iiiiii)`. Signature `["sqlite3_create_collation_v2", "int",
1612
+ * "sqlite3*", "string", "int", "*", "funcptr:i(pipip)", "funcptr:v(p)"]` from
1613
+ * Evolu's supplement: SQLite binds it by hand to accept JavaScript functions as
1614
+ * callbacks.
1615
+ *
1616
+ * See https://sqlite.org/c3ref/create_collation.html.
1617
+ */
1618
+ export declare const sqlite3_create_collation_v2: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_create_collation_v2"];
1619
+ /**
1620
+ * Returns the user data pointer the running application-defined function was
1621
+ * registered with.
1622
+ *
1623
+ * Wasm type `i(i)`. Signature `["sqlite3_user_data", "void*",
1624
+ * "sqlite3_context*"]` from SQLite's table.
1625
+ *
1626
+ * See https://sqlite.org/c3ref/user_data.html.
1627
+ */
1628
+ export declare const sqlite3_user_data: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_user_data"];
1629
+ /**
1630
+ * Returns the connection that registered the application-defined function being
1631
+ * called.
1632
+ *
1633
+ * Wasm type `i(i)`. Signature `["sqlite3_context_db_handle", "sqlite3*",
1634
+ * "sqlite3_context*"]` from SQLite's table.
1635
+ *
1636
+ * See https://sqlite.org/c3ref/context_db_handle.html.
1637
+ */
1638
+ export declare const sqlite3_context_db_handle: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_context_db_handle"];
1639
+ /**
1640
+ * Returns the state memory of the current aggregate function instance: the
1641
+ * first call allocates nBytes of zeroed memory, later calls return the same
1642
+ * buffer, and SQLite frees it when the aggregate concludes. Returns NULL when
1643
+ * the first call passes nBytes of zero or less or runs out of memory.
1644
+ *
1645
+ * Wasm type `i(ii)`. Signature `["sqlite3_aggregate_context", "void*",
1646
+ * "sqlite3_context*", "int"]` from SQLite's table.
1647
+ *
1648
+ * See https://sqlite.org/c3ref/aggregate_context.html.
1649
+ */
1650
+ export declare const sqlite3_aggregate_context: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_aggregate_context"];
1651
+ /**
1652
+ * Returns the auxiliary data {@link sqlite3_set_auxdata} associated with the
1653
+ * 0-based N-th argument of the current function call, or NULL when there is
1654
+ * none or SQLite discarded it.
1655
+ *
1656
+ * Wasm type `i(ii)`. Signature `["sqlite3_get_auxdata", "*",
1657
+ * "sqlite3_context*", "int"]` from SQLite's table.
1658
+ *
1659
+ * See https://sqlite.org/c3ref/get_auxdata.html.
1660
+ */
1661
+ export declare const sqlite3_get_auxdata: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_get_auxdata"];
1662
+ /**
1663
+ * Attaches pAux to the N-th argument of the running application-defined
1664
+ * function, where {@link sqlite3_get_auxdata} finds it while the argument stays
1665
+ * the same. SQLite may discard it at any time, even before this call returns,
1666
+ * calling a non-NULL xDelete with pAux, so pAux must not be used afterwards.
1667
+ *
1668
+ * Wasm type `v(iiii)`. Signature `["sqlite3_set_auxdata", undefined,
1669
+ * "sqlite3_context*", "int", "*", "*"]` from SQLite's table.
1670
+ *
1671
+ * See https://sqlite.org/c3ref/get_auxdata.html.
1672
+ */
1673
+ export declare const sqlite3_set_auxdata: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_set_auxdata"];
1674
+ /**
1675
+ * Sets an application-defined function's result to NULL.
1676
+ *
1677
+ * Wasm type `v(i)`. Signature `["sqlite3_result_null", undefined,
1678
+ * "sqlite3_context*"]` from SQLite's table.
1679
+ *
1680
+ * See https://sqlite.org/c3ref/result_blob.html.
1681
+ */
1682
+ export declare const sqlite3_result_null: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_null"];
1683
+ /**
1684
+ * Sets an application-defined function's result to a 32-bit integer. The wasm
1685
+ * boundary converts the number with ToInt32, so a fraction is truncated and a
1686
+ * value outside the int32 range wraps silently.
1687
+ *
1688
+ * Wasm type `v(ii)`. Signature `["sqlite3_result_int", undefined,
1689
+ * "sqlite3_context*", "int"]` from SQLite's table.
1690
+ *
1691
+ * See https://sqlite.org/c3ref/result_blob.html.
1692
+ */
1693
+ export declare const sqlite3_result_int: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_int"];
1694
+ /**
1695
+ * Sets an application-defined function's result to a 64-bit integer. The wasm
1696
+ * boundary wraps a bigint outside the int64 range silently.
1697
+ *
1698
+ * Wasm type `v(ij)`. Signature `["sqlite3_result_int64", undefined, "*",
1699
+ * "i64"]` from SQLite's table.
1700
+ *
1701
+ * See https://sqlite.org/c3ref/result_blob.html.
1702
+ */
1703
+ export declare const sqlite3_result_int64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_int64"];
1704
+ /**
1705
+ * Sets an application-defined function's result to a double; SQLite stores NaN
1706
+ * as NULL.
1707
+ *
1708
+ * Wasm type `v(id)`. Signature `["sqlite3_result_double", undefined,
1709
+ * "sqlite3_context*", "f64"]` from SQLite's table.
1710
+ *
1711
+ * See https://sqlite.org/c3ref/result_blob.html.
1712
+ */
1713
+ export declare const sqlite3_result_double: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_double"];
1714
+ /**
1715
+ * Sets an application-defined function's result to UTF-8 text of n bytes, or up
1716
+ * to its NUL terminator when n is negative. A NULL address sets SQL NULL, as
1717
+ * for {@link sqlite3_bind_text}.
1718
+ *
1719
+ * Wasm type `v(iiii)`. Signature `["sqlite3_result_text", undefined,
1720
+ * "sqlite3_context*", "string", "int", "*"]` from SQLite's table.
1721
+ *
1722
+ * See https://sqlite.org/c3ref/result_blob.html.
1723
+ */
1724
+ export declare const sqlite3_result_text: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_text"];
1725
+ /**
1726
+ * Sets an application-defined function's result to n bytes. A NULL address sets
1727
+ * SQL NULL, as for {@link sqlite3_bind_blob}, so an empty blob needs a non-NULL
1728
+ * address or {@link sqlite3_result_zeroblob}.
1729
+ *
1730
+ * Wasm type `v(iiii)`. Signature `["sqlite3_result_blob", undefined,
1731
+ * "sqlite3_context*", "*", "int", "*"]` from SQLite's table.
1732
+ *
1733
+ * See https://sqlite.org/c3ref/result_blob.html.
1734
+ */
1735
+ export declare const sqlite3_result_blob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_blob"];
1736
+ /**
1737
+ * Sets an application-defined function's result to a blob of n zero bytes, 0
1738
+ * for a negative n. A size beyond SQLITE_LIMIT_LENGTH makes the function fail
1739
+ * with SQLITE_TOOBIG.
1740
+ *
1741
+ * Wasm type `v(ii)`. Signature `["sqlite3_result_zeroblob", undefined,
1742
+ * "sqlite3_context*", "int"]` from SQLite's table.
1743
+ *
1744
+ * See https://sqlite.org/c3ref/result_blob.html.
1745
+ */
1746
+ export declare const sqlite3_result_zeroblob: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_zeroblob"];
1747
+ /**
1748
+ * Sets an application-defined function's result to a blob of n zero bytes.
1749
+ * Returns SQLITE_TOOBIG, and makes the function fail with that error, when n
1750
+ * exceeds the connection's length limit.
1751
+ *
1752
+ * Wasm type `i(ij)`. Signature `["sqlite3_result_zeroblob64", "int", "*",
1753
+ * "i64"]` from SQLite's table.
1754
+ *
1755
+ * See https://sqlite.org/c3ref/result_blob.html.
1756
+ */
1757
+ export declare const sqlite3_result_zeroblob64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_zeroblob64"];
1758
+ /**
1759
+ * Sets an application-defined function's result to an SQL NULL carrying pPtr,
1760
+ * which {@link sqlite3_value_pointer} returns for an equal type name. SQLite
1761
+ * keeps zPType itself, so it must outlive the value, and calls a non-NULL
1762
+ * xDestructor with pPtr when done with it.
1763
+ *
1764
+ * Wasm type `v(iiii)`. Signature `["sqlite3_result_pointer", undefined,
1765
+ * "sqlite3_context*", "*", "string:static", "*"]` from SQLite's table.
1766
+ *
1767
+ * See https://sqlite.org/c3ref/result_blob.html.
1768
+ */
1769
+ export declare const sqlite3_result_pointer: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_pointer"];
1770
+ /**
1771
+ * Sets the subtype of an application-defined function's result, keeping only
1772
+ * its low 8 bits. The function must be registered with SQLITE_RESULT_SUBTYPE:
1773
+ * without it the subtype might not be set, and a build with
1774
+ * SQLITE_STRICT_SUBTYPE, such as this one, fails the function with an error.
1775
+ * SQLite's table declares the first parameter as sqlite3_value*, but the C
1776
+ * function takes sqlite3_context*.
1777
+ *
1778
+ * Wasm type `v(ii)`. Signature `["sqlite3_result_subtype", undefined,
1779
+ * "sqlite3_value*", "int"]` from SQLite's table.
1780
+ *
1781
+ * See https://sqlite.org/c3ref/result_subtype.html.
1782
+ */
1783
+ export declare const sqlite3_result_subtype: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_subtype"];
1784
+ /**
1785
+ * Makes an application-defined function fail with a copy of a UTF-8 message of
1786
+ * n bytes, or up to its NUL terminator when n is negative. It resets the error
1787
+ * code to SQLITE_ERROR, so call {@link sqlite3_result_error_code} after it.
1788
+ *
1789
+ * Wasm type `v(iii)`. Signature `["sqlite3_result_error", undefined,
1790
+ * "sqlite3_context*", "string", "int"]` from SQLite's table.
1791
+ *
1792
+ * See https://sqlite.org/c3ref/result_blob.html.
1793
+ */
1794
+ export declare const sqlite3_result_error: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_error"];
1795
+ /**
1796
+ * Makes an application-defined function fail with a result code instead of
1797
+ * SQLITE_ERROR, and with the code's default message when no result was set.
1798
+ * Call it after {@link sqlite3_result_error}, which resets the code to
1799
+ * SQLITE_ERROR.
1800
+ *
1801
+ * Wasm type `v(ii)`. Signature `["sqlite3_result_error_code", undefined,
1802
+ * "sqlite3_context*", "int"]` from SQLite's table.
1803
+ *
1804
+ * See https://sqlite.org/c3ref/result_blob.html.
1805
+ */
1806
+ export declare const sqlite3_result_error_code: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_error_code"];
1807
+ /**
1808
+ * Makes an application-defined function fail with SQLITE_NOMEM, as a failed
1809
+ * memory allocation would.
1810
+ *
1811
+ * Wasm type `v(i)`. Signature `["sqlite3_result_error_nomem", undefined,
1812
+ * "sqlite3_context*"]` from SQLite's table.
1813
+ *
1814
+ * See https://sqlite.org/c3ref/result_blob.html.
1815
+ */
1816
+ export declare const sqlite3_result_error_nomem: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_error_nomem"];
1817
+ /**
1818
+ * Makes an application-defined function fail with SQLITE_TOOBIG, reporting a
1819
+ * string or blob too big to represent.
1820
+ *
1821
+ * Wasm type `v(i)`. Signature `["sqlite3_result_error_toobig", undefined,
1822
+ * "sqlite3_context*"]` from SQLite's table.
1823
+ *
1824
+ * See https://sqlite.org/c3ref/result_blob.html.
1825
+ */
1826
+ export declare const sqlite3_result_error_toobig: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_result_error_toobig"];
1827
+ /**
1828
+ * Returns the value of a URI query parameter of a filename, an empty string for
1829
+ * a parameter without a value, or NULL when it is absent or the filename is
1830
+ * NULL.
1831
+ *
1832
+ * Wasm type `i(ii)`. Signature `["sqlite3_uri_parameter", "string",
1833
+ * "sqlite3_filename", "string"]` from SQLite's table.
1834
+ *
1835
+ * See https://sqlite.org/c3ref/uri_boolean.html.
1836
+ */
1837
+ export declare const sqlite3_uri_parameter: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_uri_parameter"];
1838
+ /**
1839
+ * Returns 1 when a filename's URI query parameter is yes, true or on in any
1840
+ * case or starts with a non-zero number, 0 when it is no, false or off or
1841
+ * starts with zero, and whether bDefault is non-zero otherwise, including for a
1842
+ * NULL filename.
1843
+ *
1844
+ * Wasm type `i(iii)`. Signature `["sqlite3_uri_boolean", "int",
1845
+ * "sqlite3_filename", "string", "int"]` from SQLite's table.
1846
+ *
1847
+ * See https://sqlite.org/c3ref/uri_boolean.html.
1848
+ */
1849
+ export declare const sqlite3_uri_boolean: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_uri_boolean"];
1850
+ /**
1851
+ * Returns a URI query parameter of a filename SQLite created as a 64-bit
1852
+ * integer, or iDefault when the filename is NULL or the parameter is missing or
1853
+ * not a decimal or hexadecimal integer.
1854
+ *
1855
+ * Wasm type `j(iij)`. Signature `["sqlite3_uri_int64", "i64",
1856
+ * "sqlite3_filename", "string", "i64"]` from SQLite's table.
1857
+ *
1858
+ * See https://sqlite.org/c3ref/uri_boolean.html.
1859
+ */
1860
+ export declare const sqlite3_uri_int64: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_uri_int64"];
1861
+ /**
1862
+ * Returns the name of a filename's N-th URI query parameter, counting from 0,
1863
+ * or NULL when N is out of range.
1864
+ *
1865
+ * Wasm type `i(ii)`. Signature `["sqlite3_uri_key", "string",
1866
+ * "sqlite3_filename", "int"]` from SQLite's table.
1867
+ *
1868
+ * See https://sqlite.org/c3ref/uri_boolean.html.
1869
+ */
1870
+ export declare const sqlite3_uri_key: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_uri_key"];
1871
+ /**
1872
+ * Returns a registered VFS by name, or the default VFS for NULL.
1873
+ *
1874
+ * Wasm type `i(i)`. Signature `["sqlite3_vfs_find", "*", "string"]` from
1875
+ * SQLite's table.
1876
+ *
1877
+ * See https://sqlite.org/c3ref/vfs_find.html.
1878
+ */
1879
+ export declare const sqlite3_vfs_find: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vfs_find"];
1880
+ /**
1881
+ * Registers a VFS, optionally as the default. The struct and its name must
1882
+ * outlive the registration.
1883
+ *
1884
+ * Wasm type `i(ii)`. Signature `["sqlite3_vfs_register", "int", "sqlite3_vfs*",
1885
+ * "int"]` from SQLite's table.
1886
+ *
1887
+ * See https://sqlite.org/c3ref/vfs_find.html.
1888
+ */
1889
+ export declare const sqlite3_vfs_register: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vfs_register"];
1890
+ /**
1891
+ * Unregisters a VFS. When it was the default, SQLite makes an arbitrary other
1892
+ * VFS the default.
1893
+ *
1894
+ * Wasm type `i(i)`. Signature `["sqlite3_vfs_unregister", "int",
1895
+ * "sqlite3_vfs*"]` from SQLite's table.
1896
+ *
1897
+ * See https://sqlite.org/c3ref/vfs_find.html.
1898
+ */
1899
+ export declare const sqlite3_vfs_unregister: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vfs_unregister"];
1900
+ /**
1901
+ * Returns the ON CONFLICT mode of the statement that called xUpdate for an
1902
+ * INSERT or UPDATE: SQLITE_ROLLBACK, SQLITE_IGNORE, SQLITE_FAIL, SQLITE_ABORT
1903
+ * or SQLITE_REPLACE. Only xUpdate may call it.
1904
+ *
1905
+ * Wasm type `i(i)`. Signature `["sqlite3_vtab_on_conflict", "int", "sqlite3*"]`
1906
+ * from SQLite's table.
1907
+ *
1908
+ * See https://sqlite.org/c3ref/vtab_on_conflict.html.
1909
+ */
1910
+ export declare const sqlite3_vtab_on_conflict: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_on_conflict"];
1911
+ /**
1912
+ * Returns non-zero inside xColumn when the column is fetched for an UPDATE that
1913
+ * does not change it, so xColumn may leave the result unset. It is only a hint
1914
+ * and may always return 0.
1915
+ *
1916
+ * Wasm type `i(i)`. Signature `["sqlite3_vtab_nochange", "int",
1917
+ * "sqlite3_context*"]` from SQLite's table.
1918
+ *
1919
+ * See https://sqlite.org/c3ref/vtab_nochange.html.
1920
+ */
1921
+ export declare const sqlite3_vtab_nochange: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_nochange"];
1922
+ /**
1923
+ * Returns the collation name for text comparisons of an xBestIndex constraint,
1924
+ * `BINARY` by default, or NULL for an index outside aConstraint. Only
1925
+ * xBestIndex may call it, with the sqlite3_index_info it received.
1926
+ *
1927
+ * Wasm type `i(ii)`. Signature `["sqlite3_vtab_collation", "string",
1928
+ * "sqlite3_index_info*", "int"]` from SQLite's table.
1929
+ *
1930
+ * See https://sqlite.org/c3ref/vtab_collation.html.
1931
+ */
1932
+ export declare const sqlite3_vtab_collation: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_collation"];
1933
+ /**
1934
+ * Returns how the planner needs a virtual table's rows for orderByConsumed: 0
1935
+ * in aOrderBy order, 1 with equal aOrderBy values adjacent, 2 adjacent with
1936
+ * duplicates over colUsed omittable, 3 in order with such duplicates omittable.
1937
+ * Only xBestIndex may call it.
1938
+ *
1939
+ * Wasm type `i(i)`. Signature `["sqlite3_vtab_distinct", "int",
1940
+ * "sqlite3_index_info*"]` from SQLite's table.
1941
+ *
1942
+ * See https://sqlite.org/c3ref/vtab_distinct.html.
1943
+ */
1944
+ export declare const sqlite3_vtab_distinct: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_distinct"];
1945
+ /**
1946
+ * Returns non-zero when constraint iCons is an IN operator that can be
1947
+ * processed all at once; bHandle 1 or 0 requests or declines that processing,
1948
+ * and -1 only asks. Only xBestIndex may call it.
1949
+ *
1950
+ * Wasm type `i(iii)`. Signature `["sqlite3_vtab_in", "int",
1951
+ * "sqlite3_index_info*", "int", "int"]` from SQLite's table.
1952
+ *
1953
+ * See https://sqlite.org/c3ref/vtab_in.html.
1954
+ */
1955
+ export declare const sqlite3_vtab_in: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_in"];
1956
+ /**
1957
+ * Writes the first right-hand value of an all-at-once IN constraint, given its
1958
+ * xFilter argument, to ppOut and returns SQLITE_OK, or writes NULL and returns
1959
+ * SQLITE_DONE when there is none. The value stays valid until the next call or
1960
+ * the end of xFilter.
1961
+ *
1962
+ * Wasm type `i(ii)`. Signature `["sqlite3_vtab_in_first", "int",
1963
+ * "sqlite3_value*", "**"]` from SQLite's table.
1964
+ *
1965
+ * See https://sqlite.org/c3ref/vtab_in_first.html.
1966
+ */
1967
+ export declare const sqlite3_vtab_in_first: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_in_first"];
1968
+ /**
1969
+ * Writes the next right-hand value of an all-at-once IN constraint, given its
1970
+ * xFilter argument, to ppOut and returns SQLITE_OK, or writes NULL and returns
1971
+ * SQLITE_DONE after the last. The value stays valid until the next call or the
1972
+ * end of xFilter.
1973
+ *
1974
+ * Wasm type `i(ii)`. Signature `["sqlite3_vtab_in_next", "int",
1975
+ * "sqlite3_value*", "**"]` from SQLite's table.
1976
+ *
1977
+ * See https://sqlite.org/c3ref/vtab_in_first.html.
1978
+ */
1979
+ export declare const sqlite3_vtab_in_next: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_in_next"];
1980
+ /**
1981
+ * Writes the right-hand value of constraint iCons to ppVal and returns
1982
+ * SQLITE_OK, or writes NULL and returns SQLITE_NOTFOUND when it is not known,
1983
+ * which is usual unless it is a literal. Only xBestIndex may call it, and the
1984
+ * value is freed when xBestIndex returns.
1985
+ *
1986
+ * Wasm type `i(iii)`. Signature `["sqlite3_vtab_rhs_value", "int",
1987
+ * "sqlite3_index_info*", "int", "**"]` from SQLite's table.
1988
+ *
1989
+ * See https://sqlite.org/c3ref/vtab_rhs_value.html.
1990
+ */
1991
+ export declare const sqlite3_vtab_rhs_value: (deps: SqliteWasmDep) => SqliteCExports["sqlite3_vtab_rhs_value"];
1992
+ /** An option of {@link sqlite3_config} that takes one int. */
1993
+ export type SqliteConfigIntOp = typeof SQLITE_CONFIG_MEMSTATUS | typeof SQLITE_CONFIG_URI | typeof SQLITE_CONFIG_COVERING_INDEX_SCAN | typeof SQLITE_CONFIG_STMTJRNL_SPILL | typeof SQLITE_CONFIG_SMALL_MALLOC | typeof SQLITE_CONFIG_SORTERREF_SIZE;
1994
+ /** An option of {@link sqlite3_config} and the arguments it takes. */
1995
+ export type SqliteConfigArgs = readonly [op: SqliteConfigIntOp, value: number] | readonly [op: typeof SQLITE_CONFIG_LOOKASIDE, sz: number, cnt: number] | readonly [op: typeof SQLITE_CONFIG_MEMDB_MAXSIZE, value: bigint];
1996
+ /**
1997
+ * Changes a global option of the library, which works only before
1998
+ * {@link sqlite3_initialize} or after {@link sqlite3_shutdown} and otherwise
1999
+ * returns SQLITE_MISUSE. The loader initializes the library, so call it after
2000
+ * sqlite3_shutdown, then initialize the library again with
2001
+ * initializeSqliteWasm, as sqlite3_shutdown explains.
2002
+ *
2003
+ * - SQLITE_CONFIG_MEMSTATUS, SQLITE_CONFIG_SMALL_MALLOC, SQLITE_CONFIG_URI and
2004
+ * SQLITE_CONFIG_COVERING_INDEX_SCAN turn a feature on for a non-zero value
2005
+ * and off for 0.
2006
+ * - SQLITE_CONFIG_STMTJRNL_SPILL sets the byte size above which statement
2007
+ * journals spill to disk. SQLITE_CONFIG_SORTERREF_SIZE fails with
2008
+ * SQLITE_ERROR, since this build does not enable sorter references.
2009
+ * - SQLITE_CONFIG_LOOKASIDE sets the default lookaside allocator of new
2010
+ * connections to cnt slots of sz bytes.
2011
+ * - SQLITE_CONFIG_MEMDB_MAXSIZE sets the default maximum size of a database
2012
+ * {@link sqlite3_deserialize} creates.
2013
+ *
2014
+ * The C function is variadic, so the binary does not export it. This calls the
2015
+ * build's shim for the option's arguments and, as SQLite's JavaScript does,
2016
+ * returns SQLITE_NOTFOUND for every other option without calling wasm, because
2017
+ * the shims pass their arguments to the C function unchecked.
2018
+ *
2019
+ * Calls the build's shims, whose signatures come from Evolu's metadata because
2020
+ * SQLite's table omits them:
2021
+ *
2022
+ * - `sqlite3__wasm_config_i`, wasm type `i(ii)`, signature
2023
+ * `["sqlite3__wasm_config_i", "int", "int", "int"]`.
2024
+ * - `sqlite3__wasm_config_ii`, wasm type `i(iii)`, signature
2025
+ * `["sqlite3__wasm_config_ii", "int", "int", "int", "int"]`.
2026
+ * - `sqlite3__wasm_config_j`, wasm type `i(ij)`, signature
2027
+ * `["sqlite3__wasm_config_j", "int", "int", "i64"]`.
2028
+ *
2029
+ * See https://sqlite.org/c3ref/config.html.
2030
+ */
2031
+ export declare const sqlite3_config: (deps: SqliteWasmDep) => ((...args: SqliteConfigArgs) => SqliteResultCode);
2032
+ /**
2033
+ * An option of {@link sqlite3_db_config} that takes an int and an `int*`: a
2034
+ * flag, or SQLITE_DBCONFIG_FP_DIGITS.
2035
+ */
2036
+ export type SqliteDbConfigIntOp = typeof SQLITE_DBCONFIG_ENABLE_FKEY | typeof SQLITE_DBCONFIG_ENABLE_TRIGGER | typeof SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION | typeof SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE | typeof SQLITE_DBCONFIG_ENABLE_QPSG | typeof SQLITE_DBCONFIG_TRIGGER_EQP | typeof SQLITE_DBCONFIG_RESET_DATABASE | typeof SQLITE_DBCONFIG_DEFENSIVE | typeof SQLITE_DBCONFIG_WRITABLE_SCHEMA | typeof SQLITE_DBCONFIG_LEGACY_ALTER_TABLE | typeof SQLITE_DBCONFIG_DQS_DML | typeof SQLITE_DBCONFIG_DQS_DDL | typeof SQLITE_DBCONFIG_ENABLE_VIEW | typeof SQLITE_DBCONFIG_LEGACY_FILE_FORMAT | typeof SQLITE_DBCONFIG_TRUSTED_SCHEMA | typeof SQLITE_DBCONFIG_STMT_SCANSTATUS | typeof SQLITE_DBCONFIG_REVERSE_SCANORDER | typeof SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE | typeof SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE | typeof SQLITE_DBCONFIG_ENABLE_COMMENTS | typeof SQLITE_DBCONFIG_FP_DIGITS;
2037
+ /** An option of {@link sqlite3_db_config} and the arguments it takes. */
2038
+ export type SqliteDbConfigArgs = readonly [op: typeof SQLITE_DBCONFIG_MAINDBNAME, zName: CStringPtr] | readonly [
2039
+ op: typeof SQLITE_DBCONFIG_LOOKASIDE,
2040
+ buf: WasmPtr | NullPtr,
2041
+ sz: number,
2042
+ cnt: number
2043
+ ] | readonly [
2044
+ op: SqliteDbConfigIntOp,
2045
+ value: number,
2046
+ pResult?: WasmPtr | NullPtr
2047
+ ];
2048
+ /**
2049
+ * Changes or reads an option of a connection, returning SQLITE_OK or an error
2050
+ * code.
2051
+ *
2052
+ * - SQLITE_DBCONFIG_MAINDBNAME renames the main schema to zName, which SQLite
2053
+ * does not copy, so it must stay unchanged until the connection closes.
2054
+ * - SQLITE_DBCONFIG_LOOKASIDE sets the connection's lookaside allocator to cnt
2055
+ * slots of sz bytes in buf, which must be 8-byte aligned and hold sz times
2056
+ * cnt bytes, or in memory SQLite allocates for a NULL buf. It fails with
2057
+ * SQLITE_BUSY while lookaside memory is in use.
2058
+ * - SQLITE_DBCONFIG_FP_DIGITS sets the significant digits of floating-point to
2059
+ * text conversion to value when it is from 4 to 23, leaving the setting
2060
+ * unchanged otherwise, and writes the resulting setting to the int at pResult
2061
+ * unless it is NULL.
2062
+ * - Every other option is a flag: a positive value sets it, 0 clears it and a
2063
+ * negative value only reads it, and the resulting 0 or 1 is written to the
2064
+ * int at pResult unless it is NULL. Changing a flag expires the connection's
2065
+ * prepared statements.
2066
+ *
2067
+ * The C function is variadic, so the binary does not export it. This calls the
2068
+ * build's shim for the option's arguments and, as SQLite's JavaScript does,
2069
+ * returns SQLITE_MISUSE for any other option without calling wasm.
2070
+ *
2071
+ * Calls the build's shims, whose signatures come from Evolu's metadata because
2072
+ * SQLite's table omits them:
2073
+ *
2074
+ * - `sqlite3__wasm_db_config_s`, wasm type `i(iii)`, signature
2075
+ * `["sqlite3__wasm_db_config_s", "int", "sqlite3*", "int", "string"]`.
2076
+ * - `sqlite3__wasm_db_config_pii`, wasm type `i(iiiii)`, signature
2077
+ * `["sqlite3__wasm_db_config_pii", "int", "sqlite3*", "int", "*", "int",
2078
+ * "int"]`.
2079
+ * - `sqlite3__wasm_db_config_ip`, wasm type `i(iiii)`, signature
2080
+ * `["sqlite3__wasm_db_config_ip", "int", "sqlite3*", "int", "int", "int*"]`.
2081
+ *
2082
+ * See https://sqlite.org/c3ref/db_config.html.
2083
+ */
2084
+ export declare const sqlite3_db_config: (deps: SqliteWasmDep) => ((db: SqliteDbPtr, ...args: SqliteDbConfigArgs) => SqliteResultCode);
2085
+ /** An option of {@link sqlite3_vtab_config} the build's shim supports. */
2086
+ export type SqliteVtabConfigOp = typeof SQLITE_VTAB_CONSTRAINT_SUPPORT | typeof SQLITE_VTAB_INNOCUOUS | typeof SQLITE_VTAB_DIRECTONLY;
2087
+ /**
2088
+ * Sets an option of the virtual table whose xCreate or xConnect method is
2089
+ * running, the only place it may be called.
2090
+ *
2091
+ * - SQLITE_VTAB_CONSTRAINT_SUPPORT with a non-zero value declares that xUpdate
2092
+ * returns SQLITE_CONSTRAINT only before changing anything, so SQLite can
2093
+ * honor the statement's ON CONFLICT mode.
2094
+ * - SQLITE_VTAB_INNOCUOUS marks the virtual table as safe to use in triggers and
2095
+ * views, and SQLITE_VTAB_DIRECTONLY prohibits that. Both ignore value.
2096
+ *
2097
+ * The C function is variadic, so the binary does not export it. The build's
2098
+ * shim returns SQLITE_MISUSE for any other option, including
2099
+ * SQLITE_VTAB_USES_ALL_SCHEMAS, which it does not support.
2100
+ *
2101
+ * Returns the build's shim `sqlite3__wasm_vtab_config`, wasm type `i(iii)`,
2102
+ * signature `["sqlite3__wasm_vtab_config", "int", "sqlite3*", "int", "int"]`.
2103
+ * Its signature comes from Evolu's metadata because SQLite's table omits it.
2104
+ *
2105
+ * See https://sqlite.org/c3ref/vtab_config.html.
2106
+ */
2107
+ export declare const sqlite3_vtab_config: (deps: SqliteWasmDep) => ((db: SqliteDbPtr, op: SqliteVtabConfigOp, value: number) => SqliteResultCode);
2108
+ //# sourceMappingURL=CApi.d.ts.map