MagicStack / MagicStack/asyncpg
conn.execute return value
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 8.1k
- Fork
- 468
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
asyncpg version: 0.30
PostgreSQL version:
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce the issue with a local PostgreSQL install?:
Python version: 3.11
Platform: Ubuntu
Do you use pgbouncer?: No
Did you install asyncpg with pip?: Yes
If you built asyncpg locally, which version of Cython did you use?:
Can the issue be reproduced under both asyncio and uvloop?: NA
When I do execute on a connection, the return value looks like it brings back the number of rows with SELECT prepended to it.
Example:
If you run:
conn.execute("SELECT now();")
The output is SELECT 1
If you run:
conn.execute("SELECT generate_series(0, 100);")
The output is SELECT 101
Obviously with a fetch it brings back the correct result, but I am specifically interested in the return value of a multi statement execute.
ie, I want to do
conn.execute("SELECT generate_series(0, 100); SELECT now();")
And the return value should be the last return value.
Is this possible? What am I missing?
Thanks in advance
And PS. The ISSUE_TEMPLATE is not applying when creating the issue, I copied it in.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso conn.execute e riproduci i due esempi, con una singola istruzione e con più istruzioni, usando la configurazione segnalata con asyncpg 0.30 e Python 3.11. Per considerare il lavoro completato sarebbe necessario concordare il comportamento o modificare la documentazione sul valore restituito da execute; l’issue non indica alcun file né test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- postgresql, python
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100