Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Room to v2.5.2 #4815

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BloodSugarHistoryListItemDataSource(
) : PositionalDataSource<BloodSugarHistoryListItem>() {

private val invalidationTracker = object : InvalidationTracker.Observer(arrayOf("BloodSugarMeasurements")) {
override fun onInvalidated(tables: MutableSet<String>) {
override fun onInvalidated(tables: Set<String>) {
invalidate()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.room.Embedded
import androidx.room.Entity
import androidx.room.Index
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.OnConflictStrategy
import androidx.room.PrimaryKey
import androidx.room.Query
import androidx.room.RawQuery
Expand Down Expand Up @@ -71,7 +71,7 @@ data class BloodSugarMeasurement(
@Dao
interface RoomDao {

@Insert(onConflict = REPLACE)
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun save(bloodSugars: List<BloodSugarMeasurement>)

@Query("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BloodPressureHistoryListItemDataSource(
) : PositionalDataSource<BloodPressureHistoryListItem>() {

private val invalidationTracker = object : InvalidationTracker.Observer(arrayOf("bloodpressuremeasurement")) {
override fun onInvalidated(tables: MutableSet<String>) {
override fun onInvalidated(tables: Set<String>) {
invalidate()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class Migration_49_50 @Inject constructor(
.use { cursor ->

generateSequence { cursor.takeIf { it.moveToNext() } }
.map { it.string("uuid") to it }
.map { it.string("uuid")!! to it }
.forEach { (uuid, cursorRow) ->
val patientUuid = cursor.string("patientUuid")
val patientUuid = cursor.string("patientUuid")!!

val bpRecordedAt = instantConverter.toInstant(cursorRow.string("recordedAt"))!!
val encounteredOn = bpRecordedAt.toLocalDateAtZone(userClock.zone)
Expand All @@ -62,9 +62,9 @@ class Migration_49_50 @Inject constructor(
with(insertIntoEncounter) {
bindString(1, encounterId)
bindString(2, patientUuid)
bindString(3, localDateConverter.fromLocalDate(encounteredOn))
bindString(4, cursorRow.string("createdAt"))
bindString(5, cursorRow.string("updatedAt"))
bindString(3, localDateConverter.fromLocalDate(encounteredOn)!!)
bindString(4, cursorRow.string("createdAt")!!)
bindString(5, cursorRow.string("updatedAt")!!)

executeInsert()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.simple.clinic.summary.teleconsultation.sync
import androidx.room.Dao
import androidx.room.Entity
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.OnConflictStrategy
import androidx.room.PrimaryKey
import androidx.room.Query
import androidx.room.RawQuery
Expand Down Expand Up @@ -42,7 +42,7 @@ data class TeleconsultationFacilityInfo(
@Dao
interface RoomDao {

@Insert(onConflict = REPLACE)
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun save(teleconsultationFacilityInfo: List<TeleconsultationFacilityInfo>)

@Query("DELETE FROM TeleconsultationFacilityInfo")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.room.Dao
import androidx.room.Embedded
import androidx.room.Entity
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.OnConflictStrategy
import androidx.room.PrimaryKey
import androidx.room.Query
import androidx.room.RawQuery
Expand Down Expand Up @@ -42,7 +42,7 @@ data class TeleconsultRecord(
@Dao
interface RoomDao {

@Insert(onConflict = REPLACE)
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun save(teleconsultRecords: List<TeleconsultRecord>)

@Query("DELETE FROM TeleconsultRecord")
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
androidx-camera = "1.1.0"
androidx-cameraView = "1.1.0"
androidx-paging = "3.1.1"
androidx-room = "2.4.3"
androidx-room = "2.5.2"
androidx-work = "2.7.1"
androidx-security-crypto = "1.1.0-alpha06"

Expand Down
Loading