Loading sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/impl/dml/WhereExtractor.java +1 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,7 @@ public final class WhereExtractor implements OptionalSQLSegmentExtractor { @Override public Optional<WhereSegment> extract(final ParserRuleContext ancestorNode, final Map<ParserRuleContext, Integer> parameterMarkerIndexes) { WhereSegment result = new WhereSegment(); result.setParameterCount(parameterMarkerIndexes.size()); WhereSegment result = new WhereSegment(parameterMarkerIndexes.size()); Optional<ParserRuleContext> whereNode = ExtractorUtils.findFirstChildNodeNoneRecursive(ancestorNode, RuleName.WHERE_CLAUSE); if (whereNode.isPresent()) { setPropertiesForRevert(result, whereNode.get(), parameterMarkerIndexes); Loading sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/encrypt/dml/EncryptWhereFiller.java +1 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package org.apache.shardingsphere.core.parse.antlr.filler.encrypt.dml; import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData; import org.apache.shardingsphere.core.parse.antlr.filler.api.EncryptRuleAwareFiller; Loading @@ -33,9 +32,8 @@ import org.apache.shardingsphere.core.rule.EncryptRule; * * @author duhongjun */ @Getter @Setter public class EncryptWhereFiller implements SQLSegmentFiller<WhereSegment>, EncryptRuleAwareFiller, ShardingTableMetaDataAwareFiller { public final class EncryptWhereFiller implements SQLSegmentFiller<WhereSegment>, EncryptRuleAwareFiller, ShardingTableMetaDataAwareFiller { private EncryptRule encryptRule; Loading sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/sharding/dml/WhereFiller.java→sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/sharding/dml/ShardingWhereFiller.java +2 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml; import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData; import org.apache.shardingsphere.core.parse.antlr.filler.api.SQLSegmentFiller; Loading @@ -29,13 +28,12 @@ import org.apache.shardingsphere.core.parse.antlr.sql.statement.dml.DeleteStatem import org.apache.shardingsphere.core.rule.ShardingRule; /** * Where filler. * Where filler for sharding. * * @author duhongjun */ @Getter @Setter public class WhereFiller implements SQLSegmentFiller<WhereSegment>, ShardingRuleAwareFiller, ShardingTableMetaDataAwareFiller { public final class ShardingWhereFiller implements SQLSegmentFiller<WhereSegment>, ShardingRuleAwareFiller, ShardingTableMetaDataAwareFiller { private ShardingRule shardingRule; Loading sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/segment/dml/WhereSegment.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package org.apache.shardingsphere.core.parse.antlr.sql.segment.dml; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.shardingsphere.core.parse.antlr.sql.segment.SQLSegment; import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.OrPredicateSegment; Loading @@ -27,13 +28,14 @@ import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.OrPr * * @author duhongjun */ @RequiredArgsConstructor @Getter @Setter public final class WhereSegment implements SQLSegment { private final OrPredicateSegment orPredicate = new OrPredicateSegment(); private int parameterCount; private final int parameterCount; private int whereStartIndex; Loading sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/resources/META-INF/parsing-rule-definition/sharding/common/filler-rule-definition.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,6 @@ <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.InsertValuesSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.insert.InsertValuesFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.assignment.SetAssignmentsSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.ShardingSetAssignmentsFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.column.OnDuplicateKeyColumnsSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.insert.OnDuplicateKeyColumnsFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.WhereSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.WhereFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.WhereSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.ShardingWhereFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.SubqueryPredicateSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.select.SubqueryConditionFiller" /> </filler-rule-definition> Loading
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/impl/dml/WhereExtractor.java +1 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,7 @@ public final class WhereExtractor implements OptionalSQLSegmentExtractor { @Override public Optional<WhereSegment> extract(final ParserRuleContext ancestorNode, final Map<ParserRuleContext, Integer> parameterMarkerIndexes) { WhereSegment result = new WhereSegment(); result.setParameterCount(parameterMarkerIndexes.size()); WhereSegment result = new WhereSegment(parameterMarkerIndexes.size()); Optional<ParserRuleContext> whereNode = ExtractorUtils.findFirstChildNodeNoneRecursive(ancestorNode, RuleName.WHERE_CLAUSE); if (whereNode.isPresent()) { setPropertiesForRevert(result, whereNode.get(), parameterMarkerIndexes); Loading
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/encrypt/dml/EncryptWhereFiller.java +1 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package org.apache.shardingsphere.core.parse.antlr.filler.encrypt.dml; import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData; import org.apache.shardingsphere.core.parse.antlr.filler.api.EncryptRuleAwareFiller; Loading @@ -33,9 +32,8 @@ import org.apache.shardingsphere.core.rule.EncryptRule; * * @author duhongjun */ @Getter @Setter public class EncryptWhereFiller implements SQLSegmentFiller<WhereSegment>, EncryptRuleAwareFiller, ShardingTableMetaDataAwareFiller { public final class EncryptWhereFiller implements SQLSegmentFiller<WhereSegment>, EncryptRuleAwareFiller, ShardingTableMetaDataAwareFiller { private EncryptRule encryptRule; Loading
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/sharding/dml/WhereFiller.java→sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/filler/sharding/dml/ShardingWhereFiller.java +2 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml; import lombok.Getter; import lombok.Setter; import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData; import org.apache.shardingsphere.core.parse.antlr.filler.api.SQLSegmentFiller; Loading @@ -29,13 +28,12 @@ import org.apache.shardingsphere.core.parse.antlr.sql.statement.dml.DeleteStatem import org.apache.shardingsphere.core.rule.ShardingRule; /** * Where filler. * Where filler for sharding. * * @author duhongjun */ @Getter @Setter public class WhereFiller implements SQLSegmentFiller<WhereSegment>, ShardingRuleAwareFiller, ShardingTableMetaDataAwareFiller { public final class ShardingWhereFiller implements SQLSegmentFiller<WhereSegment>, ShardingRuleAwareFiller, ShardingTableMetaDataAwareFiller { private ShardingRule shardingRule; Loading
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/segment/dml/WhereSegment.java +3 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package org.apache.shardingsphere.core.parse.antlr.sql.segment.dml; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import org.apache.shardingsphere.core.parse.antlr.sql.segment.SQLSegment; import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.OrPredicateSegment; Loading @@ -27,13 +28,14 @@ import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.OrPr * * @author duhongjun */ @RequiredArgsConstructor @Getter @Setter public final class WhereSegment implements SQLSegment { private final OrPredicateSegment orPredicate = new OrPredicateSegment(); private int parameterCount; private final int parameterCount; private int whereStartIndex; Loading
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/resources/META-INF/parsing-rule-definition/sharding/common/filler-rule-definition.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,6 @@ <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.InsertValuesSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.insert.InsertValuesFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.assignment.SetAssignmentsSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.ShardingSetAssignmentsFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.column.OnDuplicateKeyColumnsSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.insert.OnDuplicateKeyColumnsFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.WhereSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.WhereFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.WhereSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.ShardingWhereFiller" /> <filler-rule sql-segment-class="org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.predicate.SubqueryPredicateSegment" filler-class="org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.select.SubqueryConditionFiller" /> </filler-rule-definition>