Limit confirmed route actions in driver projection
This commit is contained in:
@@ -34,7 +34,7 @@ android {
|
|||||||
applicationId = "pl.firmatpp.kierowca"
|
applicationId = "pl.firmatpp.kierowca"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 48
|
versionCode = 49
|
||||||
versionName = "1.0.44"
|
versionName = "1.0.44"
|
||||||
setProperty("archivesBaseName", "pl.firmatpp.kierowca")
|
setProperty("archivesBaseName", "pl.firmatpp.kierowca")
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|||||||
@@ -27,7 +27,15 @@ interface RouteActionDao {
|
|||||||
@Query(
|
@Query(
|
||||||
"""
|
"""
|
||||||
SELECT * FROM route_actions
|
SELECT * FROM route_actions
|
||||||
WHERE status IN ('PENDING', 'WAITING_FOR_PHOTOS', 'SYNCING', 'CONFIRMED', 'FAILED_RETRYABLE', 'FAILED_CONFLICT', 'FAILED_PERMANENT')
|
WHERE status IN ('PENDING', 'WAITING_FOR_PHOTOS', 'SYNCING', 'FAILED_RETRYABLE', 'FAILED_CONFLICT', 'FAILED_PERMANENT')
|
||||||
|
OR clientActionId IN (
|
||||||
|
SELECT confirmed.clientActionId
|
||||||
|
FROM route_actions AS confirmed
|
||||||
|
WHERE confirmed.status = 'CONFIRMED'
|
||||||
|
AND confirmed.routeId = route_actions.routeId
|
||||||
|
ORDER BY confirmed.createdAtEpochMillis DESC
|
||||||
|
LIMIT 2
|
||||||
|
)
|
||||||
ORDER BY createdAtEpochMillis DESC
|
ORDER BY createdAtEpochMillis DESC
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user