from pathlib import Path
from sqlite3 import Connection as SQLiteConnection

import aiosql.queries


class Queries(aiosql.queries.Queries):  # type: ignore[misc]
    """
    Queries for the store.

    These methods do not define the logic for the queries, but rather the interface for the
    queries. This is in order to provide type hints for the queries. The actual logic is
    generated by AIOSQL at runtime. The queries are defined in store.sql.
    """

    def put_input_table(self, conn: SQLiteConnection, *, name: str, path: str) -> None:
        ...

    def get_input_table_path(self, conn: SQLiteConnection, *, name: str) -> str | None:
        ...

    def put_output_table(self, conn: SQLiteConnection, *, name: str, path: str) -> None:
        ...

    def get_output_table_path(self, conn: SQLiteConnection, *, name: str) -> str | None:
        ...


queries: Queries = aiosql.from_path(
    sql_path=Path(__file__).with_name("store.sql"),
    driver_adapter="sqlite3",
    queries_cls=Queries,
)
