You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/06/06 22:28:37 UTC
(shardingsphere) branch master updated: Refactor PostgreSQLTCLStatementVisitor (#35616)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0aa1e982ad4 Refactor PostgreSQLTCLStatementVisitor (#35616)
0aa1e982ad4 is described below
commit 0aa1e982ad442316acada13ffc8302ccdd36c997
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Jun 7 06:28:31 2025 +0800
Refactor PostgreSQLTCLStatementVisitor (#35616)
---
.../visitor/statement/type/PostgreSQLTCLStatementVisitor.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/parser/sql/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/type/PostgreSQLTCLStatementVisitor.java b/parser/sql/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/type/PostgreSQLTCLStatementVisitor.java
index 9fd0d189c0f..7136961f5ca 100644
--- a/parser/sql/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/type/PostgreSQLTCLStatementVisitor.java
+++ b/parser/sql/dialect/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/postgresql/visitor/statement/type/PostgreSQLTCLStatementVisitor.java
@@ -158,6 +158,11 @@ public final class PostgreSQLTCLStatementVisitor extends PostgreSQLStatementVisi
return new SetConstraintsStatement();
}
+ @Override
+ public ASTNode visitPrepareTransaction(final PrepareTransactionContext ctx) {
+ return new XAPrepareStatement(ctx.gid().getText());
+ }
+
@Override
public ASTNode visitCommitPrepared(final CommitPreparedContext ctx) {
return new XACommitStatement(ctx.gid().getText());
@@ -177,11 +182,6 @@ public final class PostgreSQLTCLStatementVisitor extends PostgreSQLStatementVisi
return relationExprContexts.stream().map(each -> (SimpleTableSegment) visit(each.qualifiedName())).collect(Collectors.toList());
}
- @Override
- public ASTNode visitPrepareTransaction(final PrepareTransactionContext ctx) {
- return new XAPrepareStatement(ctx.gid().getText());
- }
-
@Override
public ASTNode visitCheckpoint(final CheckpointContext ctx) {
return new CheckpointStatement();