orchestrator
Top-level coordinator for the per-entity sync layout (ADR-0016).
Walks every entity adapter under super::entities in a fixed dependency
order. Authors are processed first because every other entity that carries
an author_id foreign-keys back to them; tags come next so per-entity
adapters can resolve embedded tag labels; then the project-scoped entities
land in an order that satisfies the remaining FKs.
fn import_all
pub async fn import_all(conn: &Connection, project_id: &Id, gest_dir: &Path) -> Result<(), Error>Import every per-entity file under gest_dir into SQLite.
| Parameter | Type | Description |
|---|---|---|
conn |
&Connection | the open database connection |
project_id |
&Id | the project whose rows are synced |
gest_dir |
&Path | the project’s .gest/ directory |
| returns | Result<(), Error> | () once every adapter has run, or the first error an adapter returns; later adapters then do not run. |
fn export_all
pub async fn export_all(conn: &Connection, project_id: &Id, gest_dir: &Path) -> Result<(), Error>Export every entity in SQLite to its per-entity file under gest_dir.
| Parameter | Type | Description |
|---|---|---|
conn |
&Connection | the open database connection |
project_id |
&Id | the project whose rows are synced |
gest_dir |
&Path | the project’s .gest/ directory |
| returns | Result<(), Error> | () once every adapter has run, or the first error an adapter returns; later adapters then do not run. |