Commit graph

6 commits

Author SHA1 Message Date
Erlend E. Aasland
7a843e8390
[3.12] gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223) (#118270)
sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.

With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-25 08:33:35 +00:00
Erlend E. Aasland
b451e9020d
[3.12] gh-64662: Fix virtual table support in sqlite3.Connection.iterdump (#108340) (#108563)
* [3.12] gh-64662: Add virtual table support to sqlite3.Connection.iterdump (#108340)

(cherry picked from commit d0160c7c22)

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>

* The _quote_value helper is not part of 3.12; spell out the replacement

* With quotes

* Ok, let's use explicit quoting

---------

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
2023-08-29 00:25:35 +02:00
itssme
affa9f22cf
gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement (#9621)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-06-20 00:59:24 +02:00
R David Murray
b52312923b #15545: fix sqlite3.iterdump regression on unsortable row_factory objects.
The fix for issue 9750 introduced a regression by sorting the row objects
returned by fetchall.  But if a row_factory such as sqlite3.Row is used, the
rows may not be sortable (in Python3), which leads to an exception.  The
sorting is still a nice idea, so the patch moves the sort into the sql.

Fix and test by Peter Otten.
2013-01-10 11:04:09 -05:00
Petri Lehtinen
51d04d1ba8 Fix sqlite3.Connection.iterdump on tables/fields with reserved names or quotes
Closes #9750
2012-02-12 21:05:31 +02:00
Gerhard Häring
b1b9382d91 Added missing files for new iterdump method. 2008-03-29 00:41:18 +00:00