@@ -109,7 +109,7 @@ bool DatabaseSync::Open() {
109
109
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
110
110
int r = sqlite3_open_v2 (location_.c_str (), &connection_, flags, nullptr );
111
111
CHECK_ERROR_OR_THROW (env ()->isolate (), connection_, r, SQLITE_OK, false );
112
- int r2 = sqlite3_enable_load_extension (connection_, 1 );
112
+ int r2 = sqlite3_db_config (connection_, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1 , NULL );
113
113
CHECK_ERROR_OR_THROW (env ()->isolate (), connection_, r2, SQLITE_OK, false );
114
114
return true ;
115
115
}
@@ -688,7 +688,7 @@ static void Initialize(Local<Object> target,
688
688
SetProtoMethod (isolate, db_tmpl, " close" , DatabaseSync::Close);
689
689
SetProtoMethod (isolate, db_tmpl, " prepare" , DatabaseSync::Prepare);
690
690
SetProtoMethod (isolate, db_tmpl, " exec" , DatabaseSync::Exec);
691
- SetProtoMethod (isolate, db_tmpl, " load_extension " , DatabaseSync::LoadExtension);
691
+ SetProtoMethod (isolate, db_tmpl, " loadExtension " , DatabaseSync::LoadExtension);
692
692
SetConstructorFunction (context, target, " DatabaseSync" , db_tmpl);
693
693
SetConstructorFunction (context,
694
694
target,
0 commit comments