# Code generated by sqlc. DO NOT EDIT.
# versions:
#   sqlc v1.29.0
# source: _05_create_hyrex_stats_task_status_counts_table.sql
import dataclasses

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_STATS_TASK_STATUS_COUNTS_TABLE = """-- name: create_stats_task_status_counts_table \\:exec
CREATE TABLE IF NOT EXISTS hyrex_stats_task_status_counts
(
    timepoint     TIMESTAMP WITH TIME ZONE PRIMARY KEY,
    queued        INTEGER,
    running       INTEGER,
    waiting       INTEGER,
    failed        INTEGER,
    success       INTEGER,
    lost          INTEGER,
    total         INTEGER,
    queued_delta  INTEGER,
    success_delta INTEGER,
    failed_delta  INTEGER,
    lost_delta    INTEGER
)
"""


@dataclasses.dataclass()
class CreateStatsTaskStatusCountsTableParams:

    pass

class Querier:
    def __init__(self, conn: sqlalchemy.engine.Connection):
        self._conn = conn

    def create_stats_task_status_counts_table(self, arg: CreateStatsTaskStatusCountsTableParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_STATS_TASK_STATUS_COUNTS_TABLE))


class AsyncQuerier:
    def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
        self._conn = conn

    async def create_stats_task_status_counts_table(self, arg: CreateStatsTaskStatusCountsTableParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_STATS_TASK_STATUS_COUNTS_TABLE))
