17 lines
442 B
Kotlin
17 lines
442 B
Kotlin
|
package it.unisannio.ding.ids.wedroid.app.data.dao
|
||
|
|
||
|
import androidx.lifecycle.LiveData
|
||
|
import androidx.room.*
|
||
|
import it.unisannio.ding.ids.wedroid.app.data.entity.Board
|
||
|
|
||
|
@Dao
|
||
|
interface BoardDao {
|
||
|
@Query("SELECT * from board_table ORDER BY title ASC")
|
||
|
fun getAllBoard(): LiveData<List<Board>>
|
||
|
|
||
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||
|
suspend fun insert(board: Board)
|
||
|
|
||
|
@Delete
|
||
|
suspend fun delete(board: Board)
|
||
|
}
|