From 0b9efaffd7eaf7881196b9d443670809f949be60 Mon Sep 17 00:00:00 2001 From: stephan Date: Sat, 13 Jul 2024 13:22:32 +0000 Subject: Add missing sqlite3_bind_parameter_name() binding to JS. FossilOrigin-Name: 6dcfcc7e1c0772b11aec750bb75899a5c8e452735ecf5028c001fbaa7aa6fda0 --- ext/wasm/api/sqlite3-api-oo1.c-pp.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ext/wasm/api/sqlite3-api-oo1.c-pp.js') 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*/; -- cgit v1.2.3