Search in sources :

Example 16 with QueryKey

use of com.nearinfinity.honeycomb.mysql.QueryKey in project honeycomb by altamiracorp.

the class ScanOperationsIT method testIndexLastScan.

@Test
public void testIndexLastScan() {
    ITUtils.insertData(proxy, 1, INDEX_COL_VALUE, TestConstants.FULL_UUID);
    ITUtils.insertData(proxy, 1, INDEX_COL_VALUE - 1, TestConstants.ZERO_UUID);
    ITUtils.insertData(proxy, ROW_COUNT, INDEX_COL_VALUE - 1);
    final QueryKey key = new QueryKey(TestConstants.INDEX1, QueryType.INDEX_LAST, Maps.<String, ByteBuffer>newHashMap());
    ITUtils.assertReceivingDifferentRows(proxy, key, ROW_COUNT + 2);
}
Also used : QueryKey(com.nearinfinity.honeycomb.mysql.QueryKey) HoneycombIntegrationTest(integrationtests.HoneycombIntegrationTest) Test(org.junit.Test)

Example 17 with QueryKey

use of com.nearinfinity.honeycomb.mysql.QueryKey in project honeycomb by altamiracorp.

the class ScanOperationsIT method testKeyOrNextScan.

@Test
public void testKeyOrNextScan() {
    ITUtils.insertData(proxy, 1, INDEX_COL_VALUE, TestConstants.FULL_UUID);
    ITUtils.insertData(proxy, 1, INDEX_COL_VALUE + 1, TestConstants.ZERO_UUID);
    ITUtils.insertData(proxy, ROW_COUNT, INDEX_COL_VALUE + 1);
    final QueryKey key = ITUtils.createKey(INDEX_COL_VALUE, QueryType.KEY_OR_NEXT);
    ITUtils.assertReceivingDifferentRows(proxy, key, ROW_COUNT + 2);
}
Also used : QueryKey(com.nearinfinity.honeycomb.mysql.QueryKey) HoneycombIntegrationTest(integrationtests.HoneycombIntegrationTest) Test(org.junit.Test)

Aggregations

QueryKey (com.nearinfinity.honeycomb.mysql.QueryKey)17 Test (org.junit.Test)16 HoneycombIntegrationTest (integrationtests.HoneycombIntegrationTest)14 Row (com.nearinfinity.honeycomb.mysql.Row)6 ByteBuffer (java.nio.ByteBuffer)6 IndexSchema (com.nearinfinity.honeycomb.mysql.schema.IndexSchema)3