sqlite-utils/tests
Parker Gurney f34dfb25da Auto-decode columns declared as JSON in output modes (issue #579)
Columns declared with type JSON now decode automatically wherever nested
JSON is already supported (query/rows/search/memory output, and the
Python API), without needing --json-cols. Uses sqlite3's built-in
detect_types=PARSE_DECLTYPES + a registered JSON converter, so it works
transparently through joins and aliases. Flat formats (CSV/TSV/table/raw)
re-serialize decoded values back to JSON text instead of a Python repr.
Also adds "JSON" as a first-class column type for create()/add_column()/
transform(), and fixes column_affinity("JSON") so transform() doesn't
rewrite JSON columns as REAL.
2026-08-05 14:19:51 -07:00
..
sniff sqlite-utils insert --sniff option, closes #230 2021-02-14 11:23:12 -08:00
__init__.py Initial project layout + database table creation tools 2018-07-28 06:46:17 -07:00
conftest.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
ext.c Support entrypoints for --load-extension (#473) 2022-08-26 22:55:47 -07:00
test_analyze.py Use sqlean if available in environment (#560) 2023-06-25 16:25:51 -07:00
test_analyze_tables.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_atomic.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_attach.py db.attach(alias, filepath) method, closes #113 2021-02-18 20:56:32 -08:00
test_cli.py Auto-decode columns declared as JSON in output modes (issue #579) 2026-08-05 14:19:51 -07:00
test_cli_bulk.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_convert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_insert.py Add --key option to insert/upsert/bulk for importing JSON lists nested under a top-level key 2026-08-05 14:10:28 -07:00
test_cli_memory.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_cli_migrate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_column_affinity.py Auto-decode columns declared as JSON in output modes (issue #579) 2026-08-05 14:19:51 -07:00
test_column_casing.py Match column names case-insensitively, closes #760 2026-07-05 22:11:22 -07:00
test_constructor.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_conversions.py Now complies with flake8, refs #291 2021-06-22 18:22:08 -07:00
test_convert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_create.py Auto-decode columns declared as JSON in output modes (issue #579) 2026-08-05 14:19:51 -07:00
test_create_view.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_default_value.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_delete.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_docs.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_duplicate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_enable_counts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_extract.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_extracts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_foreign_keys.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_fts.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_get.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_gis.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_hypothesis.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_insert_files.py insert-files: add --convert/--import to transform rows during import 2026-08-05 14:15:20 -07:00
test_introspect.py Fix _decode_default_value to unescape doubled single quotes in string defaults (#811) 2026-07-25 21:52:04 -07:00
test_list_mode.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_lookup.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_m2m.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_migrations.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_plugins.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_query.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_recipes.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_recreate.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_register_function.py Database as a context manager, fixed many pytest warnings 2025-12-11 16:56:12 -08:00
test_rows.py Fix two tests that assumed modern SQLite behavior 2026-07-06 22:02:41 -07:00
test_rows_from_file.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_sniff.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_suggest_column_types.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_tracer.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_transform.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_update.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_upsert.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
test_utils.py Fix dishonest progress accounting for multi-byte encoded CSV input (#439) 2026-08-05 14:18:34 -07:00
test_wal.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00