import { m as DiscoveredSchemaTable, p as DiscoveredColumnMeta } from "./entity-config-OhC4Otkz.mjs"; import { Table } from "drizzle-orm"; //#region src/drizzle.d.ts /** * Every unique key on a table, as DB column-name tuples. Primary keys count — * fan-out detection asks "do these join columns cover a unique key?", and a PK * answers that as well as any explicit unique constraint. * * Returns `undefined` if reflection fails (non-pg table, or a drizzle version * without config access), meaning "unknown, cannot determine". Returns `[]` * when reflection succeeds and the table genuinely has none. That distinction * is load-bearing: `hasRichMeta` uses it to tell "metadata unavailable" from * "confirmed no constraints", and projection validation fails closed on the * former. */ export declare function buildUniqueConstraints(table: unknown): string[][] | undefined; /** * Per-column metadata (type, PK, nullability, FK edges) for a Drizzle table. * Structural only — no DB round-trip, so it is safe to recompute on every * heartbeat. FK reflection is best-effort; a non-Postgres table still gets * name/type/PK/nullable. */ export declare function buildColumnsMeta(table: Table): DiscoveredColumnMeta[]; /** * Derive Clivly's discovery shape (table + column names) from a Drizzle schema * object — the `* as schema` you pass to `drizzle(client, { schema })`. This * delivers the "reads your schema" promise for Drizzle hosts: no hand-authored * `DiscoveredTable[]`. Feed the result to the SDK's `schema` option, or diff it * against your entity config. * * Column names are the real database column names (e.g. `full_name`), not the * Drizzle property keys (`fullName`). Non-table values in the schema object * (relations, enums, helpers) are ignored. * * `drizzle-orm` is an **optional peer dependency** — you only need it installed * when you import this entry (`@clivly/core/drizzle`); the rest of `@clivly/core` * stays dependency-free. */ export declare function discoverFromDrizzle(schema: Record, options?: { allowEmpty?: boolean; }): DiscoveredSchemaTable[]; //#endregion