aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-07-13 13:22:32 +0000
committerstephan <stephan@noemail.net>2024-07-13 13:22:32 +0000
commit0b9efaffd7eaf7881196b9d443670809f949be60 (patch)
treedc5e7abf3ea7ce08e66435b4a14a6e551acc3ac2 /ext/wasm/api
parent6f9b37b35bf31ee3bc9158c9309cf205efab8d90 (diff)
downloadsqlite-0b9efaffd7eaf7881196b9d443670809f949be60.tar.gz
sqlite-0b9efaffd7eaf7881196b9d443670809f949be60.zip
Add missing sqlite3_bind_parameter_name() binding to JS.
FossilOrigin-Name: 6dcfcc7e1c0772b11aec750bb75899a5c8e452735ecf5028c001fbaa7aa6fda0
Diffstat (limited to 'ext/wasm/api')
-rw-r--r--ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api1
-rw-r--r--ext/wasm/api/sqlite3-api-glue.c-pp.js1
-rw-r--r--ext/wasm/api/sqlite3-api-oo1.c-pp.js13
3 files changed, 15 insertions, 0 deletions
diff --git a/ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api b/ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api
index c2dedfd57..dc6211ccb 100644
--- a/ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api
+++ b/ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api
@@ -10,6 +10,7 @@ _sqlite3_bind_int64
_sqlite3_bind_null
_sqlite3_bind_parameter_count
_sqlite3_bind_parameter_index
+_sqlite3_bind_parameter_name
_sqlite3_bind_pointer
_sqlite3_bind_text
_sqlite3_busy_handler
diff --git a/ext/wasm/api/sqlite3-api-glue.c-pp.js b/ext/wasm/api/sqlite3-api-glue.c-pp.js
index d3ea8a35a..2c40f2100 100644
--- a/ext/wasm/api/sqlite3-api-glue.c-pp.js
+++ b/ext/wasm/api/sqlite3-api-glue.c-pp.js
@@ -95,6 +95,7 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
["sqlite3_bind_null",undefined, "sqlite3_stmt*", "int"],
["sqlite3_bind_parameter_count", "int", "sqlite3_stmt*"],
["sqlite3_bind_parameter_index","int", "sqlite3_stmt*", "string"],
+ ["sqlite3_bind_parameter_name", "string", "sqlite3_stmt*", "int"],
["sqlite3_bind_pointer", "int",
"sqlite3_stmt*", "int", "*", "string:static", "*"],
["sqlite3_busy_handler","int", [
diff --git a/ext/wasm/api/sqlite3-api-oo1.c-pp.js b/ext/wasm/api/sqlite3-api-oo1.c-pp.js
index e557cbd57..0b9bbbbca 100644
--- a/ext/wasm/api/sqlite3-api-oo1.c-pp.js
+++ b/ext/wasm/api/sqlite3-api-oo1.c-pp.js
@@ -2030,6 +2030,19 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
return (affirmStmtOpen(this).parameterCount
? capi.sqlite3_bind_parameter_index(this.pointer, name)
: undefined);
+ },
+ /**
+ If this statement has named bindable parameters and the given
+ index refers to one, its name is returned, else null is
+ returned. If this statement has no bound parameters, undefined
+ is returned.
+
+ Added in 3.47.
+ */
+ getParamName: function(ndx){
+ return (affirmStmtOpen(this).parameterCount
+ ? capi.sqlite3_bind_parameter_name(this.pointer, ndx)
+ : undefined);
}
}/*Stmt.prototype*/;