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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_EXECUTOR_STATUS_ENUM = """-- name: create_executor_status_enum \\:exec
DO $$
BEGIN
    -- Create enum if it doesn't exist
    IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'executor_status') THEN
        CREATE TYPE executor_status AS ENUM ('SHUTDOWN', 'LOST', 'RUNNING', 'UNKNOWN');
    END IF;
END$$
"""


@dataclasses.dataclass()
class CreateExecutorStatusEnumParams:

    pass

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

    def create_executor_status_enum(self, arg: CreateExecutorStatusEnumParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_EXECUTOR_STATUS_ENUM))


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

    async def create_executor_status_enum(self, arg: CreateExecutorStatusEnumParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_EXECUTOR_STATUS_ENUM))
