Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mewim committed Apr 12, 2024
1 parent 2ff6c53 commit b73d2f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions tools/nodejs_api/src_cpp/include/node_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class ConnectionInitAsyncWorker : public Napi::AsyncWorker {
inline void Execute() override {
try {
nodeConnection->InitCppConnection();
} catch (const std::exception& exc) { SetError(std::string(exc.what())); }
} catch (const std::exception& exc) {
SetError(std::string(exc.what()));
}
}

inline void OnOK() override { Callback().Call({Env().Null()}); }
Expand Down Expand Up @@ -75,7 +77,9 @@ class ConnectionExecuteAsyncWorker : public Napi::AsyncWorker {
SetError(result->getErrorMessage());
return;
}
} catch (const std::exception& exc) { SetError(std::string(exc.what())); }
} catch (const std::exception& exc) {
SetError(std::string(exc.what()));
}
}

inline void OnOK() override { Callback().Call({Env().Null()}); }
Expand Down Expand Up @@ -106,7 +110,9 @@ class ConnectionQueryAsyncWorker : public Napi::AsyncWorker {
SetError(result->getErrorMessage());
return;
}
} catch (const std::exception& exc) { SetError(std::string(exc.what())); }
} catch (const std::exception& exc) {
SetError(std::string(exc.what()));
}
}

inline void OnOK() override { Callback().Call({Env().Null()}); }
Expand Down
3 changes: 2 additions & 1 deletion tools/nodejs_api/src_cpp/node_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ Napi::Value NodeConnection::QueryAsync(const Napi::CallbackInfo& info) {
auto statement = info[0].As<Napi::String>().Utf8Value();
auto nodeQueryResult = Napi::ObjectWrap<NodeQueryResult>::Unwrap(info[1].As<Napi::Object>());
auto callback = info[2].As<Napi::Function>();
auto asyncWorker = new ConnectionQueryAsyncWorker(callback, connection, statement, nodeQueryResult);
auto asyncWorker =
new ConnectionQueryAsyncWorker(callback, connection, statement, nodeQueryResult);
asyncWorker->Queue();
return info.Env().Undefined();
}

0 comments on commit b73d2f8

Please sign in to comment.