Skip to content

Commit 9fc56a7

Browse files
authored
fix
1 parent 8b85c1f commit 9fc56a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frameworks/Python/blacksheep/app-socketify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def json_test(request):
7373
async def single_db_query_test(request):
7474
row_id = random.randint(1, 10000)
7575
async with db_pool.acquire() as connection:
76-
number = await connection.fetch_row(
76+
number = await connection.fetch_val(
7777
READ_ROW_SQL, [row_id]
7878
)
7979
return bs.json({'id': row_id, 'randomNumber': number})
@@ -85,7 +85,7 @@ async def multiple_db_queries_test(request):
8585
worlds = []
8686
async with db_pool.acquire() as connection:
8787
for row_id in row_ids:
88-
number = await connection.fetch_row(
88+
number = await connection.fetch_val(
8989
READ_ROW_SQL, [row_id]
9090
)
9191
worlds.append({"id": row_id, "randomNumber": number})
@@ -111,7 +111,7 @@ async def db_updates_test(request):
111111
worlds = [{"id": row_id, "randomNumber": number} for row_id, number in updates]
112112
async with db_pool.acquire() as connection:
113113
for row_id, _ in updates:
114-
await connection.fetch_row(READ_ROW_SQL, [row_id])
114+
await connection.fetch_val(READ_ROW_SQL, [row_id])
115115
# await db_conn.executemany(WRITE_ROW_SQL, updates)
116116
await connection.execute_many(WRITE_ROW_SQL, updates)
117117
raise Exception("connect error")

0 commit comments

Comments
 (0)