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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_HYPE_CRON_JOB_RUN_DETAILS_TABLE = """-- name: create_hype_cron_job_run_details_table \\:exec
CREATE TABLE IF NOT EXISTS hype_cron_job_run_details (
  jobid          bigint      NOT NULL,
  runid          bigserial   PRIMARY KEY,
  command_type   hype_command_type NOT NULL,
  command_params JSONB       NOT NULL,
  status         hype_cron_job_status_enum,
  schedule_time  timestamptz not null,
  start_time     timestamptz,
  end_time       timestamptz,
  UNIQUE (jobid, schedule_time)
)
"""


@dataclasses.dataclass()
class CreateHypeCronJobRunDetailsTableParams:

    pass

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

    def create_hype_cron_job_run_details_table(self, arg: CreateHypeCronJobRunDetailsTableParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_HYPE_CRON_JOB_RUN_DETAILS_TABLE))


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

    async def create_hype_cron_job_run_details_table(self, arg: CreateHypeCronJobRunDetailsTableParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_HYPE_CRON_JOB_RUN_DETAILS_TABLE))
