From 3ec44736b51d1f8ed7239654e1ee891e93fd7577 Mon Sep 17 00:00:00 2001 From: stephan Date: Fri, 9 Dec 2022 12:12:49 +0000 Subject: Remove some unused sqlite3_status() codes from the JS API. Add custom JS wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors. FossilOrigin-Name: 073a2f1eb006230ae0995a5ea6c789407bcaa819ec15b5064c66d8973ed4671a --- ext/wasm/api/sqlite3-api-prologue.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/wasm/api/sqlite3-api-prologue.js') diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js index 22dd55e76..136d050c9 100644 --- a/ext/wasm/api/sqlite3-api-prologue.js +++ b/ext/wasm/api/sqlite3-api-prologue.js @@ -936,12 +936,16 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( /* sqlite3_create_function(), sqlite3_create_function_v2(), and sqlite3_create_window_function() use hand-written bindings to simplify handling of their function-type arguments. */ - ["sqlite3_create_collation", "int", - "sqlite3*", "string", "int"/*SQLITE_UTF8 is the only legal value*/, + /* sqlite3_create_collation() and sqlite3_create_collation_v2() + use hand-written bindings to simplify passing of the callback + function. + ["sqlite3_create_collation", "int", + "sqlite3*", "string", "int",//SQLITE_UTF8 is the only legal value "*", "*"], ["sqlite3_create_collation_v2", "int", - "sqlite3*", "string", "int"/*SQLITE_UTF8 is the only legal value*/, + "sqlite3*", "string", "int",//SQLITE_UTF8 is the only legal value "*", "*", "*"], + */ ["sqlite3_data_count", "int", "sqlite3_stmt*"], ["sqlite3_db_filename", "string", "sqlite3*", "string"], ["sqlite3_db_handle", "sqlite3*", "sqlite3_stmt*"], -- cgit v1.2.3