aio-libs / aio-libs/aiomysql

aiomysql==0.0.20 fetchall() returns empty tuple except empty list

Aperta
#469 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
1.9k
Fork
272
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```py3
async def callproc(self, procedure: str, rows: int, values: list = None):
try:
async with self.pool.acquire() as conn:
async with conn.cursor(aiomysql.DictCursor) as cur:
await cur.callproc(procedure, [*values])
result = None
if rows == 1:
result = await cur.fetchone()
# elif rows > 1:
# result = await cur.fetchmany(rows)
elif rows == -1:
result = await cur.fetchall()
elif rows == 0:
pass
await cur.close()
return result
```

Expected result of execution None or empty list, but I receive an empty tuple.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.