sqlite: handle ?NNN parameters as positional

PR-URL: https://github.com/nodejs/node/pull/59350
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
This commit is contained in:
Edy Silva authored and Richard Lau committed 2025-09-20 06:10:19 +00:00
1 parent 1b4885a3f2
commit 3478130da3
2 files changed
+33 -1

No files matched your search

+3 -1
View File
@@ -1932,7 +1932,9 @@ bool StatementSync::BindParams(const FunctionCallbackInfo<Value>& args) {
}
for (int i = anon_start; i < args.Length(); ++i) {
while (sqlite3_bind_parameter_name(statement_, anon_idx) != nullptr) {
while (1) {
const char* param = sqlite3_bind_parameter_name(statement_, anon_idx);
if (param == nullptr || param[0] == '?') break;
anon_idx++;
}