lab6
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.example.myapplication
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.Query
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Dao
|
||||
interface NoteDao {
|
||||
@Insert
|
||||
suspend fun insert(note: NoteEntity)
|
||||
|
||||
@Query("SELECT * FROM notes")
|
||||
fun getAll(): Flow<List<NoteEntity>>
|
||||
}
|
||||
Reference in New Issue
Block a user