import { type MetaData, type MetaRoot, MetaObject } from "@metaobjectsdev/metadata"; import type { ColumnNamingStrategy } from "../metaobjects-config.js"; import type { ViewSpec } from "./view-spec.js"; export interface ExtractContext { readonly columnNamingStrategy: ColumnNamingStrategy; } /** * The physical view name for a projection — its read-only source `@table`, else * derived from the projection name. * * Exposed for the read-model generator (`renderProjectionDecl`), which needs the * view name but NOT the join/DDL resolution. Read-model generation works for a * standalone read-only view-entity (explicit columns, no `extends`); only * {@link extractViewSpec} — which generates the join-backed view DDL — requires a * base entity to extend. */ export declare function projectionViewName(projection: MetaObject, columnNamingStrategy: ColumnNamingStrategy): string; /** * FR-024 (ADR-0029): the entity NAMED by a node's dotted extends ref — the * owner part of `....` resolved as an object. Mirrors the * loader's `_refNamedOwner`: the ref names the anchor, never the physical * declaring ancestor of an inherited child. */ export declare function refNamedOwner(node: MetaData, root: MetaRoot): MetaObject | undefined; /** * Walk a projection's origin children to produce a ViewSpec. * * @param projection The projection entity (has a source[dbView] child * and extends a writable entity). * @param root The loader's MetaRoot — all top-level objects are * direct children of root (returned by `MetaDataLoader.load()` * or `MetaDataLoader.fromDirectory()` as `result.root`). * @param ctx Column naming strategy for SQL identifiers. */ export declare function extractViewSpec(projection: MetaObject, root: MetaRoot, ctx: ExtractContext): ViewSpec; //# sourceMappingURL=extract-view-spec.d.ts.map