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

Separate query rendering from statement creation in QueryBuilder #6688

Merged
merged 4 commits into from
Jan 22, 2021

Conversation

findepi
Copy link
Member

@findepi findepi commented Jan 22, 2021

for #6620
extracted from #6667
to be used for #6287

`QueryBuilder.buildSql` had two responsibilities:

- prepare query text for execution
- initiate `PreparedStatement` object

They are now refactored into separate methods.  For this, `BoundValue`
is replaced with `QueryParameter`.  The new class is serializable.
This keeps the query text shorter (perhaps faster to parse on the remote
side) and more readable for debugging purposes.
@findepi findepi requested review from losipiuk and kokosing January 22, 2021 10:46
@cla-bot cla-bot bot added the cla-signed label Jan 22, 2021
Copy link
Member

@kokosing kokosing left a comment

Choose a reason for hiding this comment

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

overall looks good, but I only skimmed (please do not wait on me if somebody else give you a decent review)

@findepi findepi merged commit 2171a20 into trinodb:master Jan 22, 2021
@findepi findepi deleted the findepi/prepare-query branch January 22, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants