2021-04-22 11:47:18 +02:00
|
|
|
package org.pixeldroid.app.utils.db.dao.feedContent
|
2020-11-27 17:02:52 +01:00
|
|
|
|
|
|
|
import androidx.paging.PagingSource
|
|
|
|
import androidx.room.Insert
|
|
|
|
import androidx.room.OnConflictStrategy
|
2021-04-22 11:47:18 +02:00
|
|
|
import org.pixeldroid.app.utils.api.objects.FeedContentDatabase
|
2020-11-27 17:02:52 +01:00
|
|
|
|
|
|
|
interface FeedContentDao<T: FeedContentDatabase>{
|
|
|
|
|
|
|
|
fun feedContent(userId: String, instanceUri: String): PagingSource<Int, T>
|
|
|
|
|
2021-08-14 19:40:31 +02:00
|
|
|
suspend fun clearFeedContent(userId: String, instanceUri: String)
|
2020-11-27 17:02:52 +01:00
|
|
|
|
|
|
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
|
|
|
suspend fun insertAll(feedContent: List<T>)
|
|
|
|
}
|