[CONPY-214] cursor dictionary and named_tuple parameter do not work anymore Created: 2022-07-06 Updated: 2022-07-16 Resolved: 2022-07-06 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | DBAPI 2.0 |
| Affects Version/s: | 1.1.3, 1.1.2 |
| Fix Version/s: | 1.1.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Franz Ehrlich | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Python Version: | 3.9 |
| Description |
|
Both named_tuple and dictionary are not working with the newer connector, both parameter will just a list of tuples on a fetchall. Minimal example:
|
| Comments |
| Comment by Georg Richter [ 2022-07-06 ] |
|
Confirmed - while fetchone() and fetchmany() work as expected, fetchall() uses iterator which calls the c function MrdbCursor_fetchone(). |
| Comment by Georg Richter [ 2022-07-06 ] |
|
commit 275aaf3ee18027188990e09de8bddd38cbc38619 (HEAD -> 1.1, origin/1.1) Fix for Replace cursor iterator by native python _iter_() method. Fix will be available with 1.1.4 release |
| Comment by thomas st.yeng [ 2022-07-16 ] |
|
confirmed this bug. A workaround is to use something like: ...which is not as pretty, but works. |