Correct db query

This commit is contained in:
AdrianLxM 2016-12-07 01:22:47 +01:00
parent a466be9805
commit fa4cf31cf4

View file

@ -196,8 +196,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
QueryBuilder<BgReading, Long> queryBuilder = daoBgreadings.queryBuilder();
queryBuilder.orderBy("timeIndex", true);
Where where = queryBuilder.where();
where.ge("timeIndex", mills);
queryBuilder.where().gt("value", 38);
where.ge("timeIndex", mills).and().gt("value", 38);
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
bgReadings = daoBgreadings.query(preparedQuery);
return bgReadings;