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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_WORKFLOW_RUN_STATUS_ENUM = """-- name: create_workflow_run_status_enum \\:exec
DO $$
BEGIN
    IF NOT EXISTS (SELECT 1 
                   FROM pg_type 
                   WHERE typname = 'workflow_run_status' 
                     AND typnamespace = 'public'\\:\\:regnamespace) THEN
        CREATE TYPE public.workflow_run_status AS ENUM (
            'SUCCESS',
            'FAILED',
            'RUNNING',
            'UP_FOR_CANCEL',
            'CANCELED',
            'ASLEEP'
        );
    END IF;
END $$
"""


@dataclasses.dataclass()
class CreateWorkflowRunStatusEnumParams:

    pass

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

    def create_workflow_run_status_enum(self, arg: CreateWorkflowRunStatusEnumParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_WORKFLOW_RUN_STATUS_ENUM))


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

    async def create_workflow_run_status_enum(self, arg: CreateWorkflowRunStatusEnumParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_WORKFLOW_RUN_STATUS_ENUM))
