Skip to content

Commit

Permalink
Refactor ShardingRule
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 23, 2023
1 parent 9daecd6 commit 9c66e4c
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,15 @@ public Map<String, String> getLogicAndActualTablesFromBindingTable(final String
.orElseGet(Collections::emptyMap);
}

/**
* Is sharding cache enabled.
*
* @return is sharding cache enabled
*/
public boolean isShardingCacheEnabled() {
return null != shardingCache;
}

@Override
public Map<String, Collection<DataNode>> getAllDataNodes() {
return shardingTableDataNodes;
Expand Down Expand Up @@ -784,13 +793,4 @@ private boolean isJoinConditionExpression(final ExpressionSegment expression) {
BinaryOperationExpression binaryExpression = (BinaryOperationExpression) expression;
return binaryExpression.getLeft() instanceof ColumnSegment && binaryExpression.getRight() instanceof ColumnSegment && "=".equals(binaryExpression.getOperator());
}

/**
* Is sharding cache enabled.
*
* @return is sharding cache enabled
*/
public boolean isShardingCacheEnabled() {
return null != shardingCache;
}
}

0 comments on commit 9c66e4c

Please sign in to comment.