-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathquery.py
More file actions
29 lines (20 loc) · 806 Bytes
/
query.py
File metadata and controls
29 lines (20 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Code generated by sqlc. DO NOT EDIT.
# versions:
# sqlc v1.28.0
# source: query.sql
import sqlalchemy
import sqlalchemy.ext.asyncio
from querytest import models
DELETE_BAR_BY_ID = """-- name: delete_bar_by_id \\:execresult
DELETE FROM bar WHERE id = :p1
"""
class Querier:
def __init__(self, conn: sqlalchemy.engine.Connection):
self._conn = conn
def delete_bar_by_id(self, *, id: int) -> sqlalchemy.engine.Result:
return self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id})
class AsyncQuerier:
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
self._conn = conn
async def delete_bar_by_id(self, *, id: int) -> sqlalchemy.engine.Result:
return await self._conn.execute(sqlalchemy.text(DELETE_BAR_BY_ID), {"p1": id})