use of com.palantir.atlasdb.keyvalue.dbkvs.impl.FullQuery in project atlasdb by palantir.
the class RangePredicateHelperTest method endRowExclusiveReverse.
@Test
public void endRowExclusiveReverse() {
FullQuery.Builder builder = FullQuery.builder();
RangePredicateHelper.create(true, DBType.ORACLE, builder).endRowExclusive(ROW_NAME);
FullQuery query = builder.build();
assertThat(query.getQuery(), equalTo(" AND row_name > ? "));
assertThat(query.getArgs(), arrayContaining((Object) ROW_NAME));
}
use of com.palantir.atlasdb.keyvalue.dbkvs.impl.FullQuery in project atlasdb by palantir.
the class RangePredicateHelperTest method startCellTsInclusiveForwardPostgres.
@Test
public void startCellTsInclusiveForwardPostgres() {
FullQuery.Builder builder = FullQuery.builder();
RangePredicateHelper.create(false, DBType.POSTGRESQL, builder).startCellTsInclusive(ROW_NAME, COL_NAME, TS);
FullQuery query = builder.build();
assertThat(query.getQuery(), equalTo(" AND (row_name, col_name, ts) >= (?, ?, ?)"));
assertThat(query.getArgs(), arrayContaining(ROW_NAME, COL_NAME, TS));
}
use of com.palantir.atlasdb.keyvalue.dbkvs.impl.FullQuery in project atlasdb by palantir.
the class RangePredicateHelperTest method startCellTsInclusiveReversePostgres.
@Test
public void startCellTsInclusiveReversePostgres() {
FullQuery.Builder builder = FullQuery.builder();
RangePredicateHelper.create(true, DBType.POSTGRESQL, builder).startCellTsInclusive(ROW_NAME, COL_NAME, TS);
FullQuery query = builder.build();
assertThat(query.getQuery(), equalTo(" AND (row_name, col_name, ts) <= (?, ?, ?)"));
assertThat(query.getArgs(), arrayContaining(ROW_NAME, COL_NAME, TS));
}
use of com.palantir.atlasdb.keyvalue.dbkvs.impl.FullQuery in project atlasdb by palantir.
the class RangePredicateHelperTest method columnSelectionEmpty.
@Test
public void columnSelectionEmpty() {
FullQuery.Builder builder = FullQuery.builder();
RangePredicateHelper.create(false, DBType.ORACLE, builder).columnSelection(ImmutableList.of());
FullQuery query = builder.build();
assertThat(query.getQuery(), isEmptyString());
assertThat(query.getArgs(), emptyArray());
}
use of com.palantir.atlasdb.keyvalue.dbkvs.impl.FullQuery in project atlasdb by palantir.
the class RangePredicateHelperTest method startRowInclusiveForward.
@Test
public void startRowInclusiveForward() {
FullQuery.Builder builder = FullQuery.builder();
RangePredicateHelper.create(false, DBType.ORACLE, builder).startRowInclusive(ROW_NAME);
FullQuery query = builder.build();
assertThat(query.getQuery(), equalTo(" AND row_name >= ? "));
assertThat(query.getArgs(), arrayContaining((Object) ROW_NAME));
}
Aggregations