mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
create a table for widgets
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
package com.simplemobiletools.notes.pro.interfaces
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.simplemobiletools.notes.pro.models.Widget
|
||||
|
||||
@Dao
|
||||
interface WidgetsDao {
|
||||
@Query("SELECT * FROM widgets")
|
||||
fun getWidgets(): List<Widget>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
fun insertOrUpdate(widget: Widget): Long
|
||||
}
|
Reference in New Issue
Block a user