Skip to content

Commit 58669a3

Browse files
Update ext/node/ops/sqlite/statement.rs
Co-authored-by: Divy Srivastava <[email protected]> Signed-off-by: Gowtham K <[email protected]>
1 parent 4177060 commit 58669a3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/node/ops/sqlite/statement.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ impl StatementSync {
290290
}
291291
param_count += 1;
292292
} else if value.is_object() {
293-
let mut params: HashMap<String, Local<v8::Value>> = HashMap::new();
294293
let value: v8::Local<v8::Object> = value.try_into().unwrap();
295294
let maybe_keys =
296295
value.get_property_names(scope, GetPropertyNamesArgs::default());
@@ -302,15 +301,13 @@ impl StatementSync {
302301
if let Some(key_str) = key.to_string(scope) {
303302
let key_str = key_str.to_rust_string_lossy(scope);
304303
if let Some(value) = value.get(scope, key) {
305-
params.insert(key_str, value);
304+
self.bind_params_object(scope, key_str, value, param_count)?;
305+
param_count += 1;
306306
}
307307
}
308308
}
309309
}
310310
}
311-
for (key, value) in params {
312-
self.bind_params_object(scope, key, value, param_count)?;
313-
param_count += 1;
314311
}
315312
} else {
316313
return Err(SqliteError::FailedBind("Unsupported type"));

0 commit comments

Comments
 (0)