package com.pixelized.biblib.database.dao

import androidx.room.Dao
import androidx.room.RawQuery
import androidx.room.Transaction
import androidx.sqlite.db.SupportSQLiteQuery
import com.pixelized.biblib.database.data.AuthorDbo
import com.pixelized.biblib.database.data.GenreDbo
import com.pixelized.biblib.database.data.LanguageDbo
import com.pixelized.biblib.database.data.SeriesDbo
import com.pixelized.biblib.database.relation.BookRelation

@Dao
interface SearchDao {
    @Transaction
    @RawQuery
    fun getBooks(query: SupportSQLiteQuery): List<BookRelation>

    @Transaction
    @RawQuery
    fun getAuthors(query: SupportSQLiteQuery): List<AuthorDbo>

    @Transaction
    @RawQuery
    fun getSeries(query: SupportSQLiteQuery): List<SeriesDbo>

    @Transaction
    @RawQuery
    fun getGenres(query: SupportSQLiteQuery): List<GenreDbo>

    @Transaction
    @RawQuery
    fun getLanguages(query: SupportSQLiteQuery): List<LanguageDbo>
}