mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Queries returning duplicate column names - e.g. joins between tables sharing column names - silently lost values because rows were built with dict(zip(keys, row)), where the last duplicate wins. Later occurrences are now renamed with a numeric suffix: id, id becomes id, id_2 - skipping any suffix that would collide with a real column in the same query. The new utils.dedupe_keys() helper transforms the key list once per query, so the per-row dict construction is unchanged and there is no measurable performance impact. Applied in Database.query() (including the PRAGMA and RETURNING paths), Table.rows_where(), Table.search() and the CLI's JSON output. CSV, TSV and table output keep the original duplicate headers. Closes #624 |
||
|---|---|---|
| .. | ||
| _static/js | ||
| _templates | ||
| .gitignore | ||
| changelog.rst | ||
| cli-reference.rst | ||
| cli.rst | ||
| codespell-ignore-words.txt | ||
| conf.py | ||
| contributing.rst | ||
| index.rst | ||
| installation.rst | ||
| Makefile | ||
| migrations.rst | ||
| plugins.rst | ||
| python-api.rst | ||
| reference.rst | ||
| tutorial.ipynb | ||
| upgrading.rst | ||