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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


UPDATE_CRON_JOB_CONFIRMATION_TS = """-- name: update_cron_job_confirmation_ts \\:exec
UPDATE hyrex_cron_job
SET scheduled_jobs_confirmed_until = now()
WHERE jobid = :p1
"""


@dataclasses.dataclass()
class UpdateCronJobConfirmationTsParams:
    jobid: int


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

    def update_cron_job_confirmation_ts(self, arg: UpdateCronJobConfirmationTsParams) -> None:
        self._conn.execute(sqlalchemy.text(UPDATE_CRON_JOB_CONFIRMATION_TS), {"p1": arg.jobid})


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

    async def update_cron_job_confirmation_ts(self, arg: UpdateCronJobConfirmationTsParams) -> None:
        await self._conn.execute(sqlalchemy.text(UPDATE_CRON_JOB_CONFIRMATION_TS), {"p1": arg.jobid})
