import type { SchemaMetadata } from './types'; /** * Single source of truth for the Cypher that materializes SDL-declared * constraints and indexes. Consumed by BOTH `OGM.assertIndexesAndConstraints` * (create-only, backwards-compatible behavior) and the CLI's `db push` * planner — so the two can never drift on statement shape or naming. * * Statement text for unique constraints and fulltext indexes is * byte-identical to what `assertIndexesAndConstraints` emitted before the * extraction (v1.9.0). Vector-index statements are new and used only by * `db push` (the SDL `@vector` directive carries no dimensions, so creation * needs per-index config). */ export interface SchemaStatement { kind: 'unique-constraint' | 'fulltext-index' | 'relationship-fulltext-index' | 'vector-index'; /** Constraint or index name as it appears in SHOW CONSTRAINTS/INDEXES. */ name: string; cypher: string; } /** Vector index awaiting creation config (dimensions are not in the SDL). */ export interface VectorIndexNeedingConfig { indexName: string; typeName: string; embeddingProperty: string; } export interface VectorIndexCreationConfig { dimensions: number; similarity?: 'cosine' | 'euclidean'; } /** Grafeo's unique-constraint naming convention: `{Label}_{prop}_unique`. */ export declare function uniqueConstraintName(label: string, prop: string): string; export declare function buildUniqueConstraintStatements(schema: SchemaMetadata): SchemaStatement[]; export declare function buildNodeFulltextStatements(schema: SchemaMetadata): SchemaStatement[]; /** * Resolve which relationship type carries a given `@relationshipProperties` * type. Mirrors `OGM.relPropsToRelType` (first relationship wins) but is * derived from the schema metadata alone, so callers without an OGM * instance (the CLI) get the identical mapping. */ export declare function resolveRelTypeForProps(schema: SchemaMetadata, propsTypeName: string): string; export declare function buildRelationshipFulltextStatements(schema: SchemaMetadata): SchemaStatement[]; /** * Vector indexes split two ways: those with creation config provided * (ready statements) and those without (reported, never silently skipped). */ export declare function buildVectorIndexStatements(schema: SchemaMetadata, vectorConfig: Record | undefined): { ready: SchemaStatement[]; needsConfig: VectorIndexNeedingConfig[]; }; //# sourceMappingURL=index-statements.d.ts.map