feat: support SHOW TRANSACTION variables and transaction_isolation alias#822
feat: support SHOW TRANSACTION variables and transaction_isolation alias#822olavloite wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for parsing and executing SHOW TRANSACTION statements (such as ISOLATION LEVEL, READ ONLY, and DEFERRABLE) in the Spanner driver, along with corresponding tests. The review feedback suggests several improvements: ensuring case-insensitive matching for connection variables, removing support for the invalid SHOW TRANSACTION READ WRITE command (which incorrectly maps to transaction_read_only), updating syntax error messages to accurately list supported options, and adjusting the test suite accordingly.
0109a96 to
9dfec4a
Compare
|
LGTM. This implements standard PG compatibility for |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for PostgreSQL-specific transaction-related SHOW statements (such as SHOW TRANSACTION ISOLATION LEVEL) and property aliases (like transaction_isolation) in the connection state. Feedback on the changes includes addressing a resource leak in TestStatementExecutor_ShowTransaction caused by deferred Close calls on a reassigned rows variable, handling an ignored error when setting the default isolation level, and correcting test logic in parser/statements_test.go that incorrectly overrides wantErr for an invalid PostgreSQL statement.
0faae9f to
50ca434
Compare
Support SHOW TRANSACTION ISOLATION LEVEL, SHOW TRANSACTION READ ONLY, and SHOW TRANSACTION DEFERRABLE syntax (standard in some PostgreSQL clients) and map transaction_isolation to the isolation_level property in the connection.
Fixes #604