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

delete: add using clause, possibility of using aliases #541

Merged
merged 1 commit into from Jul 18, 2022

Conversation

mobuchowski
Copy link
Contributor

PostgreSQL and MySQL have possibility of using aliases in DELETE statements.

PostgreSQL and Snowflake have USING clause.

Signed-off-by: Maciej Obuchowski obuchowski.maciej@gmail.com

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2671290535

  • 52 of 53 (98.11%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 89.93%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_common.rs 44 45 97.78%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_common.rs 1 97.16%
Totals Coverage Status
Change from base Build 2631347546: 0.04%
Covered Lines: 8922
Relevant Lines: 9921

💛 - Coveralls

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.

Thank you @mobuchowski -- looking good. I think this PR just needs one more test


assert_eq!(None, using);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please add a positive test for using as well (aka a query that has a USING clause)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alamb I added it few lines below already: https://github.com/sqlparser-rs/sqlparser-rs/pull/541/files#diff-ae2dab2c924f4018c1daf0743b8fd912c44c5b63ae7144dd8b951bb3bd254349R305

Unless you mean something else? Like, more complex TableFactor?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No this is fine -- I just wanted to add some coverage so that we didn't accidentally break the functionality in the future but have all the tests pass


assert_eq!(None, using);
Copy link
Collaborator

Choose a reason for hiding this comment

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

No this is fine -- I just wanted to add some coverage so that we didn't accidentally break the functionality in the future but have all the tests pass

@alamb
Copy link
Collaborator

alamb commented Jul 18, 2022

Thanks again @mobuchowski

@alamb alamb merged commit 4706d8b into sqlparser-rs:main Jul 18, 2022
mobuchowski added a commit to mobuchowski/sqlparser-rs that referenced this pull request Aug 3, 2022
)

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
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.

None yet

3 participants