microsoft / microsoft/mssql-python
Add .to_dict to Row objects
@jahnvi480 ci sta già lavorando.
Dal 1/6/2026.
- Lingua principale
- Python
- Stelle
- 473
- Fork
- 60
- Merge medio
- 2g 11h
- PR unite (30g)
- 36
Descrizione
Is your feature request related to a problem? Please describe.
I've just finished testing the newly released row-string indexing feature. It's great and extremely handy for cases where a mapping interface is needed. However, I think it can go a bit further: Sometimes we need to pass a true dict into some legacy thing, and here mssql-python could help, by providing a built-in to_dict() function.
Describe the solution you'd like
I would like a function on the Row object that will return a Python dict with all of the row's values.
Describe alternatives you've considered
Interrogating the cursor's description property and producing my own dict is easy enough. But it would certainly be a lot easier, and probably faster, to let mssql-python do the work instead.
Thank you!
Guida per i contributori
Apri la guida per i contributori
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.
Valutazione
Questa issue non è ancora stata valutata.