Expand description
Import functionality for the task-graph database.
Provides methods to import data from a JSON snapshot into the database. Supports multiple import modes:
- Fresh: Import into an empty database (fails if data exists)
- Replace: Clear existing project data and import (default with –force)
- Merge: Add missing items, skip or overwrite existing (future)
Handles foreign key constraints by:
- Deleting tables in reverse order (children first) when clearing
- Inserting tables in forward order (parents first) when importing
Rebuilds FTS indexes after import.
Structs§
- DryRun
Result - Result of a dry-run import preview. Shows what would happen without making any changes.
- Import
Options - Options for controlling import behavior.
- Import
Result - Result of an import operation.
Enums§
- Import
Mode - Import mode determining how to handle existing data.
Functions§
- remap_
snapshot - Remap all task IDs in a snapshot, generating fresh petname IDs for each task and updating all references (dependencies, attachments, tags, state history).
- snapshot_
root_ task_ ids - Extract root task IDs from a snapshot.