Skip to content

Commit

Permalink
fixup! sqlite: support sqlite3.loadExtension
Browse files Browse the repository at this point in the history
lint fix
  • Loading branch information
himself65 committed Aug 8, 2024
1 parent ada6afb commit 141f72c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ bool DatabaseSync::Open() {
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
int r = sqlite3_open_v2(location_.c_str(), &connection_, flags, nullptr);
CHECK_ERROR_OR_THROW(env()->isolate(), connection_, r, SQLITE_OK, false);
int r2 = sqlite3_db_config(connection_, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL);
int r2 = sqlite3_db_config(
connection_, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL);
CHECK_ERROR_OR_THROW(env()->isolate(), connection_, r2, SQLITE_OK, false);
return true;
}
Expand Down Expand Up @@ -688,7 +689,8 @@ static void Initialize(Local<Object> target,
SetProtoMethod(isolate, db_tmpl, "close", DatabaseSync::Close);
SetProtoMethod(isolate, db_tmpl, "prepare", DatabaseSync::Prepare);
SetProtoMethod(isolate, db_tmpl, "exec", DatabaseSync::Exec);
SetProtoMethod(isolate, db_tmpl, "loadExtension", DatabaseSync::LoadExtension);
SetProtoMethod(
isolate, db_tmpl, "loadExtension", DatabaseSync::LoadExtension);
SetConstructorFunction(context, target, "DatabaseSync", db_tmpl);
SetConstructorFunction(context,
target,
Expand Down

0 comments on commit 141f72c

Please sign in to comment.