Skip to content

Commit 3662e71

Browse files
committed
sqlite: format code
1 parent e7288f3 commit 3662e71

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/node_sqlite.cc

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -689,17 +689,17 @@ int AuthorizerFunction::xAuthorizer(void* user_data,
689689
// Convert SQLite authorizer parameters to JavaScript values
690690
js_argv.emplace_back(Integer::New(isolate, action_code));
691691
js_argv.emplace_back(
692-
NullableSQLiteStringToValue(isolate, param1).ToLocalChecked());
692+
NullableSQLiteStringToValue(isolate, param1).ToLocalChecked());
693693
js_argv.emplace_back(
694-
NullableSQLiteStringToValue(isolate, param2).ToLocalChecked());
694+
NullableSQLiteStringToValue(isolate, param2).ToLocalChecked());
695695
js_argv.emplace_back(
696-
NullableSQLiteStringToValue(isolate, param3).ToLocalChecked());
696+
NullableSQLiteStringToValue(isolate, param3).ToLocalChecked());
697697
js_argv.emplace_back(
698-
NullableSQLiteStringToValue(isolate, param4).ToLocalChecked());
698+
NullableSQLiteStringToValue(isolate, param4).ToLocalChecked());
699699

700700
TryCatch try_catch(isolate);
701-
MaybeLocal<Value> retval = fn->Call(
702-
context, Undefined(isolate), js_argv.size(), js_argv.data());
701+
MaybeLocal<Value> retval =
702+
fn->Call(context, Undefined(isolate), js_argv.size(), js_argv.data());
703703

704704
if (try_catch.HasCaught()) {
705705
// If there's an exception in the callback, deny the operation
@@ -1926,25 +1926,23 @@ void DatabaseSync::SetAuthorizer(const FunctionCallbackInfo<Value>& args) {
19261926
Environment* env = Environment::GetCurrent(args);
19271927
Isolate* isolate = env->isolate();
19281928

1929-
if ( args[0]->IsNull() ) {
1929+
if (args[0]->IsNull()) {
19301930
// Clear the authorizer
19311931
sqlite3_set_authorizer(db->connection_, nullptr, nullptr);
19321932
return;
19331933
}
19341934

19351935
if (!args[0]->IsFunction()) {
19361936
THROW_ERR_INVALID_ARG_TYPE(
1937-
isolate,
1938-
"The \"callback\" argument must be a function or null.");
1937+
isolate, "The \"callback\" argument must be a function or null.");
19391938
return;
19401939
}
19411940

19421941
Local<Function> fn = args[0].As<Function>();
19431942
AuthorizerFunction* user_data = new AuthorizerFunction(env, fn, db);
19441943

1945-
int r = sqlite3_set_authorizer(db->connection_,
1946-
AuthorizerFunction::xAuthorizer,
1947-
user_data);
1944+
int r = sqlite3_set_authorizer(
1945+
db->connection_, AuthorizerFunction::xAuthorizer, user_data);
19481946

19491947
if (r != SQLITE_OK) {
19501948
delete user_data;
@@ -3264,10 +3262,8 @@ static void Initialize(Local<Object> target,
32643262
DatabaseSync::EnableLoadExtension);
32653263
SetProtoMethod(
32663264
isolate, db_tmpl, "loadExtension", DatabaseSync::LoadExtension);
3267-
SetProtoMethod(isolate,
3268-
db_tmpl,
3269-
"setAuthorizer",
3270-
DatabaseSync::SetAuthorizer);
3265+
SetProtoMethod(
3266+
isolate, db_tmpl, "setAuthorizer", DatabaseSync::SetAuthorizer);
32713267
SetSideEffectFreeGetter(isolate,
32723268
db_tmpl,
32733269
FIXED_ONE_BYTE_STRING(isolate, "isOpen"),

0 commit comments

Comments
 (0)