Fixed too many sql error on selection update

This commit is contained in:
Arty Bishop committed 2020-10-10 21:47:44 +01:00
1 parent c6aae706f9
commit 753a3c823f
1 file changed
+3 -3
@@ -47,12 +47,12 @@ interface EntriesDao {
@Transaction @Transaction
suspend fun updateEntriesSelection(satIds: List<Int>) { suspend fun updateEntriesSelection(satIds: List<Int>) {
clearSelection() clearSelection()
updateSelection(satIds) satIds.forEach { updateSelection(it) }
} }
@Query("UPDATE entries SET isSelected = 0") @Query("UPDATE entries SET isSelected = 0")
suspend fun clearSelection() suspend fun clearSelection()
@Query("UPDATE entries SET isSelected = 1 WHERE catNum IN (:satIds)") @Query("UPDATE entries SET isSelected = 1 WHERE catNum = :satId")
suspend fun updateSelection(satIds: List<Int>) suspend fun updateSelection(satId: Int)
} }