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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_TASK_RUN_STATUS_ENUM = """-- name: create_task_run_status_enum \\:exec
DO $$
BEGIN
    IF NOT EXISTS (SELECT 1
                   FROM pg_type
                   WHERE typname = 'task_run_status'
                     AND typnamespace = 'public'\\:\\:regnamespace) THEN
        CREATE TYPE public.task_run_status AS ENUM (
            'SUCCESS',
            'FAILED',
            'RUNNING',
            'QUEUED',
            'UP_FOR_CANCEL',
            'CANCELED',
            'LOST',
            'STOPPED',
            'SKIPPED',
            'AWAIT_DEPS',
            'AWAIT_START_TIME'
            );
    END IF;
END $$
"""


@dataclasses.dataclass()
class CreateTaskRunStatusEnumParams:

    pass

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

    def create_task_run_status_enum(self, arg: CreateTaskRunStatusEnumParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_TASK_RUN_STATUS_ENUM))


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

    async def create_task_run_status_enum(self, arg: CreateTaskRunStatusEnumParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_TASK_RUN_STATUS_ENUM))
