use of com.scalar.db.io.DataType in project scalardb by scalar-labs.
the class DistributedStorageSecondaryIndexIntegrationTestBase method scan_WithMinSecondaryIndexValue_ShouldReturnProperResult.
@Test
public void scan_WithMinSecondaryIndexValue_ShouldReturnProperResult() throws ExecutionException, IOException {
for (DataType secondaryIndexType : secondaryIndexTypes) {
truncateTable(secondaryIndexType);
// Arrange
Value<?> secondaryIndexValue = getMinValue(INDEX_COL_NAME, secondaryIndexType);
prepareRecords(secondaryIndexType, secondaryIndexValue);
Scan scan = new Scan(new Key(secondaryIndexValue)).forNamespace(namespace).forTable(getTableName(secondaryIndexType));
// Act
List<Result> results = scanAll(scan);
// Assert
assertResults(results, secondaryIndexValue);
}
}
use of com.scalar.db.io.DataType in project scalardb by scalar-labs.
the class DistributedStorageSecondaryIndexIntegrationTestBase method createTables.
private void createTables() throws ExecutionException {
Map<String, String> options = getCreateOptions();
admin.createNamespace(namespace, true, options);
for (DataType secondaryIndexType : secondaryIndexTypes) {
createTable(secondaryIndexType, options);
}
}
use of com.scalar.db.io.DataType in project scalardb by scalar-labs.
the class DistributedStorageSingleClusteringKeyScanIntegrationTestBase method scan_WithClusteringKeyStartRange_ShouldReturnProperResult.
@Test
public void scan_WithClusteringKeyStartRange_ShouldReturnProperResult() throws ExecutionException, IOException {
for (DataType clusteringKeyType : clusteringKeyTypes) {
for (Order clusteringOrder : Order.values()) {
truncateTable(clusteringKeyType, clusteringOrder);
List<Value<?>> clusteringKeyValues = prepareRecords(clusteringKeyType, clusteringOrder);
for (boolean startInclusive : Arrays.asList(true, false)) {
for (OrderingType orderingType : OrderingType.values()) {
for (boolean withLimit : Arrays.asList(false, true)) {
scan_WithClusteringKeyStartRange_ShouldReturnProperResult(clusteringKeyValues, clusteringKeyType, clusteringOrder, startInclusive, orderingType, withLimit);
}
}
}
}
}
}
use of com.scalar.db.io.DataType in project scalardb by scalar-labs.
the class DistributedStorageSingleClusteringKeyScanIntegrationTestBase method scan_WithClusteringKeyEndRangeWithMaxValue_ShouldReturnProperResult.
@Test
public void scan_WithClusteringKeyEndRangeWithMaxValue_ShouldReturnProperResult() throws ExecutionException, IOException {
for (DataType clusteringKeyType : clusteringKeyTypes) {
for (Order clusteringOrder : Order.values()) {
truncateTable(clusteringKeyType, clusteringOrder);
List<Value<?>> clusteringKeyValues = prepareRecords(clusteringKeyType, clusteringOrder);
for (boolean endInclusive : Arrays.asList(true, false)) {
for (OrderingType orderingType : OrderingType.values()) {
for (boolean withLimit : Arrays.asList(false, true)) {
scan_WithClusteringKeyEndRangeWithMaxValue_ShouldReturnProperResult(clusteringKeyValues, clusteringKeyType, clusteringOrder, endInclusive, orderingType, withLimit);
}
}
}
}
}
}
use of com.scalar.db.io.DataType in project scalardb by scalar-labs.
the class DistributedStorageSingleClusteringKeyScanIntegrationTestBase method scan_WithClusteringKeyEndRange_ShouldReturnProperResult.
@Test
public void scan_WithClusteringKeyEndRange_ShouldReturnProperResult() throws ExecutionException, IOException {
for (DataType clusteringKeyType : clusteringKeyTypes) {
for (Order clusteringOrder : Order.values()) {
truncateTable(clusteringKeyType, clusteringOrder);
List<Value<?>> clusteringKeyValues = prepareRecords(clusteringKeyType, clusteringOrder);
for (boolean endInclusive : Arrays.asList(true, false)) {
for (OrderingType orderingType : OrderingType.values()) {
for (boolean withLimit : Arrays.asList(false, true)) {
scan_WithClusteringKeyEndRange_ShouldReturnProperResult(clusteringKeyValues, clusteringKeyType, clusteringOrder, endInclusive, orderingType, withLimit);
}
}
}
}
}
}
Aggregations