mirror of https://github.com/readrops/Readrops.git
28 lines
545 B
Java
28 lines
545 B
Java
package com.readrops.app.database.dao;
|
|
|
|
|
|
import android.arch.persistence.room.Dao;
|
|
import android.arch.persistence.room.Insert;
|
|
import android.arch.persistence.room.Query;
|
|
|
|
import com.readrops.app.database.entities.Feed;
|
|
|
|
import java.util.List;
|
|
|
|
@Dao
|
|
public interface FeedDao {
|
|
|
|
@Query("Select * from Feed")
|
|
List<Feed> getAllFeeds();
|
|
|
|
@Insert
|
|
void insert(Feed feed);
|
|
|
|
@Query("Select count(*) from Feed")
|
|
int getFeedCount();
|
|
|
|
@Query("Select * from Feed Where url = :feedUrl")
|
|
Feed getFeedByUrl(String feedUrl);
|
|
|
|
}
|