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

Add missing sqlite3_bind_parameter_name() binding to JS.

FossilOrigin-Name: 6dcfcc7e1c0772b11aec750bb75899a5c8e452735ecf5028c001fbaa7aa6fda0
This commit is contained in:
stephan
2024-07-13 13:22:32 +00:00
parent 6f9b37b35b
commit 0b9efaffd7
6 changed files with 53 additions and 19 deletions

View File

@ -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*/;