diff --git a/app/src/main/java/com/mina_mikhail/newsapp/features/news/data/data_source/local/ArticlesDao.kt b/app/src/main/java/com/mina_mikhail/newsapp/features/news/data/data_source/local/ArticlesDao.kt index 241dbd9..0413d1d 100644 --- a/app/src/main/java/com/mina_mikhail/newsapp/features/news/data/data_source/local/ArticlesDao.kt +++ b/app/src/main/java/com/mina_mikhail/newsapp/features/news/data/data_source/local/ArticlesDao.kt @@ -10,27 +10,13 @@ import com.mina_mikhail.newsapp.features.news.domain.entity.model.Article @Dao interface ArticlesDao { - /** - * Select all articles from the articles table. - * - * @return all articles. - */ + @Query("SELECT * FROM articles") fun getAll(): LiveData> - /** - * Insert articles in the database. If the article already exists, replace it. - * - * @param article the city to be inserted. - */ @Insert(onConflict = OnConflictStrategy.REPLACE) suspend fun insert(article: Article) - /** - * Delete article from the articles table. - * - * @param article the city to be inserted. - */ @Delete suspend fun delete(article: Article) } \ No newline at end of file