Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3154 #3263

Merged
merged 5 commits into from
Apr 12, 2024
Merged

Fix #3154 #3263

merged 5 commits into from
Apr 12, 2024

Conversation

mewim
Copy link
Collaborator

@mewim mewim commented Apr 12, 2024

No description provided.


~ConnectionQueryAsyncWorker() override = default;

inline void Execute() override {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compiler will inline automatically if the implementation write in header. So no need to mark inline, same for other functions in this file.

py::gil_scoped_release release;
auto queryResult = conn->query(statement);
py::gil_scoped_acquire acquire;
if (!queryResult->isSuccess()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would refactor l60-l65 with l72-l77 into a static function in this cpp file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you wanna do the same on NodeJS side. I'll let u decide.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored it for Python. In Node.js I think I'll just keep the two workers as different classes for simplicity instead of creating a common base class.

@mewim mewim merged commit 35bc707 into master Apr 12, 2024
17 checks passed
@mewim mewim deleted the napi-param-binding branch April 12, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skip prepare for Node.js and Python API if the query parameters is empty or null
2 participants