sqlite-utils/sqlite_utils
Abhishek Yadav 37caace215 feat: add Database.merge() and sqlite-utils merge command
Implements the ability to merge tables from one or more source SQLite
databases into a destination database, as requested in #491.

Python API:
    db.merge([src1, src2], alter=True, replace=False, ignore=False, tables=None)
  - source_dbs can be Database objects or file paths
  - Tables not in dest are created; existing tables have rows inserted
  - alter=True adds missing columns to existing destination tables
  - replace=True overwrites rows with matching primary keys
  - ignore=True skips rows with conflicting primary keys
  - tables= limits which tables are merged
  - Virtual tables and their shadow tables are automatically skipped

CLI:
    sqlite-utils merge combined.db one.db two.db [options]
  - Supports --alter, --replace, --ignore, --pk, --table, --load-extension

Closes #491
2026-03-22 20:49:01 +05:30
..
__init__.py prepare_connection plugin hook 2023-07-22 15:59:08 -07:00
__main__.py Support 'python -m sqlite_utils', closes #368 2022-01-08 18:33:22 -08:00
cli.py feat: add Database.merge() and sqlite-utils merge command 2026-03-22 20:49:01 +05:30
db.py feat: add Database.merge() and sqlite-utils merge command 2026-03-22 20:49:01 +05:30
hookspecs.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
plugins.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
py.typed py.typed file so mypy picks up the types, closes #331 2021-11-14 15:21:04 -08:00
recipes.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
utils.py More type annotations (#697) 2025-12-16 22:11:47 -08:00