filter bad records in db
This commit is contained in:
parent
a5393eff84
commit
67b3b2613d
|
@ -1417,7 +1417,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
QueryBuilder<CareportalEvent, Long> queryBuilder = getDaoCareportalEvents().queryBuilder();
|
QueryBuilder<CareportalEvent, Long> queryBuilder = getDaoCareportalEvents().queryBuilder();
|
||||||
queryBuilder.orderBy("date", false);
|
queryBuilder.orderBy("date", false);
|
||||||
Where where = queryBuilder.where();
|
Where where = queryBuilder.where();
|
||||||
where.eq("eventType", event);
|
where.eq("eventType", event).and().isNotNull("json");
|
||||||
queryBuilder.limit(1L);
|
queryBuilder.limit(1L);
|
||||||
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
|
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
|
||||||
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
|
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
|
||||||
|
@ -1437,7 +1437,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
QueryBuilder<CareportalEvent, Long> queryBuilder = getDaoCareportalEvents().queryBuilder();
|
QueryBuilder<CareportalEvent, Long> queryBuilder = getDaoCareportalEvents().queryBuilder();
|
||||||
queryBuilder.orderBy("date", ascending);
|
queryBuilder.orderBy("date", ascending);
|
||||||
Where where = queryBuilder.where();
|
Where where = queryBuilder.where();
|
||||||
where.ge("date", mills);
|
where.ge("date", mills).and().isNotNull("json");
|
||||||
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
|
PreparedQuery<CareportalEvent> preparedQuery = queryBuilder.prepare();
|
||||||
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
|
careportalEvents = getDaoCareportalEvents().query(preparedQuery);
|
||||||
preprocessOpenAPSOfflineEvents(careportalEvents);
|
preprocessOpenAPSOfflineEvents(careportalEvents);
|
||||||
|
|
Loading…
Reference in a new issue