fix loading last value
This commit is contained in:
parent
408e2641dc
commit
8fb5c5a984
|
@ -16,7 +16,7 @@ internal interface GlucoseValueDao : TraceableDao<GlucoseValue> {
|
|||
@Query("DELETE FROM $TABLE_GLUCOSE_VALUES")
|
||||
override fun deleteAllEntries()
|
||||
|
||||
@Query("SELECT * FROM $TABLE_GLUCOSE_VALUES WHERE isValid = 1 AND referenceId IS NULL ORDER BY id DESC limit 1")
|
||||
@Query("SELECT * FROM $TABLE_GLUCOSE_VALUES WHERE isValid = 1 AND referenceId IS NULL ORDER BY timestamp DESC limit 1")
|
||||
fun getLast(): Maybe<GlucoseValue>
|
||||
|
||||
@Query("SELECT id FROM $TABLE_GLUCOSE_VALUES ORDER BY id DESC limit 1")
|
||||
|
|
Loading…
Reference in a new issue