Skip to content

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
Contributor

@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

table_name,
);

assert_eq!(None, using);
Copy link
Contributor

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
Contributor

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

table_name,
);

assert_eq!(None, using);
Copy link
Contributor

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
Contributor

alamb commented Jul 18, 2022

Thanks again @mobuchowski

@alamb alamb merged commit 4706d8b into apache: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.

3 participants