Skip to content

Instantly share code, notes, and snippets.

@mibrahimdev
Created May 29, 2018 18:08
Show Gist options
  • Save mibrahimdev/83cb19c88e2fbe1f7bacd80a81ff1b17 to your computer and use it in GitHub Desktop.
Save mibrahimdev/83cb19c88e2fbe1f7bacd80a81ff1b17 to your computer and use it in GitHub Desktop.
@Dao
public interface WeatherDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void bulkInsert(WeatherEntry... entries);
@Query("SELECT * FROM weather where date = :date")
LiveData<WeatherEntry> getWeatherByDate(Date date);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment