@Test public void testEqualBoundaries() { IntPartition partition = new IntPartition(COL_RAW, 0L, 0L); String constraint = partition.toSqlConstraint(QUOTE, dbProduct); assertEquals(COL + " = 0", constraint); }
@Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } return generateRangeConstraint( quoteString + column + quoteString, Stream.of(boundaries).map(b -> b == null ? null : b.toString()).toArray(String[]::new) ); }
IntPartition extends BasePartition implements JdbcFragmentMetadata { @Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } return generateRangeConstraint( quoteString + column + quoteString, Stream.of(boundaries).map(b -> b == null ? null : b.toString()).toArray(String[]::new) ); } }
IntPartition extends BasePartition implements JdbcFragmentMetadata { @Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } return generateRangeConstraint( quoteString + column + quoteString, Stream.of(boundaries).map(b -> b == null ? null : b.toString()).toArray(String[]::new) ); } IntPartition(String column, Long start, Long end); }
IntPartition extends BasePartition implements JdbcFragmentMetadata { @Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } return generateRangeConstraint( quoteString + column + quoteString, Stream.of(boundaries).map(b -> b == null ? null : b.toString()).toArray(String[]::new) ); } IntPartition(String column, Long start, Long end); @Override String toSqlConstraint(String quoteString, DbProduct dbProduct); Long[] getBoundaries(); }
IntPartition extends BasePartition implements JdbcFragmentMetadata { @Override public String toSqlConstraint(String quoteString, DbProduct dbProduct) { if (quoteString == null) { throw new RuntimeException("Quote string cannot be null"); } return generateRangeConstraint( quoteString + column + quoteString, Stream.of(boundaries).map(b -> b == null ? null : b.toString()).toArray(String[]::new) ); } IntPartition(String column, Long start, Long end); @Override String toSqlConstraint(String quoteString, DbProduct dbProduct); Long[] getBoundaries();  }