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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


CREATE_CRON_JOB_STATUS_ENUM = """-- name: create_cron_job_status_enum \\:exec
DO $$
BEGIN
    IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'cron_job_status_enum' AND typnamespace = 'public'\\:\\:regnamespace) THEN
        CREATE TYPE public.cron_job_status_enum AS ENUM (
            'SUCCESS',
            'QUEUED',
            'FAILED'
        );
    END IF;
END $$
"""


@dataclasses.dataclass()
class CreateCronJobStatusEnumParams:

    pass

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

    def create_cron_job_status_enum(self, arg: CreateCronJobStatusEnumParams) -> None:
        self._conn.execute(sqlalchemy.text(CREATE_CRON_JOB_STATUS_ENUM))


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

    async def create_cron_job_status_enum(self, arg: CreateCronJobStatusEnumParams) -> None:
        await self._conn.execute(sqlalchemy.text(CREATE_CRON_JOB_STATUS_ENUM))
