kotlin 1.9.10
This commit is contained in:
parent
c7888e948a
commit
1204200bf6
|
@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.8.22'
|
kotlin_version = '1.9.10'
|
||||||
core_version = '1.10.1'
|
core_version = '1.10.1'
|
||||||
rxjava_version = '3.1.7'
|
rxjava_version = '3.1.7'
|
||||||
rxandroid_version = '3.0.2'
|
rxandroid_version = '3.0.2'
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package info.nightscout.database.entities.embedments
|
package info.nightscout.database.entities.embedments
|
||||||
|
|
||||||
data class InterfaceIDs(
|
import androidx.room.Ignore
|
||||||
|
|
||||||
|
data class InterfaceIDs @Ignore constructor(
|
||||||
var nightscoutSystemId: String? = null,
|
var nightscoutSystemId: String? = null,
|
||||||
var nightscoutId: String? = null,
|
var nightscoutId: String? = null,
|
||||||
var pumpType: PumpType? = null, // if == USER pumpSerial & pumpId can be null
|
var pumpType: PumpType? = null, // if == USER pumpSerial & pumpId can be null
|
||||||
|
@ -11,6 +13,9 @@ data class InterfaceIDs(
|
||||||
var endId: Long? = null
|
var endId: Long? = null
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
// Along with @Ignore main constructor eliminate kotlin 1.9 + room warning
|
||||||
|
constructor() : this(nightscoutSystemId = null, nightscoutId = null, pumpType = null, pumpSerial = null, temporaryId = null, pumpId = null, startId = null, endId = null)
|
||||||
|
|
||||||
enum class PumpType {
|
enum class PumpType {
|
||||||
GENERIC_AAPS,
|
GENERIC_AAPS,
|
||||||
CELLNOVO,
|
CELLNOVO,
|
||||||
|
|
|
@ -22,5 +22,5 @@ internal interface APSResultDao : TraceableDao<APSResult> {
|
||||||
override fun deleteTrackedChanges(): Int
|
override fun deleteTrackedChanges(): Int
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_APS_RESULTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_APS_RESULTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<APSResult>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<APSResult>
|
||||||
}
|
}
|
|
@ -22,5 +22,5 @@ internal interface APSResultLinkDao : TraceableDao<APSResultLink> {
|
||||||
override fun deleteTrackedChanges(): Int
|
override fun deleteTrackedChanges(): Int
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_APS_RESULT_LINKS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_APS_RESULT_LINKS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<APSResultLink>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<APSResultLink>
|
||||||
}
|
}
|
|
@ -50,5 +50,5 @@ internal interface BolusCalculatorResultDao : TraceableDao<BolusCalculatorResult
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<BolusCalculatorResult>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<BolusCalculatorResult>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_BOLUS_CALCULATOR_RESULTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_BOLUS_CALCULATOR_RESULTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<BolusCalculatorResult>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<BolusCalculatorResult>
|
||||||
}
|
}
|
|
@ -71,5 +71,5 @@ internal interface BolusDao : TraceableDao<Bolus> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<Bolus>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<Bolus>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_BOLUSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_BOLUSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<Bolus>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<Bolus>
|
||||||
}
|
}
|
|
@ -67,5 +67,5 @@ internal interface CarbsDao : TraceableDao<Carbs> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<Carbs>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<Carbs>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_CARBS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_CARBS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<Carbs>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<Carbs>
|
||||||
}
|
}
|
|
@ -61,6 +61,6 @@ internal interface EffectiveProfileSwitchDao : TraceableDao<EffectiveProfileSwit
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<EffectiveProfileSwitch>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<EffectiveProfileSwitch>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<EffectiveProfileSwitch>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<EffectiveProfileSwitch>
|
||||||
|
|
||||||
}
|
}
|
|
@ -68,6 +68,6 @@ internal interface ExtendedBolusDao : TraceableDao<ExtendedBolus> {
|
||||||
fun getOldestRecord(): ExtendedBolus?
|
fun getOldestRecord(): ExtendedBolus?
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_EXTENDED_BOLUSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_EXTENDED_BOLUSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<ExtendedBolus>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<ExtendedBolus>
|
||||||
|
|
||||||
}
|
}
|
|
@ -55,5 +55,5 @@ internal interface GlucoseValueDao : TraceableDao<GlucoseValue> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<GlucoseValue>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<GlucoseValue>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_GLUCOSE_VALUES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_GLUCOSE_VALUES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<GlucoseValue>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<GlucoseValue>
|
||||||
}
|
}
|
|
@ -21,5 +21,5 @@ internal interface MultiwaveBolusLinkDao : TraceableDao<MultiwaveBolusLink> {
|
||||||
override fun deleteTrackedChanges(): Int
|
override fun deleteTrackedChanges(): Int
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_MULTIWAVE_BOLUS_LINKS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_MULTIWAVE_BOLUS_LINKS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<MultiwaveBolusLink>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<MultiwaveBolusLink>
|
||||||
}
|
}
|
|
@ -46,5 +46,5 @@ internal interface OfflineEventDao : TraceableDao<OfflineEvent> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<OfflineEvent>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<OfflineEvent>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_OFFLINE_EVENTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_OFFLINE_EVENTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<OfflineEvent>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<OfflineEvent>
|
||||||
}
|
}
|
|
@ -16,6 +16,6 @@ interface PreferenceChangeDao {
|
||||||
fun deleteOlderThan(than: Long): Int
|
fun deleteOlderThan(than: Long): Int
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_PREFERENCE_CHANGES WHERE timestamp > :since AND timestamp <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_PREFERENCE_CHANGES WHERE timestamp > :since AND timestamp <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<PreferenceChange>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<PreferenceChange>
|
||||||
|
|
||||||
}
|
}
|
|
@ -59,7 +59,7 @@ internal interface ProfileSwitchDao : info.nightscout.database.impl.daos.workaro
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<ProfileSwitch>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<ProfileSwitch>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_PROFILE_SWITCHES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_PROFILE_SWITCHES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<ProfileSwitch>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<ProfileSwitch>
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ProfileSwitchDao.insertNewEntryImpl(entry: ProfileSwitch): Long {
|
internal fun ProfileSwitchDao.insertNewEntryImpl(entry: ProfileSwitch): Long {
|
||||||
|
|
|
@ -80,5 +80,5 @@ internal interface TemporaryBasalDao : TraceableDao<TemporaryBasal> {
|
||||||
fun getOldestRecord(): TemporaryBasal?
|
fun getOldestRecord(): TemporaryBasal?
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_TEMPORARY_BASALS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_TEMPORARY_BASALS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TemporaryBasal>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TemporaryBasal>
|
||||||
}
|
}
|
|
@ -49,5 +49,5 @@ internal interface TemporaryTargetDao : TraceableDao<TemporaryTarget> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<TemporaryTarget>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<TemporaryTarget>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_TEMPORARY_TARGETS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_TEMPORARY_TARGETS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TemporaryTarget>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TemporaryTarget>
|
||||||
}
|
}
|
|
@ -61,5 +61,5 @@ internal interface TherapyEventDao : TraceableDao<TherapyEvent> {
|
||||||
fun getCurrentFromHistoric(referenceId: Long): Maybe<TherapyEvent>
|
fun getCurrentFromHistoric(referenceId: Long): Maybe<TherapyEvent>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_THERAPY_EVENTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_THERAPY_EVENTS WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TherapyEvent>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TherapyEvent>
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@ internal interface TotalDailyDoseDao : TraceableDao<TotalDailyDose> {
|
||||||
fun getLastTotalDailyDoses(count: Int, exclude: InterfaceIDs.PumpType = InterfaceIDs.PumpType.CACHE): Single<List<TotalDailyDose>>
|
fun getLastTotalDailyDoses(count: Int, exclude: InterfaceIDs.PumpType = InterfaceIDs.PumpType.CACHE): Single<List<TotalDailyDose>>
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_TOTAL_DAILY_DOSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_TOTAL_DAILY_DOSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TotalDailyDose>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TotalDailyDose>
|
||||||
|
|
||||||
@Query("DELETE FROM $TABLE_TOTAL_DAILY_DOSES WHERE timestamp >= :since AND pumpType = :pumpType")
|
@Query("DELETE FROM $TABLE_TOTAL_DAILY_DOSES WHERE timestamp >= :since AND pumpType = :pumpType")
|
||||||
fun deleteNewerThan(since: Long, pumpType: InterfaceIDs.PumpType)
|
fun deleteNewerThan(since: Long, pumpType: InterfaceIDs.PumpType)
|
||||||
|
|
|
@ -19,6 +19,6 @@ interface VersionChangeDao {
|
||||||
fun getMostRecentVersionChange(): VersionChange?
|
fun getMostRecentVersionChange(): VersionChange?
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_VERSION_CHANGES WHERE timestamp > :since AND timestamp <= :until LIMIT :limit OFFSET :offset")
|
@Query("SELECT * FROM $TABLE_VERSION_CHANGES WHERE timestamp > :since AND timestamp <= :until LIMIT :limit OFFSET :offset")
|
||||||
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<VersionChange>
|
fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<VersionChange>
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue