merge api ✨
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ab0f8a0462
commit
b04739859f
@ -0,0 +1,15 @@
|
||||
package com.example.shakecraft.data.dao
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.shakecraft.model.Item
|
||||
|
||||
@Dao
|
||||
interface ItemDao {
|
||||
@Query("SELECT * FROM item")
|
||||
suspend fun getAllItems(): List<Item>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertItem(item: Item)
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.example.shakecraft.data.dao
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.example.shakecraft.model.Player
|
||||
|
||||
@Dao
|
||||
interface PlayerDao {
|
||||
@Query("SELECT * FROM player")
|
||||
suspend fun getAllPlayers(): List<Player>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertPlayer(player: Player)
|
||||
}
|
Loading…
Reference in new issue