summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/dump.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)Erlend E. Aasland2024-04-251-0/+1
| | | | | | | | | | | | 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>
* gh-91602: Add iterdump() support for filtering database objects (#114501)Mariusz Felisiak2024-02-061-5/+14
| | | | | | Add optional 'filter' parameter to iterdump() that allows a "LIKE" pattern for filtering database objects to dump. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108364: In sqlite3, disable foreign keys before dumping SQL schema (#113957)Mariusz Felisiak2024-01-121-0/+4
| | | | | | | sqlite3.Connection.iterdump now ensures that foreign key support is disabled before dumping the database schema, if there is any foreign key violation. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108590: Revert gh-108657 (commit 400a1cebc) (#108686)Erlend E. Aasland2023-08-301-25/+2
| | | Reverted per Serhiy's request.
* gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (#108657)Corvin2023-08-301-2/+25
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-64662: Add virtual table support to sqlite3.Connection.iterdump (#108340)Erlend E. Aasland2023-08-271-7/+13
| | | Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
* gh-108364: Simplify quoting values and identifiers in sqlite3's iterdump() ↵Mariusz Felisiak2023-08-251-7/+18
| | | | (#108472)
* gh-79009: sqlite3.iterdump now correctly handles tables with autoincrement ↵itssme2022-06-191-1/+13
| | | | | (#9621) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* #15545: fix sqlite3.iterdump regression on unsortable row_factory objects.R David Murray2013-01-101-1/+2
| | | | | | | | | 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.
* Fix sqlite3.Connection.iterdump on tables/fields with reserved names or quotesPetri Lehtinen2012-02-121-22/+28
| | | | Closes #9750
* Added missing files for new iterdump method.Gerhard Häring2008-03-291-0/+63