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

import sqlalchemy
import sqlalchemy.ext.asyncio

from . import models


DELETE_VALUE = """-- name: delete_value \\:exec
DELETE FROM hyrex_kv WHERE key = :p1
"""


@dataclasses.dataclass()
class DeleteValueParams:
    key: str


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

    def delete_value(self, arg: DeleteValueParams) -> None:
        self._conn.execute(sqlalchemy.text(DELETE_VALUE), {"p1": arg.key})


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

    async def delete_value(self, arg: DeleteValueParams) -> None:
        await self._conn.execute(sqlalchemy.text(DELETE_VALUE), {"p1": arg.key})
