# Code generated by sqlc. DO NOT EDIT.
# versions:
#   sqlc v1.29.0
# source: update_queues_on_executor.sql
import dataclasses
from typing import List
import uuid

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


UPDATE_QUEUES_ON_EXECUTOR = """-- name: update_queues_on_executor \\:exec
UPDATE hyrex_executor
SET queues = :p1
WHERE id = :p2
"""


@dataclasses.dataclass()
class UpdateQueuesOnExecutorParams:
    queues: List[str]
    id: uuid.UUID


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

    def update_queues_on_executor(self, arg: UpdateQueuesOnExecutorParams) -> None:
        self._conn.execute(sqlalchemy.text(UPDATE_QUEUES_ON_EXECUTOR), {"p1": arg.queues, "p2": arg.id})


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

    async def update_queues_on_executor(self, arg: UpdateQueuesOnExecutorParams) -> None:
        await self._conn.execute(sqlalchemy.text(UPDATE_QUEUES_ON_EXECUTOR), {"p1": arg.queues, "p2": arg.id})
