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

Extract query execution-related code from client #4175

Merged
merged 7 commits into from
Dec 27, 2020
Merged

Conversation

kibertoad
Copy link
Collaborator

refs #4174


const { __knexUid, __knexTxId } = connection;

client.emit('query', Object.assign({ __knexUid, __knexTxId }, queryObject));
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'm not too happy about event emitting and debug logic sneakily being in a method called enrichQueryObject, but it is shared across both cases where we use this method.
If someone feels strongly that it's worth to extract those four lines into a separate reused method and has a good name in mind, I'm open to moving them.

@kibertoad kibertoad merged commit 6a862e9 into master Dec 27, 2020
@kibertoad kibertoad deleted the fix/refactor-runner branch December 27, 2020 13:23
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.

2 participants