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

Support full range of sqlite prepared statement placeholders #604

Merged
merged 1 commit into from Sep 27, 2022

Conversation

lovasoa
Copy link
Contributor

@lovasoa lovasoa commented Sep 5, 2022

sqlparser can now parse all the prepared statement placeholders supported by SQLite:

  • ?
  • ?NNN
  • @VVV
  • :VVV
  • $VVV

See: https://www.sqlite.org/lang_expr.html#varparam

This does not break existing support for postgresql's '@' operator

Fixes #603

sqlparser can now parse all the prepared statement placeholders supported by SQLite:

 - ?
 - ?NNN
 - @vvv
 - :VVV
 - $VVV

See: https://www.sqlite.org/lang_expr.html#varparam

This does not break existing support for postgresql's '@' operator

Fixes sqlparser-rs#603
Copy link
Collaborator

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @lovasoa -- this looks great

tests/sqlparser_sqlite.rs Show resolved Hide resolved
@alamb alamb changed the title Fix parse error on some prepared statement placeholders Support full range of sqlite prepared statement placeholders Sep 27, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2995723040

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 252 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 85.572%

Files with Coverage Reduction New Missed Lines %
src/tokenizer.rs 16 89.3%
tests/sqlparser_common.rs 79 96.97%
src/parser.rs 157 83.22%
Totals Coverage Status
Change from base Build 2957846519: 0.02%
Covered Lines: 9721
Relevant Lines: 11360

💛 - Coveralls

@alamb alamb merged commit 604f755 into sqlparser-rs:main Sep 27, 2022
@lovasoa lovasoa deleted the better_placeholders branch September 27, 2022 14:24
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.

Placeholders can contain underscores
3 participants