Update realm version 3.6.5 -> 10.16.0

This commit is contained in:
Sofiya Tepikin
2022-04-23 22:16:32 +02:00
parent 342f9798b2
commit f0e6cae055
3 changed files with 14761 additions and 412 deletions
+7 -1
View File
@@ -58,6 +58,10 @@ export function closeDb() {
db.close()
}
function mapRealmObjToJsObj(realmObj) {
return JSON.parse(JSON.stringify(realmObj))
}
export function getBleedingDaysSortedByDate() {
return db
.objects('CycleDay')
@@ -70,8 +74,10 @@ export function getTemperatureDaysSortedByDate() {
.filtered('temperature != null')
.sorted('date', true)
}
export function getCycleDaysSortedByDate() {
return db.objects('CycleDay').sorted('date', true)
const cycleDays = db.objects('CycleDay').sorted('date', true)
return mapRealmObjToJsObj(cycleDays)
}
export function getCycleStartsSortedByDate() {