Skip to content

Separate query rendering from statement creation in QueryBuilder#6688

Merged
findepi merged 4 commits intotrinodb:masterfrom
findepi:findepi/prepare-query
Jan 22, 2021
Merged

Separate query rendering from statement creation in QueryBuilder#6688
findepi merged 4 commits intotrinodb:masterfrom
findepi:findepi/prepare-query

Conversation

@findepi
Copy link
Copy Markdown
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 kokosing and losipiuk January 22, 2021 10:46
@cla-bot cla-bot bot added the cla-signed label Jan 22, 2021
Copy link
Copy Markdown
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