package ru.fincode.tsudesk.core.database.api.schedule

import ru.fincode.tsudesk.core.database.api.schedule.Constants.COL_KEY
import ru.fincode.tsudesk.core.database.api.schedule.Constants.COL_SCHEDULE_KEY
import ru.fincode.tsudesk.core.database.api.schedule.Constants.LESSON_TABLE
import ru.fincode.tsudesk.core.database.api.schedule.Constants.SCHEDULE_TABLE

object Query {

    const val SELECT_LESSON_BY_KEY_QUERY =
        "SELECT * FROM ${LESSON_TABLE} WHERE ${COL_SCHEDULE_KEY} = :key"

    const val SELECT_SCHEDULE_BY_KEY_QUERY =
        "SELECT * FROM ${SCHEDULE_TABLE} WHERE `${COL_KEY}` = :key LIMIT 1"

    const val DELETE_LESSON_BY_KEY_QUERY =
        "DELETE FROM ${LESSON_TABLE} WHERE ${COL_SCHEDULE_KEY} = :key"

    const val DELETE_SCHEDULE_BY_KEY_QUERY =
        "DELETE FROM ${SCHEDULE_TABLE} WHERE `${COL_KEY}` = :key"
}
