use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.
the class SchemaApiTestV2Impl method putSingleRowFirstColumn.
@Override
protected void putSingleRowFirstColumn(Transaction transaction, String rowKey, long value) {
SchemaApiTestV2Table table = tableFactory.getSchemaApiTestV2Table(transaction);
table.putColumn1(rowKey, value);
}
use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.
the class SchemaApiTestV2Impl method getRangeSecondColumnOnlyFirstTwoResults.
@Override
protected Map<String, StringValue> getRangeSecondColumnOnlyFirstTwoResults(Transaction transaction, String startRowKey, String endRowKey) {
SchemaApiTestV2Table table = tableFactory.getSchemaApiTestV2Table(transaction);
RangeRequest rangeRequest = RangeRequest.builder().startRowInclusive(SchemaApiTestTable.SchemaApiTestRow.of(startRowKey).persistToBytes()).endRowExclusive(SchemaApiTestTable.SchemaApiTestRow.of(endRowKey).persistToBytes()).build();
return table.getSmallRowRangeColumn2(rangeRequest, 2);
}
use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.
the class SchemaApiTestV2Impl method getSingleRowFirstColumn.
@Override
protected Long getSingleRowFirstColumn(Transaction transaction, String rowKey) {
SchemaApiTestV2Table table = tableFactory.getSchemaApiTestV2Table(transaction);
Optional<Long> result = table.getColumn1(rowKey);
return result.get();
}
use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.
the class SchemaApiTestV2Impl method testUpdateEntryIfEntryExists.
@Test
public void testUpdateEntryIfEntryExists() {
AbstractTransaction transaction = mock(AbstractTransaction.class);
SchemaApiTestV2Table table = spy(tableFactory.getSchemaApiTestV2Table(transaction));
doReturn(Optional.of(TEST_VALUE_LONG)).when(table).getColumn1(TEST_ROW_KEY);
table.updateColumn1(TEST_ROW_KEY, entry -> entry + 1);
verify(table, times(1)).putColumn1(TEST_ROW_KEY, TEST_VALUE_LONG + 1);
}
use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.
the class SchemaApiTestV2Impl method deleteFirstColumn.
@Override
protected void deleteFirstColumn(Transaction transaction, String rowKey) {
SchemaApiTestV2Table table = tableFactory.getSchemaApiTestV2Table(transaction);
table.deleteColumn1(rowKey);
}
Aggregations