diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java index 3ce4dff89aaa3..b4d015c323e6f 100644 --- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java +++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/EncryptTokenGenerateBuilder.java @@ -53,7 +53,7 @@ @RequiredArgsConstructor public final class EncryptTokenGenerateBuilder implements SQLTokenGeneratorBuilder { - private final EncryptRule encryptRule; + private final EncryptRule rule; private final SQLStatementContext sqlStatementContext; @@ -64,23 +64,23 @@ public final class EncryptTokenGenerateBuilder implements SQLTokenGeneratorBuild @Override public Collection getSQLTokenGenerators() { Collection result = new LinkedList<>(); - addSQLTokenGenerator(result, new EncryptSelectProjectionTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertSelectProjectionTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertAssignmentTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptUpdateAssignmentTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptPredicateColumnTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertPredicateColumnTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptPredicateRightValueTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertPredicateRightValueTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertValuesTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertDefaultColumnsTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertCipherNameTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertDerivedColumnsTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptInsertOnUpdateTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptGroupByItemTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptIndexColumnTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptCreateTableTokenGenerator(encryptRule)); - addSQLTokenGenerator(result, new EncryptAlterTableTokenGenerator(encryptRule)); + addSQLTokenGenerator(result, new EncryptSelectProjectionTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertSelectProjectionTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertAssignmentTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptUpdateAssignmentTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptPredicateColumnTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertPredicateColumnTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptPredicateRightValueTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertPredicateRightValueTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertValuesTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertDefaultColumnsTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertCipherNameTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertDerivedColumnsTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptInsertOnUpdateTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptGroupByItemTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptIndexColumnTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptCreateTableTokenGenerator(rule)); + addSQLTokenGenerator(result, new EncryptAlterTableTokenGenerator(rule)); return result; } diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/ShardingTokenGenerateBuilder.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/ShardingTokenGenerateBuilder.java index 3879acd006490..5776c4a6cbc02 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/ShardingTokenGenerateBuilder.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/ShardingTokenGenerateBuilder.java @@ -52,7 +52,7 @@ @RequiredArgsConstructor public final class ShardingTokenGenerateBuilder implements SQLTokenGeneratorBuilder { - private final ShardingRule shardingRule; + private final ShardingRule rule; private final RouteContext routeContext; @@ -61,13 +61,13 @@ public final class ShardingTokenGenerateBuilder implements SQLTokenGeneratorBuil @Override public Collection getSQLTokenGenerators() { Collection result = new LinkedList<>(); - addSQLTokenGenerator(result, new ShardingTableTokenGenerator(shardingRule)); + addSQLTokenGenerator(result, new ShardingTableTokenGenerator(rule)); addSQLTokenGenerator(result, new ShardingDistinctProjectionPrefixTokenGenerator()); addSQLTokenGenerator(result, new ShardingProjectionsTokenGenerator()); addSQLTokenGenerator(result, new ShardingOrderByTokenGenerator()); addSQLTokenGenerator(result, new ShardingAggregationDistinctTokenGenerator()); - addSQLTokenGenerator(result, new ShardingIndexTokenGenerator(shardingRule)); - addSQLTokenGenerator(result, new ShardingConstraintTokenGenerator(shardingRule)); + addSQLTokenGenerator(result, new ShardingIndexTokenGenerator(rule)); + addSQLTokenGenerator(result, new ShardingConstraintTokenGenerator(rule)); addSQLTokenGenerator(result, new ShardingOffsetTokenGenerator()); addSQLTokenGenerator(result, new ShardingRowCountTokenGenerator()); addSQLTokenGenerator(result, new GeneratedKeyInsertColumnTokenGenerator()); @@ -76,7 +76,7 @@ public Collection getSQLTokenGenerators() { addSQLTokenGenerator(result, new ShardingInsertValuesTokenGenerator()); addSQLTokenGenerator(result, new GeneratedKeyInsertValuesTokenGenerator()); addSQLTokenGenerator(result, new ShardingRemoveTokenGenerator()); - addSQLTokenGenerator(result, new ShardingCursorTokenGenerator(shardingRule)); + addSQLTokenGenerator(result, new ShardingCursorTokenGenerator(rule)); addSQLTokenGenerator(result, new ShardingFetchDirectionTokenGenerator()); return result; }