Skip to content

Instantly share code, notes, and snippets.

@Zeirison
Last active March 13, 2020 09:26
Show Gist options
  • Select an option

  • Save Zeirison/0f155cd9c1b1c9a5e484ffc7f012f693 to your computer and use it in GitHub Desktop.

Select an option

Save Zeirison/0f155cd9c1b1c9a5e484ffc7f012f693 to your computer and use it in GitHub Desktop.
interface BaseDao<T> {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(obj: T)
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(list: List<T>)
@Update
fun update(obj: T)
@Update
fun update(list: List<T>)
@Delete
fun delete(obj: T)
@Delete
fun delete(list: List<T>)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment