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

Fix "BEGIN TRANSACTION" being serialized as "START TRANSACTION" #935

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

lovasoa
Copy link
Contributor

@lovasoa lovasoa commented Jul 25, 2023

"START TRANSACTION" is not valid in SQLite, which means that valid
SQLite SQL code, when parsed and re-serialized by sqlparser, would become invalid.

Fixes #919

"START TRANSACTION" is not valid in SQLite, which means that valid
SQLite SQL code, when parsed and re-serialized by sqlparser, would become invalid.

Fixes apache#919
@coveralls
Copy link

coveralls commented Jul 25, 2023

Pull Request Test Coverage Report for Build 5679959118

  • 8 of 10 (80.0%) changed or added relevant lines in 3 files are covered.
  • 523 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 87.051%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 5 7 71.43%
Files with Coverage Reduction New Missed Lines %
tests/sqlparser_common.rs 17 97.19%
src/ast/data_type.rs 29 80.52%
src/parser.rs 477 82.98%
Totals Coverage Status
Change from base Build 5621232803: -0.1%
Covered Lines: 15516
Relevant Lines: 17824

💛 - Coveralls

@lovasoa
Copy link
Contributor Author

lovasoa commented Jul 26, 2023

@alamb , is that okay for you? I need this for SQLPage.

@parkma99
Copy link
Contributor

parkma99 commented Jul 27, 2023

LGTM! Thanks @lovasoa

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.

Looks good to me @lovasoa -- thank you.

I had one request re documentation and a naming suggestion but otherwise this looks great

src/ast/mod.rs Outdated Show resolved Hide resolved
@lovasoa
Copy link
Contributor Author

lovasoa commented Jul 27, 2023

thanks @alamb . I implemented your suggestions.

@alamb
Copy link
Contributor

alamb commented Jul 27, 2023

Thanks @lovasoa

@alamb alamb merged commit 10a6ec5 into apache:main Jul 27, 2023
9 checks passed
@lovasoa lovasoa deleted the fix-919-start-transaction branch July 27, 2023 11:48
serprex pushed a commit to serprex/sqlparser-rs that referenced this pull request Nov 6, 2023
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.

"BEGIN TRANSACTION" gets stringified as "START TRANSACTION"
4 participants