Quote the readable.id in Unread::Reader::Scopes#108
Merged
Conversation
Contributor
Author
|
@ledermann is there anything else I need to change in this PR (e.g. changelog, tests)? We'd love to have the fix merged / released upstream instead of forking the gem for this (small) bug. Would appreciate some feedback. 🙏 |
Owner
|
Sorry for the late answer. Before merging your changes I want to have the tests passing. I would like to ask you to rebase the PR against master, because I just made some Travis related fixes. |
Fixes an SQL syntax error when the readable.id is a UUID.
5d594d1 to
8fde098
Compare
Contributor
Author
|
Great thanks, the tests are passing now! Let me know if there is anything else. |
Owner
|
Merged, thanks for contribution! |
HwakyoungLee
pushed a commit
to grepp/unread
that referenced
this pull request
May 12, 2023
* Quote the readable.id in Unread::Reader::Scopes Fixes an SQL syntax error when the readable.id is a UUID. * Add parantheses around quote_bound_value argument in Unread::Reader::Scopes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the generated SQL when the
readable.idis aUUID.For example when running:
the generated SQL is:
and it fails with the following error:
Quoting the
readable.idfixes the problem. Related to #60.