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

[feature] Refactor SQL statement parsing #226

Open
mirromutth opened this issue Feb 8, 2024 · 0 comments
Open

[feature] Refactor SQL statement parsing #226

mirromutth opened this issue Feb 8, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@mirromutth
Copy link
Contributor

Is your feature request related to a problem? Please describe.

For now, query is parsed by Query.parse. It can locate parameter indexes, map parameter names, and reformat prepared statements.

But it has no ability to know what the statement should be, for example:

  • Can a RETURNING clause be appended to the statement?
  • Does the statement contain RETURNING clause?
  • Is the statement a INSERT .. VALUES .., and can it be rewritten as a bulk insert?

So the parser should be improved to support basically syntax analysis.

This will help implement #136 and provide the ability to add RETURNING clause checks

Describe the solution you'd like

Add basically syntax analysis for Query parser.

Additional context

See also #201 issuecomment-1894821758

@mirromutth mirromutth added the enhancement New feature or request label Feb 8, 2024
@mirromutth mirromutth added this to the 1.2.0 milestone Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant