filter bad records in db
This commit is contained in:
parent
fa8197f7f9
commit
6a0fe87351
1 changed files with 2 additions and 2 deletions
|
@ -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