1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Expose sqlite3_txn_state() to wasm.

FossilOrigin-Name: f6f3397a4667b15a96bdf4189c54789d622fd90351405e963d7f56ac93a9344c
This commit is contained in:
stephan
2022-12-12 07:31:37 +00:00
parent 9bda4c53c1
commit fda3c30b7d
6 changed files with 19 additions and 11 deletions

View File

@ -111,6 +111,7 @@ _sqlite3_table_column_metadata
_sqlite3_total_changes
_sqlite3_total_changes64
_sqlite3_trace_v2
_sqlite3_txn_state
_sqlite3_uri_boolean
_sqlite3_uri_int64
_sqlite3_uri_key

View File

@ -572,7 +572,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
'prepareFlags', 'resultCodes',
'serialize', 'sqlite3Status',
'stmtStatus', 'syncFlags',
'trace', 'udfFlags',
'trace', 'txnState', 'udfFlags',
'version' ];
if(wasm.bigIntEnabled){
defineGroups.push('vtab');

View File

@ -1032,6 +1032,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
"**", "**", "*", "*", "*"],
["sqlite3_total_changes", "int", "sqlite3*"],
["sqlite3_trace_v2", "int", "sqlite3*", "int", "*", "*"],
["sqlite3_txn_state", "int", ["sqlite3*","string"]],
/* Note that sqlite3_uri_...() have very specific requirements for
their first C-string arguments, so we cannot perform any value
conversion on those. */

View File

@ -764,6 +764,12 @@ const char * sqlite3_wasm_enum_json(void){
DefInt(SQLITE_TRACE_CLOSE);
} _DefGroup;
DefGroup(txnState){
DefInt(SQLITE_TXN_NONE);
DefInt(SQLITE_TXN_READ);
DefInt(SQLITE_TXN_WRITE);
} _DefGroup;
DefGroup(udfFlags) {
DefInt(SQLITE_DETERMINISTIC);
DefInt(SQLITE_DIRECTONLY);