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

Suppor postgres TRUNCATE syntax #1406

Merged
merged 5 commits into from
Sep 5, 2024
Merged

Suppor postgres TRUNCATE syntax #1406

merged 5 commits into from
Sep 5, 2024

Conversation

tobyhede
Copy link
Contributor

Correctly parses the following pg options:

ONLY
RESTART IDENTITY | CONTINUE IDENTITY 
CASCADE | RESTRICT 

And supports providing a list of table names

TRUNCATE table_a, table_b, table_c

@coveralls
Copy link

coveralls commented Aug 29, 2024

Pull Request Test Coverage Report for Build 10674424966

Details

  • 75 of 83 (90.36%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 89.254%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser/mod.rs 19 20 95.0%
src/ast/mod.rs 16 19 84.21%
tests/sqlparser_postgres.rs 40 44 90.91%
Files with Coverage Reduction New Missed Lines %
src/ast/mod.rs 1 81.46%
Totals Coverage Status
Change from base Build 10653671802: 0.003%
Covered Lines: 28804
Relevant Lines: 32272

💛 - Coveralls

@tobyhede tobyhede marked this pull request as ready for review August 30, 2024 00:38
src/ast/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
@alamb alamb changed the title Add support for postgres TRUNCATE syntax Suppor postgres TRUNCATE syntax Sep 3, 2024
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 @tobyhede -- looks good to me.

I'll plan to leave this open for a few days to give @iffyio and others a chance to review as well if they want

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM!

@alamb alamb merged commit 1bed87a into apache:main Sep 5, 2024
10 checks passed
@alamb
Copy link
Contributor

alamb commented Sep 5, 2024

Thanks again @tobyhede @iffyio

ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Nov 19, 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