test_class.declarator: shardingStrategy
test_class.modifier: private
test_class.original_string: private StandardShardingStrategy shardingStrategy;
test_class.type: StandardShardingStrategy
test_class.var_name: shardingStrategy
test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithmTest.java
test_class.identifier: AutoIntervalShardingAlgorithmTest
test_case.body: @Test
      public void assertRangeDoShardingWithoutLowerBound() {
          List<String> availableTargetNames = Arrays.asList("t_order_0", "t_order_1", "t_order_2", "t_order_3");
          Range<String> rangeValue = Range.lessThan("2020-01-01 00:00:11");
          List<RouteValue> shardingValues = Collections.singletonList(new RangeRouteValue<>("create_time", "t_order", rangeValue));
          Collection<String> actual = shardingStrategy.doSharding(availableTargetNames, shardingValues, new ConfigurationProperties(new Properties()));
          assertThat(actual.size(), is(4));
          assertTrue(actual.contains("t_order_0"));
          assertTrue(actual.contains("t_order_1"));
          assertTrue(actual.contains("t_order_2"));
          assertTrue(actual.contains("t_order_3"));
      }
test_case.class_method_signature: AutoIntervalShardingAlgorithmTest.assertRangeDoShardingWithoutLowerBound()
test_case.full_signature: @Test public void assertRangeDoShardingWithoutLowerBound()
test_case.identifier: assertRangeDoShardingWithoutLowerBound
test_case.invocations: asList lessThan singletonList doSharding assertThat size is assertTrue contains assertTrue contains assertTrue contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertRangeDoShardingWithoutLowerBound()
focal_class.declarator: DATE_TIME_LOWER_KEY = "datetime-lower"
focal_class.modifier: private static final
focal_class.original_string: private static final String DATE_TIME_LOWER_KEY = "datetime-lower";
focal_class.type: String
focal_class.var_name: DATE_TIME_LOWER_KEY
focal_class.declarator: DATE_TIME_UPPER_KEY = "datetime-upper"
focal_class.modifier: private static final
focal_class.original_string: private static final String DATE_TIME_UPPER_KEY = "datetime-upper";
focal_class.type: String
focal_class.var_name: DATE_TIME_UPPER_KEY
focal_class.declarator: SHARDING_SECONDS_KEY = "sharding-seconds"
focal_class.modifier: private static final
focal_class.original_string: private static final String SHARDING_SECONDS_KEY = "sharding-seconds";
focal_class.type: String
focal_class.var_name: SHARDING_SECONDS_KEY
focal_class.declarator: DATE_TIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
focal_class.modifier: private static final
focal_class.original_string: private static final DateTimeFormatter DATE_TIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
focal_class.type: DateTimeFormatter
focal_class.var_name: DATE_TIME_FORMAT
focal_class.declarator: props = new Properties()
focal_class.modifier: @Setter
      private
focal_class.original_string: @Setter
      private Properties props = new Properties();
focal_class.type: Properties
focal_class.var_name: props
focal_class.declarator: dateTimeLower
focal_class.modifier: private
focal_class.original_string: private LocalDateTime dateTimeLower;
focal_class.type: LocalDateTime
focal_class.var_name: dateTimeLower
focal_class.declarator: shardingSeconds
focal_class.modifier: private
focal_class.original_string: private long shardingSeconds;
focal_class.type: long
focal_class.var_name: shardingSeconds
focal_class.declarator: autoTablesAmount
focal_class.modifier: private
focal_class.original_string: private int autoTablesAmount;
focal_class.type: int
focal_class.var_name: autoTablesAmount
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-common/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java
focal_class.identifier: AutoIntervalShardingAlgorithm
focal_class.interfaces: implements StandardShardingAlgorithm<Comparable<?>>, ShardingAutoTableAlgorithm
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.init()
focal_class.full_signature: @Override public void init()
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.getDateTime(final String dateTimeKey)
focal_class.full_signature: private LocalDateTime getDateTime(final String dateTimeKey)
focal_class.identifier: getDateTime
focal_class.modifiers: private
focal_class.parameters: (final String dateTimeKey)
focal_class.return: LocalDateTime
focal_class.signature: LocalDateTime getDateTime(final String dateTimeKey)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.getShardingSeconds()
focal_class.full_signature: private long getShardingSeconds()
focal_class.identifier: getShardingSeconds
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getShardingSeconds()
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_class.full_signature: @Override public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_class.identifier: doSharding
focal_class.modifiers: @Override public
focal_class.parameters: (final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_class.return: String
focal_class.signature: String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Comparable<?>> shardingValue)
focal_class.full_signature: @Override public Collection<String> doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Comparable<?>> shardingValue)
focal_class.identifier: doSharding
focal_class.modifiers: @Override public
focal_class.parameters: (final Collection<String> availableTargetNames, final RangeShardingValue<Comparable<?>> shardingValue)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Comparable<?>> shardingValue)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.doSharding(final long shardingValue)
focal_class.full_signature: private int doSharding(final long shardingValue)
focal_class.identifier: doSharding
focal_class.modifiers: private
focal_class.parameters: (final long shardingValue)
focal_class.return: int
focal_class.signature: int doSharding(final long shardingValue)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.getFirstPartition(final Range<Comparable<?>> valueRange)
focal_class.full_signature: private int getFirstPartition(final Range<Comparable<?>> valueRange)
focal_class.identifier: getFirstPartition
focal_class.modifiers: private
focal_class.parameters: (final Range<Comparable<?>> valueRange)
focal_class.return: int
focal_class.signature: int getFirstPartition(final Range<Comparable<?>> valueRange)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.getLastPartition(final Range<Comparable<?>> valueRange)
focal_class.full_signature: private int getLastPartition(final Range<Comparable<?>> valueRange)
focal_class.identifier: getLastPartition
focal_class.modifiers: private
focal_class.parameters: (final Range<Comparable<?>> valueRange)
focal_class.return: int
focal_class.signature: int getLastPartition(final Range<Comparable<?>> valueRange)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.parseDate(final Comparable<?> shardingValue)
focal_class.full_signature: private long parseDate(final Comparable<?> shardingValue)
focal_class.identifier: parseDate
focal_class.modifiers: private
focal_class.parameters: (final Comparable<?> shardingValue)
focal_class.return: long
focal_class.signature: long parseDate(final Comparable<?> shardingValue)
focal_class.class_method_signature: AutoIntervalShardingAlgorithm.getType()
focal_class.full_signature: @Override public String getType()
focal_class.identifier: getType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getType()
focal_method.body: @Override
      public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue) {
          for (String each : availableTargetNames) {
              if (each.endsWith(String.valueOf(doSharding(parseDate(shardingValue.getValue()))))) {
                  return each;
              }
          }
          return null;
      }
focal_method.class_method_signature: AutoIntervalShardingAlgorithm.doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_method.full_signature: @Override public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_method.identifier: doSharding
focal_method.invocations: endsWith valueOf doSharding parseDate getValue
focal_method.modifiers: @Override public
focal_method.parameters: (final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)
focal_method.return: String
focal_method.signature: String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Comparable<?>> shardingValue)