Skip to content

Commit

Permalink
fixup! src: remove node namespace from sqlite.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Sep 27, 2024
1 parent a773f11 commit 94803b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "path.h"
#include "sqlite3.h"
#include "util-inl.h"
#include "util.h"

#include <cinttypes>
#include <string_view>
Expand Down Expand Up @@ -226,7 +227,7 @@ void DatabaseSync::Prepare(const FunctionCallbackInfo<Value>& args) {
return;
}

auto sql = Utf8Value(env->isolate(), args[0].As<String>());
Utf8Value sql(env->isolate(), args[0].As<String>());
sqlite3_stmt* s = nullptr;
int r = sqlite3_prepare_v2(db->connection_, *sql, -1, &s, 0);
CHECK_ERROR_OR_THROW(env->isolate(), db->connection_, r, SQLITE_OK, void());
Expand All @@ -247,7 +248,7 @@ void DatabaseSync::Exec(const FunctionCallbackInfo<Value>& args) {
return;
}

auto sql = Utf8Value(env->isolate(), args[0].As<String>());
Utf8Value sql(env->isolate(), args[0].As<String>());
int r = sqlite3_exec(db->connection_, *sql, nullptr, nullptr, nullptr);
CHECK_ERROR_OR_THROW(env->isolate(), db->connection_, r, SQLITE_OK, void());
}
Expand Down Expand Up @@ -335,7 +336,7 @@ bool StatementSync::BindParams(const FunctionCallbackInfo<Value>& args) {
return false;
}

auto utf8_key = Utf8Value(env()->isolate(), key);
Utf8Value utf8_key(env()->isolate(), key);
int r = sqlite3_bind_parameter_index(statement_, *utf8_key);
if (r == 0) {
if (allow_bare_named_params_) {
Expand Down

0 comments on commit 94803b1

Please sign in to comment.