Created
January 15, 2018 16:26
-
-
Save communikein/83fc6988f50288d893d0a829963d2bdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Dao | |
public interface PoisDao { | |
@Insert | |
void addPoi(Poi entry); | |
@Insert | |
void bulkInsertPois(List<Pois> entries); | |
@Query("DELETE FROM pois") | |
void deletePois(); | |
@Query("DELETE FROM pois WHERE id = :id") | |
void deletePoi(String id); | |
@Query("SELECT * FROM pois") | |
LiveData<List<Poi>> getObservablePois(); | |
@Query("SELECT * FROM pois") | |
List<Poi> getPois(); | |
@Query("SELECT * FROM pois WHERE id = :id") | |
Poi getPoi(String id); | |
@Query("SELECT * FROM pois WHERE id = :id") | |
LiveData<Poi> getObservablePoi(String id); | |
@Update | |
int updatePoi(Poi entry); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment