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

Query parser: encode ?? as ? #154

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Query parser: encode ?? as ? #154

merged 1 commit into from
Sep 24, 2024

Conversation

serprex
Copy link
Member

@serprex serprex commented Sep 18, 2024

fixes #60

@serprex
Copy link
Member Author

serprex commented Sep 18, 2024

@cvincent-reciprocity would this address your problem?

@serprex
Copy link
Member Author

serprex commented Sep 18, 2024

An opt out constructor as discussed in linked issue could be made which takes the input string & puts it into vec![Part::Str(input)]

@cvincent-reciprocity
Copy link

@cvincent-reciprocity would this address your problem?

Yes!

src/sql/mod.rs Outdated Show resolved Hide resolved
@serprex serprex force-pushed the query-qq branch 2 times, most recently from 00044a2 to adadfe2 Compare September 18, 2024 16:11
src/sql/mod.rs Outdated Show resolved Hide resolved
src/sql/mod.rs Show resolved Hide resolved
This was referenced Sep 18, 2024
src/lib.rs Outdated Show resolved Hide resolved
src/sql/mod.rs Outdated Show resolved Hide resolved
src/sql/mod.rs Outdated Show resolved Hide resolved
@serprex serprex force-pushed the query-qq branch 9 times, most recently from 65c1d7b to ff84801 Compare September 21, 2024 19:53
src/sql/mod.rs Show resolved Hide resolved
src/sql/mod.rs Show resolved Hide resolved
@slvrtrn
Copy link
Contributor

slvrtrn commented Sep 23, 2024

@loyd @serprex, please take a look: #157
This might be another improvement regarding the ? parameters and potentially unintended usage.

@serprex
Copy link
Member Author

serprex commented Sep 23, 2024

@slvrtrn it's an idea, but should be added orthogonally to this, tho it'll be confusing if someone uses ?? to escape, but then doesn't bind anything. Would expect it to appear as ? in final query even after both this & #157 are merged

Copy link
Collaborator

@loyd loyd left a comment

Choose a reason for hiding this comment

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

LGTM

@loyd
Copy link
Collaborator

loyd commented Sep 24, 2024

@serprex, can you rebase (easy to squash firstly) the PR?

@serprex serprex merged commit e5c55b0 into main Sep 24, 2024
1 of 5 checks passed
serprex added a commit that referenced this pull request Sep 24, 2024
messed up merging #154 a tad too early, CI UI was acting up
@serprex serprex mentioned this pull request Sep 24, 2024
serprex added a commit that referenced this pull request Sep 24, 2024
messed up merging #154 a tad too early, CI UI was acting up
@mshustov mshustov deleted the query-qq branch September 25, 2024 10:20
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.

Variable binding fails if ? appears within a string in query sql.
5 participants