Skip to content

Commit a2b352b

Browse files
committed
src: manual formatting
1 parent 432f0c4 commit a2b352b

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/node_sqlite.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ void DatabaseSync::CreateSession(const FunctionCallbackInfo<Value>& args) {
290290

291291
BaseObjectPtr<Session> session =
292292
Session::Create(env, BaseObjectWeakPtr<DatabaseSync>(db), pSession);
293-
294293
args.GetReturnValue().Set(session->object());
295294
}
296295

@@ -316,8 +315,9 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {
316315
DatabaseSync* db;
317316
ASSIGN_OR_RETURN_UNWRAP(&db, args.This());
318317
Environment* env = Environment::GetCurrent(args);
319-
THROW_AND_RETURN_ON_BAD_STATE(
320-
env, db->connection_ == nullptr, "database is not open");
318+
THROW_AND_RETURN_ON_BAD_STATE(env,
319+
db->connection_ == nullptr,
320+
"database is not open");
321321

322322
if (!args[0]->IsUint8Array()) {
323323
node::THROW_ERR_INVALID_ARG_TYPE(
@@ -380,19 +380,21 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {
380380
filterCallback = [env, filterFunc](std::string item) -> bool {
381381
Local<Value> argv[] = {
382382
String::NewFromUtf8(env->isolate(),
383-
item.c_str(),
384-
v8::NewStringType::kNormal).ToLocalChecked()
383+
item.c_str(),
384+
v8::NewStringType::kNormal).ToLocalChecked()
385385
};
386-
Local<Value> result = filterFunc->Call(
387-
env->context(),
388-
Null(env->isolate()), 1, argv).ToLocalChecked();
386+
Local<Value> result = filterFunc->Call(env->context(),
387+
Null(env->isolate()),
388+
1,
389+
argv).ToLocalChecked();
389390
return result->BooleanValue(env->isolate());
390391
};
391392
}
392393
}
393394

394395
ArrayBufferViewContents<uint8_t> buf(args[0]);
395-
int r = sqlite3changeset_apply(db->connection_,
396+
int r = sqlite3changeset_apply(
397+
db->connection_,
396398
buf.length(),
397399
const_cast<void *>(static_cast<const void *>(buf.data())),
398400
xFilter,

src/node_sqlite.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#ifndef SRC_NODE_SQLITE_H_
22
#define SRC_NODE_SQLITE_H_
33

4-
// TODO(louwers): move to gyp config
5-
#define SQLITE_ENABLE_SESSION
6-
74
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
85

6+
#define SQLITE_ENABLE_SESSION
7+
98
#include "base_object.h"
109
#include "node_mem.h"
1110
#include "sqlite3.h"

0 commit comments

Comments
 (0)