1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Wasm: expose sqlite3_exec() and use it to simplify the db-reset logic in batch-runner.js a bit.

FossilOrigin-Name: 2e2821f782511b9d2274a89a5a922582aba18c7e9dc7ce01080e713942a56d7d
This commit is contained in:
stephan
2022-09-28 18:10:50 +00:00
parent cb22bd80d2
commit 4b884bb4c7
4 changed files with 27 additions and 28 deletions

View File

@ -611,9 +611,10 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
["sqlite3_errmsg", "string", "sqlite3*"],
["sqlite3_error_offset", "int", "sqlite3*"],
["sqlite3_errstr", "string", "int"],
//["sqlite3_exec", "int", "sqlite3*", "string", "*", "*", "**"],
// ^^^ TODO: we need a wrapper to support passing a function pointer or a function
// for the callback.
["sqlite3_exec", "int", "sqlite3*", "string", "*", "*", "**"],
// TODO?: ^^^ add a wrapper around sqlite3_exec() which accepts a
// JS callback function and handles the (un)installation of that
// function before/after the exec call.
["sqlite3_expanded_sql", "string", "sqlite3_stmt*"],
["sqlite3_extended_errcode", "int", "sqlite3*"],
["sqlite3_extended_result_codes", "int", "sqlite3*", "int"],