Skip to content

Instantly share code, notes, and snippets.

@SubhrajyotiSen
Created June 15, 2017 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SubhrajyotiSen/c9d1df5681716c56610c0eef655a5024 to your computer and use it in GitHub Desktop.
Save SubhrajyotiSen/c9d1df5681716c56610c0eef655a5024 to your computer and use it in GitHub Desktop.
@Dao
@TypeConverters(DateConverter.class)
public interface BorrowModelDao {
@Query("select * from BorrowModel")
LiveData<List<BorrowModel>> getAllBorrowedItems();
@Query("select * from BorrowModel where id = :id")
BorrowModel getItembyId(String id);
@Insert(onConflict = REPLACE)
void addBorrow(BorrowModel borrowModel);
@Delete
void deleteBorrow(BorrowModel borrowModel);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment