use of com.questdb.model.TestEntity in project questdb by bluestreak01.
the class SortTest method testDefaultSort.
@Test
public void testDefaultSort() throws JournalException {
long last = 0;
for (TestEntity p : q.all().asResultSet().sort("anInt").sort().bufferedIterator()) {
Assert.assertTrue("Journal records are out of order", last <= p.getTimestamp());
last = p.getTimestamp();
}
}
use of com.questdb.model.TestEntity in project questdb by bluestreak01.
the class SortTest method testSortDoubleDesc.
@Test
public void testSortDoubleDesc() throws JournalException {
double last = Double.MAX_VALUE;
for (TestEntity p : q.all().asResultSet().sort(ResultSet.Order.DESC, "aDouble").bufferedIterator()) {
Assert.assertTrue("Journal records are out of order", last >= p.getADouble());
last = p.getADouble();
}
}
Aggregations