test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
test_class.identifier: ShardingStandardRoutingEngineTest
test_class.superclass: extends AbstractRoutingEngineTest
test_case.body: @Test
      public void assertRouteByShardingConditions() {
          ShardingStandardRoutingEngine standardRoutingEngine = createShardingStandardRoutingEngine("t_order", createShardingConditions("t_order"));
          RouteContext routeContext = new RouteContext();
          standardRoutingEngine.route(routeContext, createBasedShardingRule());
          List<RouteUnit> routeUnits = new ArrayList<>(routeContext.getRouteUnits());
          assertThat(routeContext.getRouteUnits().size(), is(1));
          assertThat(routeUnits.get(0).getDataSourceMapper().getActualName(), is("ds_1"));
          assertThat(routeUnits.get(0).getTableMappers().size(), is(1));
          assertThat(routeUnits.get(0).getTableMappers().iterator().next().getActualName(), is("t_order_1"));
          assertThat(routeUnits.get(0).getTableMappers().iterator().next().getLogicName(), is("t_order"));
      }
test_case.class_method_signature: ShardingStandardRoutingEngineTest.assertRouteByShardingConditions()
test_case.full_signature: @Test public void assertRouteByShardingConditions()
test_case.identifier: assertRouteByShardingConditions
test_case.invocations: createShardingStandardRoutingEngine createShardingConditions route createBasedShardingRule getRouteUnits assertThat size getRouteUnits is assertThat getActualName getDataSourceMapper get is assertThat size getTableMappers get is assertThat getActualName next iterator getTableMappers get is assertThat getLogicName next iterator getTableMappers get is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertRouteByShardingConditions()
focal_class.declarator: logicTableName
focal_class.modifier: private final
focal_class.original_string: private final String logicTableName;
focal_class.type: String
focal_class.var_name: logicTableName
focal_class.declarator: shardingConditions
focal_class.modifier: private final
focal_class.original_string: private final ShardingConditions shardingConditions;
focal_class.type: ShardingConditions
focal_class.var_name: shardingConditions
focal_class.declarator: properties
focal_class.modifier: private final
focal_class.original_string: private final ConfigurationProperties properties;
focal_class.type: ConfigurationProperties
focal_class.var_name: properties
focal_class.declarator: originalDataNodes = new LinkedList<>()
focal_class.modifier: private final
focal_class.original_string: private final Collection<Collection<DataNode>> originalDataNodes = new LinkedList<>();
focal_class.type: Collection<Collection<DataNode>>
focal_class.var_name: originalDataNodes
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-route/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
focal_class.identifier: ShardingStandardRoutingEngine
focal_class.interfaces: implements ShardingRouteEngine
focal_class.class_method_signature: ShardingStandardRoutingEngine.route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.full_signature: @Override public void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.identifier: route
focal_class.modifiers: @Override public
focal_class.parameters: (final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.return: void
focal_class.signature: void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.getDataNodes(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> getDataNodes(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: getDataNodes
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> getDataNodes(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.isRoutingByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private boolean isRoutingByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: isRoutingByHint
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: boolean
focal_class.signature: boolean isRoutingByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByHint
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.isRoutingByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private boolean isRoutingByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: isRoutingByShardingConditions
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: boolean
focal_class.signature: boolean isRoutingByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByShardingConditions
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByShardingConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByShardingConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByShardingConditionsWithCondition
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByShardingConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByMixedConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByMixedConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByMixedConditions
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByMixedConditions(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByMixedConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByMixedConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByMixedConditionsWithCondition
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByMixedConditionsWithCondition(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeByMixedConditionsWithHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.full_signature: private Collection<DataNode> routeByMixedConditionsWithHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.identifier: routeByMixedConditionsWithHint
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeByMixedConditionsWithHint(final ShardingRule shardingRule, final TableRule tableRule)
focal_class.class_method_signature: ShardingStandardRoutingEngine.getDatabaseShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.full_signature: private List<RouteValue> getDatabaseShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.identifier: getDatabaseShardingValues
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getDatabaseShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.class_method_signature: ShardingStandardRoutingEngine.getTableShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.full_signature: private List<RouteValue> getTableShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.identifier: getTableShardingValues
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getTableShardingValues(final ShardingRule shardingRule, final TableRule tableRule, final ShardingCondition shardingCondition)
focal_class.class_method_signature: ShardingStandardRoutingEngine.isGettingShardingValuesFromHint(final ShardingStrategy shardingStrategy)
focal_class.full_signature: private boolean isGettingShardingValuesFromHint(final ShardingStrategy shardingStrategy)
focal_class.identifier: isGettingShardingValuesFromHint
focal_class.modifiers: private
focal_class.parameters: (final ShardingStrategy shardingStrategy)
focal_class.return: boolean
focal_class.signature: boolean isGettingShardingValuesFromHint(final ShardingStrategy shardingStrategy)
focal_class.class_method_signature: ShardingStandardRoutingEngine.getDatabaseShardingValuesFromHint()
focal_class.full_signature: private List<RouteValue> getDatabaseShardingValuesFromHint()
focal_class.identifier: getDatabaseShardingValuesFromHint
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getDatabaseShardingValuesFromHint()
focal_class.class_method_signature: ShardingStandardRoutingEngine.getTableShardingValuesFromHint()
focal_class.full_signature: private List<RouteValue> getTableShardingValuesFromHint()
focal_class.identifier: getTableShardingValuesFromHint
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getTableShardingValuesFromHint()
focal_class.class_method_signature: ShardingStandardRoutingEngine.getRouteValues(final Collection<Comparable<?>> shardingValue)
focal_class.full_signature: private List<RouteValue> getRouteValues(final Collection<Comparable<?>> shardingValue)
focal_class.identifier: getRouteValues
focal_class.modifiers: private
focal_class.parameters: (final Collection<Comparable<?>> shardingValue)
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getRouteValues(final Collection<Comparable<?>> shardingValue)
focal_class.class_method_signature: ShardingStandardRoutingEngine.getShardingValuesFromShardingConditions(final ShardingRule shardingRule, final Collection<String> shardingColumns, final ShardingCondition shardingCondition)
focal_class.full_signature: private List<RouteValue> getShardingValuesFromShardingConditions(final ShardingRule shardingRule, final Collection<String> shardingColumns, final ShardingCondition shardingCondition)
focal_class.identifier: getShardingValuesFromShardingConditions
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final Collection<String> shardingColumns, final ShardingCondition shardingCondition)
focal_class.return: List<RouteValue>
focal_class.signature: List<RouteValue> getShardingValuesFromShardingConditions(final ShardingRule shardingRule, final Collection<String> shardingColumns, final ShardingCondition shardingCondition)
focal_class.class_method_signature: ShardingStandardRoutingEngine.route0(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues, final List<RouteValue> tableShardingValues)
focal_class.full_signature: private Collection<DataNode> route0(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues, final List<RouteValue> tableShardingValues)
focal_class.identifier: route0
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues, final List<RouteValue> tableShardingValues)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> route0(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues, final List<RouteValue> tableShardingValues)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeDataSources(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues)
focal_class.full_signature: private Collection<String> routeDataSources(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues)
focal_class.identifier: routeDataSources
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> routeDataSources(final ShardingRule shardingRule, final TableRule tableRule, final List<RouteValue> databaseShardingValues)
focal_class.class_method_signature: ShardingStandardRoutingEngine.routeTables(final ShardingRule shardingRule, final TableRule tableRule, final String routedDataSource, final List<RouteValue> tableShardingValues)
focal_class.full_signature: private Collection<DataNode> routeTables(final ShardingRule shardingRule, final TableRule tableRule, final String routedDataSource, final List<RouteValue> tableShardingValues)
focal_class.identifier: routeTables
focal_class.modifiers: private
focal_class.parameters: (final ShardingRule shardingRule, final TableRule tableRule, final String routedDataSource, final List<RouteValue> tableShardingValues)
focal_class.return: Collection<DataNode>
focal_class.signature: Collection<DataNode> routeTables(final ShardingRule shardingRule, final TableRule tableRule, final String routedDataSource, final List<RouteValue> tableShardingValues)
focal_method.body: @Override
      public void route(final RouteContext routeContext, final ShardingRule shardingRule) {
          Collection<DataNode> dataNodes = getDataNodes(shardingRule, shardingRule.getTableRule(logicTableName));
          routeContext.getOriginalDataNodes().addAll(originalDataNodes);
          for (DataNode each : dataNodes) {
              routeContext.getRouteUnits().add(
                      new RouteUnit(new RouteMapper(each.getDataSourceName(), each.getDataSourceName()), Collections.singletonList(new RouteMapper(logicTableName, each.getTableName()))));
          }
      }
focal_method.class_method_signature: ShardingStandardRoutingEngine.route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.full_signature: @Override public void route(final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.identifier: route
focal_method.invocations: getDataNodes getTableRule addAll getOriginalDataNodes add getRouteUnits getDataSourceName getDataSourceName singletonList getTableName
focal_method.modifiers: @Override public
focal_method.parameters: (final RouteContext routeContext, final ShardingRule shardingRule)
focal_method.return: void
focal_method.signature: void route(final RouteContext routeContext, final ShardingRule shardingRule)