Skip to content

support for session transaction and transaction snapshot. #379

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

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

poonai
Copy link
Contributor

@poonai poonai commented Dec 12, 2021

added support for snapshot and session-wide transactions as per
https://www.postgresql.org/docs/9.3/sql-set-transaction.html

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 @poonai -- look like a nice addition

@@ -3586,7 +3586,7 @@ fn parse_set_transaction() {
// TRANSACTION, so no need to duplicate the tests here. We just do a quick
// sanity check.
match verified_stmt("SET TRANSACTION READ ONLY, READ WRITE, ISOLATION LEVEL SERIALIZABLE") {
Statement::SetTransaction { modes } => assert_eq!(
Statement::SetTransaction { modes, .. } => assert_eq!(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be valuable to validate the contents of session and mode here

@coveralls
Copy link

coveralls commented Dec 13, 2021

Pull Request Test Coverage Report for Build 1579647958

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

  • 42 of 47 (89.36%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 90.035%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 8 10 80.0%
src/parser.rs 11 14 78.57%
Totals Coverage Status
Change from base Build 1567002374: -0.01%
Covered Lines: 6442
Relevant Lines: 7155

💛 - Coveralls

@alamb
Copy link
Contributor

alamb commented Dec 13, 2021

@poonai looks like this PR needs to have rust fmt run against it to get the CI green

@poonai
Copy link
Contributor Author

poonai commented Dec 14, 2021

@alamb done and thanks for the project. :)

@alamb
Copy link
Contributor

alamb commented Dec 14, 2021

@alamb done and thanks for the project. :)

🙇 thank you -- I am but a caretaker of the giants that came before me (@andygrove and @nickolay, @Dandandan and @benesch largely)

@alamb
Copy link
Contributor

alamb commented Dec 14, 2021

I pushed ce23ba0 to get the CI to run cleanly

@alamb alamb merged commit 4c121a9 into apache:main Dec 14, 2021
@alamb
Copy link
Contributor

alamb commented Dec 14, 2021

Thanks again @poonai

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