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

feat: add DECLARE parsing for mssql #1235

Merged
merged 6 commits into from
May 1, 2024

Conversation

devanbenz
Copy link
Contributor

@devanbenz devanbenz commented Apr 25, 2024

  • Adds AST parsing support for DECLARE keyword [MsSql]
  • Adds test for multiple variable declaration including a CURSOR and assignment declared scalar variable.

@devanbenz devanbenz marked this pull request as ready for review April 30, 2024 03:17
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.

Thanks @devanbenz -- this PR looks good to me other than the CI failure

https://github.com/sqlparser-rs/sqlparser-rs/actions/runs/8888752261/job/24428288785?pr=1235

It looks like a few simple clippy lints to fix

Also thank you @lovasoa for the review

@coveralls
Copy link

coveralls commented Apr 30, 2024

Pull Request Test Coverage Report for Build 8903948369

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 81 of 86 (94.19%) changed or added relevant lines in 2 files are covered.
  • 1488 unchanged lines in 8 files lost coverage.
  • Overall coverage decreased (-0.004%) to 89.192%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_mssql.rs 44 45 97.78%
src/parser/mod.rs 37 41 90.24%
Files with Coverage Reduction New Missed Lines %
src/dialect/bigquery.rs 1 75.0%
src/dialect/generic.rs 1 72.0%
src/dialect/mod.rs 16 79.56%
src/ast/query.rs 69 83.9%
tests/sqlparser_bigquery.rs 104 89.45%
src/ast/mod.rs 398 80.41%
src/parser/mod.rs 439 92.82%
tests/sqlparser_common.rs 460 89.57%
Totals Coverage Status
Change from base Build 8896880185: -0.004%
Covered Lines: 24213
Relevant Lines: 27147

💛 - Coveralls

@devanbenz devanbenz requested a review from alamb May 1, 2024 00:00
@devanbenz
Copy link
Contributor Author

devanbenz commented May 1, 2024

Thanks @devanbenz -- this PR looks good to me other than the CI failure

sqlparser-rs/sqlparser-rs/actions/runs/8888752261/job/24428288785?pr=1235

It looks like a few simple clippy lints to fix

Also thank you @lovasoa for the review

Should be good now clippy is not showing any more linting problems. EDIT: disregard, I only ran cargo clippy and it passed but it looks like I need to add other flags 😆

@devanbenz
Copy link
Contributor Author

@alamb okay cool, sorry about that. Should be good to go now ran all the ci checks locally with cargo.

@alamb
Copy link
Contributor

alamb commented May 1, 2024

@alamb okay cool, sorry about that. Should be good to go now ran all the ci checks locally with cargo.

No worries -- thanks @devanbenz for the contribution!

@alamb alamb enabled auto-merge (squash) May 1, 2024 10:47
@alamb alamb merged commit 5b83c73 into apache:main May 1, 2024
10 checks passed
@devanbenz devanbenz deleted the feat/add-mssql-declare branch May 1, 2024 14:10
JichaoS pushed a commit to luabase/sqlparser-rs that referenced this pull request May 7, 2024
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.

4 participants