/** * DDL translator for the graph-database backend. * * Emits Cypher `CREATE NODE TABLE` + `CREATE REL TABLE` statements that * mirror the semantic shape of the DuckDB schema ({@link generateSchemaDDL}) * while honouring two architectural decisions from spec 004: * * 1. **Polymorphic rel tables, one per edge kind.** Each OCH relation * kind (24 live in `duckdb-adapter.ts:ALL_RELATION_TYPES` at the time * of writing — the v1.1 schema added `OWNED_BY` / `DEPENDS_ON` / * `FOUND_IN` past the spec 004 draft's "23 kinds" count) gets its own * named REL TABLE with multiple `FROM/TO` pairs. A single * `CodeRelation` table with a `type` discriminator column would * defeat columnar predicate push-down, so we fan out to keep the * planner honest. See the graph-db backend's * `cypher/data-definition/create-table` doc page. * * 2. **Source-level naming avoids banned clean-room literals.** OCH * uses `PROCESS_STEP` where a prior-art project used a different * identifier; this translator only ever emits `PROCESS_STEP` so * Cypher queries match the graph's own relation-type enum. * * The DuckDB schema collapses every node kind into a polymorphic `nodes` * table (`schema-ddl.ts`). For the graph-db backend we keep the same * collapse — a single `CodeNode` NODE TABLE — so graphHash parity (U1) is * straightforward: round-trips read the same column set from both stores. * Later ACs may split the table per kind once profile data justifies the * extra surface area. */ export interface GraphDbSchemaOptions { /** Dimension for the fixed-size FLOAT array used by the embedding rel. */ readonly embeddingDim?: number; } /** * Exported for the round-trip parity tests so they can compare against * the same source of truth as the DDL emitter. */ export declare function getAllRelationTypes(): readonly string[]; /** * Returns the complete Cypher DDL as a single string — statements separated * by `;` so callers can split on that boundary if they need per-statement * execution. The last statement carries a trailing `;` for symmetry. */ export declare function generateSchemaDdl(opts?: GraphDbSchemaOptions): string; //# sourceMappingURL=graphdb-schema.d.ts.map