/** * SchemaAST Builder * * Constructs a SchemaAST from: * - Entity metadata (decorator-based entities) * - Database introspection results (TableSchema[]) */ import type { EntityMeta, FieldOptions, Type } from '../type/index.js'; import type { NamingStrategy } from '../type/namingStrategy.js'; import { SchemaAST } from './schemaAST.js'; import type { ForeignKeyAction } from './types.js'; /** * Options for building SchemaAST from entities. */ export interface BuildFromEntitiesOptions { /** Custom table name resolver */ resolveTableName?: (entity: Type, meta: EntityMeta) => string; /** Custom column name resolver */ resolveColumnName?: (key: string, field: FieldOptions) => string; /** Naming strategy to use */ namingStrategy?: NamingStrategy; /** Default action for foreign key ON DELETE and ON UPDATE clauses */ defaultForeignKeyAction?: ForeignKeyAction; } /** * Builds SchemaAST instances from various sources. */ export declare class SchemaASTBuilder { private readonly namingStrategy?; private readonly defaultForeignKeyAction; private ast; constructor(namingStrategy?: NamingStrategy | undefined, defaultForeignKeyAction?: ForeignKeyAction); /** * Reset the builder for a new schema. */ reset(): this; /** * Get the built AST. */ getAST(): SchemaAST; /** * Build AST from entity classes (decorated with @Entity, @Field, etc.) */ fromEntities(entities: Type[], options?: BuildFromEntitiesOptions): SchemaAST; /** * Add a table from entity metadata. */ private addTableFromEntity; /** * Add relationships from entity relation decorators. */ private addRelationshipsFromEntity; /** * Add indexes from field options. */ private addIndexesFromEntity; } //# sourceMappingURL=schemaASTBuilder.d.ts.map