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

Leverage sqlparser-rs for query parsing. #48

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

EvanHStanton
Copy link
Contributor

cargo add sqlparser to introduce improved check and error response for validity of query input.

Example using invalid query "test":

pg_later=# select pglater.exec('select * from pg_available_extensions order by name limit 2') as job_id;
 
job_id
--------
      1
(1 row)

pg_later=# select pglater.exec('test') as job_id;
ERROR:  Query parsing failed, please submit a valid query: ParserError("Expected an SQL statement, found: test at Line: 1, Column 1")

@EvanHStanton EvanHStanton marked this pull request as ready for review February 10, 2024 07:18
@ChuckHend
Copy link
Member

Add a test either in same file or in the integration tests then this is gtg!

@ChuckHend
Copy link
Member

closes #46

@ChuckHend ChuckHend merged commit aeb0d05 into tembo-io:main Feb 12, 2024
5 checks passed
@EvanHStanton EvanHStanton deleted the update-query-parser branch February 12, 2024 13:52
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.

2 participants