package com.rssuper.database.daos;

@kotlin.Metadata(mv = {1, 9, 0}, k = 1, xi = 48, d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\b\f\bg\u0018\u00002\u00020\u0001J\u000e\u0010\u0002\u001a\u00020\u0003H\u00a7@\u00a2\u0006\u0002\u0010\u0004J\u0016\u0010\u0005\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u0007H\u00a7@\u00a2\u0006\u0002\u0010\bJ\u0016\u0010\t\u001a\u00020\u00032\u0006\u0010\n\u001a\u00020\u000bH\u00a7@\u00a2\u0006\u0002\u0010\fJ\u0016\u0010\r\u001a\u00020\u00032\u0006\u0010\u000e\u001a\u00020\u000fH\u00a7@\u00a2\u0006\u0002\u0010\u0010J\u0014\u0010\u0011\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070\u00130\u0012H\'J\u001c\u0010\u0014\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070\u00130\u00122\u0006\u0010\u0015\u001a\u00020\u0003H\'J\u0018\u0010\u0016\u001a\u0004\u0018\u00010\u00072\u0006\u0010\n\u001a\u00020\u000bH\u00a7@\u00a2\u0006\u0002\u0010\fJ\u000e\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\u00030\u0012H\'J\"\u0010\u0018\u001a\b\u0012\u0004\u0012\u00020\u000f0\u00132\f\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00070\u0013H\u00a7@\u00a2\u0006\u0002\u0010\u001aJ\u0016\u0010\u001b\u001a\u00020\u000f2\u0006\u0010\u0006\u001a\u00020\u0007H\u00a7@\u00a2\u0006\u0002\u0010\bJ\u001c\u0010\u001c\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070\u00130\u00122\u0006\u0010\u001d\u001a\u00020\u000bH\'J\u0016\u0010\u001e\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u0007H\u00a7@\u00a2\u0006\u0002\u0010\b\u00a8\u0006\u001f"}, d2 = {"Lcom/rssuper/database/daos/SearchHistoryDao;", "", "deleteAllSearchHistory", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "deleteSearchHistory", "search", "Lcom/rssuper/database/entities/SearchHistoryEntity;", "(Lcom/rssuper/database/entities/SearchHistoryEntity;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "deleteSearchHistoryById", "id", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "deleteSearchHistoryOlderThan", "timestamp", "", "(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;", "getAllSearchHistory", "Lkotlinx/coroutines/flow/Flow;", "", "getRecentSearches", "limit", "getSearchHistoryById", "getSearchHistoryCount", "insertSearchHistories", "searches", "(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "insertSearchHistory", "searchHistory", "query", "updateSearchHistory", "RSSuper_release"})
@androidx.room.Dao()
public abstract interface SearchHistoryDao {
    
    @androidx.room.Query(value = "SELECT * FROM search_history ORDER BY timestamp DESC")
    @org.jetbrains.annotations.NotNull()
    public abstract kotlinx.coroutines.flow.Flow<java.util.List<com.rssuper.database.entities.SearchHistoryEntity>> getAllSearchHistory();
    
    @androidx.room.Query(value = "SELECT * FROM search_history WHERE id = :id")
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object getSearchHistoryById(@org.jetbrains.annotations.NotNull()
    java.lang.String id, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super com.rssuper.database.entities.SearchHistoryEntity> $completion);
    
    @androidx.room.Query(value = "SELECT * FROM search_history WHERE query LIKE \'%\' || :query || \'%\' ORDER BY timestamp DESC")
    @org.jetbrains.annotations.NotNull()
    public abstract kotlinx.coroutines.flow.Flow<java.util.List<com.rssuper.database.entities.SearchHistoryEntity>> searchHistory(@org.jetbrains.annotations.NotNull()
    java.lang.String query);
    
    @androidx.room.Query(value = "SELECT * FROM search_history ORDER BY timestamp DESC LIMIT :limit")
    @org.jetbrains.annotations.NotNull()
    public abstract kotlinx.coroutines.flow.Flow<java.util.List<com.rssuper.database.entities.SearchHistoryEntity>> getRecentSearches(int limit);
    
    @androidx.room.Query(value = "SELECT COUNT(*) FROM search_history")
    @org.jetbrains.annotations.NotNull()
    public abstract kotlinx.coroutines.flow.Flow<java.lang.Integer> getSearchHistoryCount();
    
    @androidx.room.Insert(onConflict = 5)
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object insertSearchHistory(@org.jetbrains.annotations.NotNull()
    com.rssuper.database.entities.SearchHistoryEntity search, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Long> $completion);
    
    @androidx.room.Insert(onConflict = 5)
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object insertSearchHistories(@org.jetbrains.annotations.NotNull()
    java.util.List<com.rssuper.database.entities.SearchHistoryEntity> searches, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.util.List<java.lang.Long>> $completion);
    
    @androidx.room.Update()
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object updateSearchHistory(@org.jetbrains.annotations.NotNull()
    com.rssuper.database.entities.SearchHistoryEntity search, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Integer> $completion);
    
    @androidx.room.Delete()
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object deleteSearchHistory(@org.jetbrains.annotations.NotNull()
    com.rssuper.database.entities.SearchHistoryEntity search, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Integer> $completion);
    
    @androidx.room.Query(value = "DELETE FROM search_history WHERE id = :id")
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object deleteSearchHistoryById(@org.jetbrains.annotations.NotNull()
    java.lang.String id, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Integer> $completion);
    
    @androidx.room.Query(value = "DELETE FROM search_history")
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object deleteAllSearchHistory(@org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Integer> $completion);
    
    @androidx.room.Query(value = "DELETE FROM search_history WHERE timestamp < :timestamp")
    @org.jetbrains.annotations.Nullable()
    public abstract java.lang.Object deleteSearchHistoryOlderThan(long timestamp, @org.jetbrains.annotations.NotNull()
    kotlin.coroutines.Continuation<? super java.lang.Integer> $completion);
}