Skip to content

Commit

Permalink
Add missing @transaction to HighlightDao::observeById
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandarIlic committed Mar 4, 2025
1 parent f256d7c commit 786afbb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package net.primal.android.highlights.db

import androidx.room.Dao
import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Upsert
import kotlinx.coroutines.flow.Flow

Expand All @@ -16,6 +17,7 @@ interface HighlightDao {
@Query("DELETE FROM HighlightData WHERE highlightId = :highlightId")
fun deleteById(highlightId: String)

@Transaction
@Query("SELECT * FROM HighlightData WHERE highlightId = :highlightId LIMIT 1")
fun observeById(highlightId: String): Flow<Highlight>
}

0 comments on commit 786afbb

Please sign in to comment.