Skip to content

Instantly share code, notes, and snippets.

@yashprakash13
Created September 9, 2020 14:36
Show Gist options
  • Save yashprakash13/1b2b81b3b2fb59c3b9bc54a6c6c03303 to your computer and use it in GitHub Desktop.
Save yashprakash13/1b2b81b3b2fb59c3b9bc54a6c6c03303 to your computer and use it in GitHub Desktop.
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertWord(word: Word)
@Query ("Select * from word_table")
fun getAllWordsPaged() : DataSource.Factory<Int, Word>
@Query("Delete from word_table where name like :name")
fun deleteWord(name: String)
@Query("Update word_table set name = :name, meaning = :meaning, audioPath = :audiopath where name like :originalName")
fun updateWord(originalName: String, name: String, meaning:String?, audiopath: String?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment