@prisma-next/sql-schema-ir 0.14.0 → 0.15.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { _ as SqlCheckConstraintIR, a as SqlTableIR, b as PrimaryKeyInput, c as SqlUniqueIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlColumnIRInput, h as SqlColumnIR, i as SqlSchemaIRInput, l as SqlIndexIR, m as SqlAnnotations, n as SqlTypeMetadataRegistry, o as SqlTableIRInput, p as SqlReferentialAction, r as SqlSchemaIR, s as SqlUniqueIR, t as SqlTypeMetadata, u as SqlIndexIRInput, v as SqlCheckConstraintIRInput, x as SqlSchemaIRNode, y as PrimaryKey } from "../types-Du44_nsJ.mjs";
2
- export { PrimaryKey, type PrimaryKeyInput, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput };
1
+ import { C as relationalNodeGranularity, D as assertNode, E as SqlSchemaIRNode, O as defineNonEnumerable, S as relationalNodeEntityKind, T as PrimaryKeyInput, _ as SqlColumnDefaultIR, a as SqlTableIR, b as SqlCheckConstraintIRInput, c as SqlUniqueIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlColumnIRInput, h as SqlColumnIR, i as SqlSchemaIRInput, l as SqlIndexIR, m as SqlAnnotations, n as SqlTypeMetadataRegistry, o as SqlTableIRInput, p as SqlReferentialAction, r as SqlSchemaIR, s as SqlUniqueIR, t as SqlTypeMetadata, u as SqlIndexIRInput, v as SqlColumnDefaultIRInput, w as PrimaryKey, x as RelationalSchemaNodeKind, y as SqlCheckConstraintIR } from "../types-CeJhPT7f.mjs";
2
+ export { PrimaryKey, type PrimaryKeyInput, RelationalSchemaNodeKind, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnDefaultIR, type SqlColumnDefaultIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -1,2 +1,2 @@
1
- import { a as SqlForeignKeyIR, c as PrimaryKey, i as SqlIndexIR, l as SqlSchemaIRNode, n as SqlTableIR, o as SqlColumnIR, r as SqlUniqueIR, s as SqlCheckConstraintIR, t as SqlSchemaIR } from "../types-C0WFfEkA.mjs";
2
- export { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR };
1
+ import { a as SqlForeignKeyIR, c as SqlCheckConstraintIR, d as assertNode, f as defineNonEnumerable, h as relationalNodeGranularity, i as SqlIndexIR, l as PrimaryKey, m as relationalNodeEntityKind, n as SqlTableIR, o as SqlColumnIR, p as RelationalSchemaNodeKind, r as SqlUniqueIR, s as SqlColumnDefaultIR, t as SqlSchemaIR, u as SqlSchemaIRNode } from "../types-pxgoVAJq.mjs";
2
+ export { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnDefaultIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as SqlCheckConstraintIR, a as SqlTableIR, b as PrimaryKeyInput, c as SqlUniqueIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlColumnIRInput, h as SqlColumnIR, i as SqlSchemaIRInput, l as SqlIndexIR, m as SqlAnnotations, n as SqlTypeMetadataRegistry, o as SqlTableIRInput, p as SqlReferentialAction, r as SqlSchemaIR, s as SqlUniqueIR, t as SqlTypeMetadata, u as SqlIndexIRInput, v as SqlCheckConstraintIRInput, x as SqlSchemaIRNode, y as PrimaryKey } from "./types-Du44_nsJ.mjs";
2
- export { PrimaryKey, type PrimaryKeyInput, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput };
1
+ import { C as relationalNodeGranularity, D as assertNode, E as SqlSchemaIRNode, O as defineNonEnumerable, S as relationalNodeEntityKind, T as PrimaryKeyInput, _ as SqlColumnDefaultIR, a as SqlTableIR, b as SqlCheckConstraintIRInput, c as SqlUniqueIRInput, d as SqlForeignKeyIR, f as SqlForeignKeyIRInput, g as SqlColumnIRInput, h as SqlColumnIR, i as SqlSchemaIRInput, l as SqlIndexIR, m as SqlAnnotations, n as SqlTypeMetadataRegistry, o as SqlTableIRInput, p as SqlReferentialAction, r as SqlSchemaIR, s as SqlUniqueIR, t as SqlTypeMetadata, u as SqlIndexIRInput, v as SqlColumnDefaultIRInput, w as PrimaryKey, x as RelationalSchemaNodeKind, y as SqlCheckConstraintIR } from "./types-CeJhPT7f.mjs";
2
+ export { PrimaryKey, type PrimaryKeyInput, RelationalSchemaNodeKind, type SqlAnnotations, SqlCheckConstraintIR, type SqlCheckConstraintIRInput, SqlColumnDefaultIR, type SqlColumnDefaultIRInput, SqlColumnIR, type SqlColumnIRInput, SqlForeignKeyIR, type SqlForeignKeyIRInput, SqlIndexIR, type SqlIndexIRInput, type SqlReferentialAction, SqlSchemaIR, type SqlSchemaIRInput, SqlSchemaIRNode, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as SqlForeignKeyIR, c as PrimaryKey, i as SqlIndexIR, l as SqlSchemaIRNode, n as SqlTableIR, o as SqlColumnIR, r as SqlUniqueIR, s as SqlCheckConstraintIR, t as SqlSchemaIR } from "./types-C0WFfEkA.mjs";
2
- export { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR };
1
+ import { a as SqlForeignKeyIR, c as SqlCheckConstraintIR, d as assertNode, f as defineNonEnumerable, h as relationalNodeGranularity, i as SqlIndexIR, l as PrimaryKey, m as relationalNodeEntityKind, n as SqlTableIR, o as SqlColumnIR, p as RelationalSchemaNodeKind, r as SqlUniqueIR, s as SqlColumnDefaultIR, t as SqlSchemaIR, u as SqlSchemaIRNode } from "./types-pxgoVAJq.mjs";
2
+ export { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnDefaultIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR, assertNode, defineNonEnumerable, relationalNodeEntityKind, relationalNodeGranularity };
@@ -0,0 +1,624 @@
1
+ import { IRNodeBase } from "@prisma-next/framework-components/ir";
2
+ import { DiffSubjectGranularity, DiffableNode, SchemaNodeRef } from "@prisma-next/framework-components/control";
3
+ import { ColumnDefault } from "@prisma-next/contract/types";
4
+ import { CodecRef } from "@prisma-next/framework-components/codec";
5
+
6
+ //#region src/ir/sql-schema-ir-node.d.ts
7
+ /**
8
+ * SQL Schema IR node base. Carries the family-level
9
+ * `kind = 'sql-schema-ir'` discriminator and inherits the framework's
10
+ * `freezeNode` affordance.
11
+ *
12
+ * SQL Schema IR represents the actual database state as discovered by
13
+ * introspection (the parallel to SQL Contract IR, which represents the
14
+ * desired state).
15
+ *
16
+ * The discriminator is installed as a non-enumerable own property,
17
+ * matching the SqlNode pattern. This keeps `JSON.stringify(node)`
18
+ * canonical (no `kind` field), keeps `toEqual({...})` test assertions
19
+ * against pre-lift flat shapes passing, and keeps `node.kind` readable
20
+ * for dispatch.
21
+ *
22
+ * Both `kind` and `nodeKind` are required: every concrete leaf is a node
23
+ * the generic differ can pair and compare, so every leaf must declare which
24
+ * node it is. `nodeKind` has no default here — every direct subclass sets its
25
+ * own literal value (the relational leaves via `RelationalSchemaNodeKind`,
26
+ * target concretions via their own vocabulary, e.g. `PostgresSchemaNodeKind`).
27
+ */
28
+ declare abstract class SqlSchemaIRNode extends IRNodeBase {
29
+ readonly kind: string;
30
+ /**
31
+ * Enumerable discriminant identifying which node this is (column / primary
32
+ * key / foreign key / unique / index / check / database / namespace /
33
+ * table / policy / role / …). Concretions set a unique value; the
34
+ * `.is`/`.assert` guards compare against it. Unlike `kind`, it is
35
+ * enumerable, so it survives a spread that flattens a node into a plain
36
+ * object.
37
+ */
38
+ abstract readonly nodeKind: string;
39
+ constructor();
40
+ }
41
+ /**
42
+ * Asserts `node` matches `predicate`, narrowing its type to `T`. The one
43
+ * shared implementation every node class's `static assert` and `isEqualTo`
44
+ * reach for, instead of each hand-writing its own throw: the message names
45
+ * the class the caller expected.
46
+ */
47
+ declare function assertNode<T extends SqlSchemaIRNode>(node: SqlSchemaIRNode | undefined, className: string, predicate: (node: SqlSchemaIRNode) => node is T): asserts node is T;
48
+ /**
49
+ * Defines a non-enumerable own property, the same treatment `kind` gets
50
+ * above: a derivation-time render-support field stays out of
51
+ * `JSON.stringify`, `toEqual({...})` structural assertions, and spreads,
52
+ * while remaining directly readable (`node.field`) for the one consumer
53
+ * that resolves it at plan time. A no-op when `value` is `undefined` — the
54
+ * property is simply absent, matching every other optional field on these
55
+ * nodes.
56
+ */
57
+ declare function defineNonEnumerable<T extends object>(target: T, key: string, value: unknown): void;
58
+ //#endregion
59
+ //#region src/ir/primary-key.d.ts
60
+ interface PrimaryKeyInput {
61
+ readonly columns: readonly string[];
62
+ readonly name?: string;
63
+ /**
64
+ * The key's own column nodes, as root-anchored chains. The derivation
65
+ * stamps them so the primary key is dropped before the columns it is built
66
+ * on. Never compared by `isEqualTo`.
67
+ */
68
+ readonly dependsOn?: readonly SchemaNodeRef[];
69
+ }
70
+ /**
71
+ * Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`
72
+ * shape (same `columns` + optional `name`) so verification can compare
73
+ * intent and actual structurally. Defined here independently to avoid
74
+ * a sql-schema-ir -> sql-contract dependency.
75
+ *
76
+ * Implements `DiffableNode` so a primary key is directly a table's diff-tree
77
+ * child. `id` is a fixed sentinel — a table has at most one primary key, so
78
+ * there is never a sibling to disambiguate against. `isEqualTo` compares the
79
+ * column tuple; the PK's own `name` is a database-assigned label with no
80
+ * semantic weight, so it is not compared (mirrors the policy node's
81
+ * name-insensitivity to non-identifying detail).
82
+ */
83
+ declare class PrimaryKey extends SqlSchemaIRNode implements DiffableNode {
84
+ readonly nodeKind: "sql-primary-key";
85
+ readonly columns: readonly string[];
86
+ readonly name?: string;
87
+ /** See {@link PrimaryKeyInput.dependsOn}. Non-enumerable so it stays out of JSON and structural equality, matching `SqlColumnIR.codecRef`. */
88
+ readonly dependsOn?: readonly SchemaNodeRef[];
89
+ constructor(input: PrimaryKeyInput);
90
+ get id(): string;
91
+ children(): readonly DiffableNode[];
92
+ static is(node: SqlSchemaIRNode): node is PrimaryKey;
93
+ isEqualTo(other: DiffableNode): boolean;
94
+ }
95
+ //#endregion
96
+ //#region src/ir/schema-node-kinds.d.ts
97
+ /**
98
+ * The `nodeKind` discriminant for each relational schema-diff leaf node.
99
+ * Each node carries a unique value; the differ pairs siblings by `id`, and
100
+ * these kinds distinguish the node types that appear as `PostgresTableSchemaNode`
101
+ * children (columns, primary key, foreign keys, uniques, indexes, checks) from
102
+ * each other and from the RLS policy/role kinds a target defines separately.
103
+ */
104
+ declare const RelationalSchemaNodeKind: {
105
+ readonly schema: "sql-schema";
106
+ readonly table: "sql-table";
107
+ readonly column: "sql-column";
108
+ readonly columnDefault: "sql-column-default";
109
+ readonly primaryKey: "sql-primary-key";
110
+ readonly foreignKey: "sql-foreign-key";
111
+ readonly unique: "sql-unique";
112
+ readonly index: "sql-index";
113
+ readonly check: "sql-check-constraint";
114
+ };
115
+ type RelationalSchemaNodeKind = (typeof RelationalSchemaNodeKind)[keyof typeof RelationalSchemaNodeKind];
116
+ /**
117
+ * Looks up the subject granularity for a relational `nodeKind`. Throws for a
118
+ * `nodeKind` outside this map (a target-specific kind, e.g. Postgres's
119
+ * namespace/table/policy/role) — those map their own kinds directly rather
120
+ * than through this family-level map.
121
+ */
122
+ declare function relationalNodeGranularity(nodeKind: string): DiffSubjectGranularity;
123
+ /**
124
+ * Looks up the storage `entityKind` for a relational `nodeKind` — sibling of
125
+ * {@link relationalNodeGranularity}, resolved by `nodeKind` equality against
126
+ * {@link RELATIONAL_NODE_ENTITY_KIND}. `undefined` for a target-specific kind
127
+ * (targets map their own kinds directly) or a relational kind with no entity
128
+ * of its own.
129
+ */
130
+ declare function relationalNodeEntityKind(nodeKind: string): string | undefined;
131
+ //#endregion
132
+ //#region src/ir/sql-check-constraint-ir.d.ts
133
+ interface SqlCheckConstraintIRInput {
134
+ /** Constraint name as stored in the database catalog. */
135
+ readonly name: string;
136
+ /** Column the check restricts. */
137
+ readonly column: string;
138
+ /** Permitted values the column must be IN. */
139
+ readonly permittedValues: readonly string[];
140
+ }
141
+ /**
142
+ * Schema IR node for a table-level check constraint that restricts a
143
+ * column to a set of permitted values (an enum-style `IN (...)` check).
144
+ *
145
+ * Carries the **resolved values** rather than a raw SQL predicate so
146
+ * callers can compare value-sets without parsing SQL.
147
+ *
148
+ * Implements `DiffableNode` so a check constraint is directly a table's
149
+ * diff-tree child: `id` is the constraint name. `isEqualTo` compares
150
+ * `column` and the permitted-value set (order-insensitive — the database
151
+ * does not guarantee `IN (...)` ordering).
152
+ */
153
+ declare class SqlCheckConstraintIR extends SqlSchemaIRNode implements DiffableNode {
154
+ readonly nodeKind: "sql-check-constraint";
155
+ readonly name: string;
156
+ readonly column: string;
157
+ readonly permittedValues: readonly string[];
158
+ constructor(input: SqlCheckConstraintIRInput);
159
+ get id(): string;
160
+ children(): readonly DiffableNode[];
161
+ static is(node: SqlSchemaIRNode): node is SqlCheckConstraintIR;
162
+ /**
163
+ * Compares the permitted-value sets only (unordered), matching the
164
+ * relational walk's `verifyCheckConstraints`: two checks pairing by name
165
+ * compare their value sets — the `column` field is descriptive, not part
166
+ * of the comparison, so a name-paired check with equal values verifies
167
+ * regardless of which column carries it.
168
+ */
169
+ isEqualTo(other: DiffableNode): boolean;
170
+ }
171
+ //#endregion
172
+ //#region src/ir/sql-column-default-ir.d.ts
173
+ interface SqlColumnDefaultIRInput {
174
+ /** Structured resolved default (contract-declared or normalizer-parsed). */
175
+ readonly resolved?: ColumnDefault;
176
+ /** Raw database default expression, when known (introspected side). */
177
+ readonly raw?: string;
178
+ /**
179
+ * Native-type context for temporal literal normalization — the owning
180
+ * column's resolved native type.
181
+ */
182
+ readonly nativeTypeContext?: string;
183
+ /**
184
+ * The owning column's array-ness, threaded through so the planner's
185
+ * set-default op-builder can render an array-literal default (e.g.
186
+ * `ARRAY[...]`) the same way the pre-`plan(start, end)` op-path did. See
187
+ * {@link import('./sql-column-ir').SqlColumnIRInput.many}.
188
+ */
189
+ readonly many?: boolean;
190
+ }
191
+ /**
192
+ * Schema-diff node for a column's default value. The default is the one
193
+ * column attribute with an extra/missing/drift lifecycle of its own, so it
194
+ * is a child node of the column rather than a compared attribute: an
195
+ * undeclared live default surfaces as `not-expected`, a declared default the
196
+ * database lacks as `not-found`, and a divergent value as `not-equal` — the
197
+ * three reasons cover the legacy `extra_default` / `default_missing` /
198
+ * `default_mismatch` vocabulary with no attribute inspection.
199
+ *
200
+ * `id` is a fixed sentinel — a column has at most one default. Built
201
+ * transiently by `SqlColumnIR.children()` from the column's own fields;
202
+ * never constructed by derivation or introspection directly.
203
+ */
204
+ declare class SqlColumnDefaultIR extends SqlSchemaIRNode implements DiffableNode {
205
+ readonly nodeKind: "sql-column-default";
206
+ readonly resolved?: ColumnDefault;
207
+ readonly raw?: string;
208
+ readonly nativeTypeContext?: string;
209
+ /** See {@link SqlColumnDefaultIRInput.many}. Non-enumerable so it stays out of JSON and structural equality. */
210
+ readonly many?: boolean;
211
+ constructor(input: SqlColumnDefaultIRInput);
212
+ get id(): string;
213
+ children(): readonly DiffableNode[];
214
+ static is(node: SqlSchemaIRNode): node is SqlColumnDefaultIR;
215
+ /**
216
+ * Structured comparison with `this` as the expected side: both sides
217
+ * resolved compare per the relational walk's `columnDefaultsEqual`
218
+ * semantics; a declared expected default against an unparseable actual
219
+ * (raw present, no resolved parse) is a mismatch; two raw-only nodes fall
220
+ * back to raw string equality.
221
+ */
222
+ isEqualTo(other: DiffableNode): boolean;
223
+ }
224
+ //#endregion
225
+ //#region src/ir/sql-column-ir.d.ts
226
+ /**
227
+ * Namespaced annotations for extensibility. Each namespace
228
+ * (e.g. `pg`, `pgvector`) owns its annotations subtree.
229
+ */
230
+ type SqlAnnotations = {
231
+ readonly [namespace: string]: unknown;
232
+ };
233
+ interface SqlColumnIRInput {
234
+ readonly name: string;
235
+ readonly nativeType: string;
236
+ readonly nullable: boolean;
237
+ /** Raw database default expression (e.g. `'hello'::text`, `nextval('seq')`). */
238
+ readonly default?: string;
239
+ readonly annotations?: SqlAnnotations;
240
+ /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
241
+ readonly many?: boolean;
242
+ /**
243
+ * Fully resolved native type, comparable across the two diff sides:
244
+ * the contract-derived side stamps the codec-expanded type (typeRef
245
+ * resolved, parameterized types expanded, `[]` appended for arrays);
246
+ * the introspected side stamps the target-normalized type with the same
247
+ * `[]` convention. Stamped at construction by derivation/introspection;
248
+ * absent on raw hand-built nodes.
249
+ */
250
+ readonly resolvedNativeType?: string;
251
+ /**
252
+ * Structured default, comparable across the two diff sides: the
253
+ * contract-derived side stamps the contract's `ColumnDefault`; the
254
+ * introspected side stamps the target default-normalizer's parse of the
255
+ * raw expression. Absent when the column declares no default, or when
256
+ * the introspected raw default could not be parsed.
257
+ */
258
+ readonly resolvedDefault?: ColumnDefault;
259
+ /**
260
+ * The column's resolved codec reference — the identity the migration
261
+ * planner's op-builders resolve DDL type rendering against at plan time
262
+ * (parameterized type expansion, e.g. `character` + `{ length: 36 }` →
263
+ * `character(36)`), calling the same codec hooks the pre-`plan(start,
264
+ * end)` op-path called. Carried the same way the query AST carries
265
+ * `CodecRef` (TML-2456) and the migration DDL renderer (TML-2918).
266
+ * Stamped on the EXPECTED (contract-derived) column at derivation,
267
+ * post-`typeRef` resolution (the referenced storage type's own
268
+ * codec/params, not the column's `typeRef` pointer). Absent on
269
+ * introspected/hand-built nodes — the actual side never renders DDL —
270
+ * and never compared by `isEqualTo`.
271
+ */
272
+ readonly codecRef?: CodecRef;
273
+ /**
274
+ * The column's resolved BASE native type: pre-parameter-expansion,
275
+ * pre-array-suffix (e.g. `character`, not `character(36)` or
276
+ * `character[]`). Distinct from {@link resolvedNativeType} (the EXPANDED
277
+ * comparison value) — DDL rendering re-expands a parameterized type at
278
+ * plan time from this base, so it must not already carry the expansion.
279
+ * Stamped alongside {@link codecRef}.
280
+ */
281
+ readonly codecBaseNativeType?: string;
282
+ /**
283
+ * True when the contract column declared its type via a named
284
+ * `storage.types` reference (`typeRef`) rather than inline fields — the
285
+ * migration planner quotes the base native type as an identifier in this
286
+ * case (e.g. a native enum's type name), matching the pre-`plan(start,
287
+ * end)` rendering exactly.
288
+ */
289
+ readonly codecNamedType?: boolean;
290
+ }
291
+ /**
292
+ * Schema IR node for a single column on a table, as observed by
293
+ * introspection. Unlike the Contract IR `StorageColumn`, this carries
294
+ * the column's `name` (Schema IR columns are returned as arrays from
295
+ * introspection queries; the parent table re-keys them into a record
296
+ * for downstream consumers).
297
+ *
298
+ * Implements `DiffableNode` so a column is directly a table's diff-tree
299
+ * child: `id` is the column name (unique among a table's columns); `isEqualTo`
300
+ * compares this column's own attributes only — never children, since a
301
+ * column is a leaf. When both sides carry `resolvedNativeType` (stamped at
302
+ * derivation/introspection), the comparison uses the resolved values —
303
+ * resolved native type, nullability, and structured default equality per
304
+ * the relational walk's `columnDefaultsEqual` semantics, with `this` as the
305
+ * expected side. Otherwise it falls back to comparing raw fields.
306
+ */
307
+ declare class SqlColumnIR extends SqlSchemaIRNode implements DiffableNode {
308
+ readonly nodeKind: "sql-column";
309
+ readonly name: string;
310
+ readonly nativeType: string;
311
+ readonly nullable: boolean;
312
+ readonly default?: string;
313
+ readonly annotations?: SqlAnnotations;
314
+ /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
315
+ readonly many?: boolean;
316
+ readonly resolvedNativeType?: string;
317
+ readonly resolvedDefault?: ColumnDefault;
318
+ /** See {@link SqlColumnIRInput.codecRef}. Non-enumerable so it stays out of JSON and structural equality. */
319
+ readonly codecRef?: CodecRef;
320
+ /** See {@link SqlColumnIRInput.codecBaseNativeType}. Non-enumerable, same reason as {@link codecRef}. */
321
+ readonly codecBaseNativeType?: string;
322
+ /** See {@link SqlColumnIRInput.codecNamedType}. Non-enumerable, same reason as {@link codecRef}. */
323
+ readonly codecNamedType?: boolean;
324
+ constructor(input: SqlColumnIRInput);
325
+ get id(): string;
326
+ /**
327
+ * The column's default, when declared/present, is the column's one child
328
+ * node — it has an extra/missing/drift lifecycle of its own, so the differ
329
+ * recurses to it rather than `isEqualTo` comparing it. Built transiently
330
+ * from this column's own fields.
331
+ */
332
+ children(): readonly DiffableNode[];
333
+ static is(node: SqlSchemaIRNode): node is SqlColumnIR;
334
+ /**
335
+ * Compares the column's own attributes only — the default lives on the
336
+ * child node. When both sides carry `resolvedNativeType`, the resolved
337
+ * value governs (array-ness rides on its `[]` suffix); otherwise raw
338
+ * fields compare.
339
+ */
340
+ isEqualTo(other: DiffableNode): boolean;
341
+ }
342
+ //#endregion
343
+ //#region src/ir/sql-foreign-key-ir.d.ts
344
+ type SqlReferentialAction = 'noAction' | 'restrict' | 'cascade' | 'setNull' | 'setDefault';
345
+ interface SqlForeignKeyIRInput {
346
+ readonly columns: readonly string[];
347
+ readonly referencedTable: string;
348
+ readonly referencedColumns: readonly string[];
349
+ /** Schema (namespace) of the referenced table — populated by adapters that introspect cross-schema FKs. */
350
+ readonly referencedSchema?: string;
351
+ readonly name?: string;
352
+ readonly onDelete?: SqlReferentialAction;
353
+ readonly onUpdate?: SqlReferentialAction;
354
+ readonly annotations?: SqlAnnotations;
355
+ /**
356
+ * The real live DDL namespace of the referenced table, comparable across
357
+ * the two diff sides. Contract-derived trees stamp it explicitly (resolving
358
+ * namespace ids — including the unbound sentinel — to the DDL namespace);
359
+ * introspected FKs default it to `referencedSchema`, whose value already
360
+ * is the live namespace. Folded into `id` in place of the raw value so an
361
+ * unbound-namespace contract FK pairs with its introspected counterpart.
362
+ */
363
+ readonly resolvedReferencedNamespace?: string;
364
+ /**
365
+ * The referenced table's node, as the root-anchored chain the differ pairs
366
+ * siblings with. Stamped by the derivation, which holds the parent
367
+ * (database/namespace) context the chain's shape depends on. Never
368
+ * compared by `isEqualTo`.
369
+ */
370
+ readonly dependsOn?: readonly SchemaNodeRef[];
371
+ }
372
+ /**
373
+ * Schema IR node for a foreign-key constraint as observed by
374
+ * introspection. The `referencedTable` / `referencedColumns` field
375
+ * names match the introspection vocabulary (`pg_constraint.confkey`,
376
+ * etc.) and intentionally differ from the Contract IR's nested
377
+ * `references: { table, columns }` shape so that the verifier's
378
+ * structural comparison stays explicit about which side it's reading.
379
+ *
380
+ * Implements `DiffableNode` so a foreign key is directly a table's diff-tree
381
+ * child. Foreign keys are frequently unnamed (introspection may not carry a
382
+ * constraint name, and the contract side never invents one), so `id` is
383
+ * derived from the referencing/referenced coordinates rather than `name` —
384
+ * the same tuple that makes two FK constraints the same constraint. This
385
+ * also serves as the comparison key: two FKs with the same coordinates are
386
+ * paired by the differ, and `isEqualTo` then compares the remaining
387
+ * attribute — the referential actions.
388
+ */
389
+ declare class SqlForeignKeyIR extends SqlSchemaIRNode implements DiffableNode {
390
+ readonly nodeKind: "sql-foreign-key";
391
+ readonly columns: readonly string[];
392
+ readonly referencedTable: string;
393
+ readonly referencedColumns: readonly string[];
394
+ readonly referencedSchema?: string;
395
+ readonly name?: string;
396
+ readonly onDelete?: SqlReferentialAction;
397
+ readonly onUpdate?: SqlReferentialAction;
398
+ readonly annotations?: SqlAnnotations;
399
+ readonly resolvedReferencedNamespace?: string;
400
+ /** See {@link SqlForeignKeyIRInput.dependsOn}. Non-enumerable so it stays out of JSON and structural equality, matching `SqlColumnIR.codecRef`. */
401
+ readonly dependsOn?: readonly SchemaNodeRef[];
402
+ constructor(input: SqlForeignKeyIRInput);
403
+ get id(): string;
404
+ children(): readonly DiffableNode[];
405
+ static is(node: SqlSchemaIRNode): node is SqlForeignKeyIR;
406
+ /**
407
+ * Referential-action comparison with `this` as the expected side, matching
408
+ * the relational walk's `getReferentialActionMismatches`: `noAction` is the
409
+ * database default and equivalent to an undeclared action, and drift is
410
+ * flagged only when the expected side declares a (normalized) action.
411
+ */
412
+ isEqualTo(other: DiffableNode): boolean;
413
+ }
414
+ //#endregion
415
+ //#region src/ir/sql-index-ir.d.ts
416
+ interface SqlIndexIRInput {
417
+ readonly columns: readonly string[];
418
+ readonly unique: boolean;
419
+ readonly name?: string;
420
+ readonly type?: string;
421
+ readonly options?: Record<string, unknown>;
422
+ readonly annotations?: SqlAnnotations;
423
+ /**
424
+ * The index's own column nodes, as root-anchored chains. The derivation
425
+ * stamps them so an index is dropped before the columns it is built on
426
+ * (Postgres auto-drops the index when a covered column goes). Never
427
+ * compared by `isEqualTo`.
428
+ */
429
+ readonly dependsOn?: readonly SchemaNodeRef[];
430
+ }
431
+ /**
432
+ * Schema IR node for a secondary index as observed by introspection.
433
+ * Unlike the Contract IR `Index`, the Schema IR carries an explicit
434
+ * `unique` field — introspection sees the underlying index regardless
435
+ * of whether the user expressed it as `@@index` or `@@unique`, and the
436
+ * verifier needs to distinguish them when comparing to the Contract.
437
+ *
438
+ * Implements `DiffableNode` so an index is directly a table's diff-tree
439
+ * child. Indexes are frequently unnamed, so `id` is derived from the column
440
+ * tuple — the same tuple that makes two indexes the same index, so it
441
+ * doubles as the pairing key. `isEqualTo` is symmetric structural equality
442
+ * on the remaining attributes: `unique`, `type`, and `options`. A unique
443
+ * index and a non-unique index on the same columns are different objects
444
+ * and are not equal — there is no "stronger satisfies weaker".
445
+ *
446
+ * Deliberately column-tuple-only (not `unique`): a contract `@@index`
447
+ * (non-unique) must still pair against a live unique index of the same
448
+ * columns so the differ can report the mismatch as an incompatible index
449
+ * change rather than a spurious missing+extra pair — see
450
+ * `planner.unique-index-structural.test.ts`. The corollary is that two
451
+ * indexes legitimately coexisting on one table with the *same* column tuple
452
+ * (e.g. a unique index and a redundant plain index Postgres has no problem
453
+ * hosting side by side) collide on this id; the postgres control adapter's
454
+ * introspection keeps only one such index per table+column-tuple rather
455
+ * than handing the differ two same-tree siblings it cannot represent.
456
+ */
457
+ declare class SqlIndexIR extends SqlSchemaIRNode implements DiffableNode {
458
+ readonly nodeKind: "sql-index";
459
+ readonly columns: readonly string[];
460
+ readonly unique: boolean;
461
+ readonly name?: string;
462
+ readonly type?: string;
463
+ readonly options?: Record<string, unknown>;
464
+ readonly annotations?: SqlAnnotations;
465
+ /** See {@link SqlIndexIRInput.dependsOn}. Non-enumerable so it stays out of JSON and structural equality, matching `SqlColumnIR.codecRef`. */
466
+ readonly dependsOn?: readonly SchemaNodeRef[];
467
+ constructor(input: SqlIndexIRInput);
468
+ get id(): string;
469
+ children(): readonly DiffableNode[];
470
+ static is(node: SqlSchemaIRNode): node is SqlIndexIR;
471
+ /**
472
+ * Symmetric structural equality: two paired index nodes are equal iff their
473
+ * `unique` flag, `type`, and (loosely-compared) `options` all match. There
474
+ * is no satisfaction — a unique index does not equal a non-unique index.
475
+ * `options` compares loosely (introspection stringifies reloptions); `type`
476
+ * compares strictly after the introspection-side btree→undefined
477
+ * normalization done at construction.
478
+ */
479
+ isEqualTo(other: DiffableNode): boolean;
480
+ }
481
+ //#endregion
482
+ //#region src/ir/sql-unique-ir.d.ts
483
+ interface SqlUniqueIRInput {
484
+ readonly columns: readonly string[];
485
+ readonly name?: string;
486
+ readonly annotations?: SqlAnnotations;
487
+ /**
488
+ * The constraint's own column nodes, as root-anchored chains. The
489
+ * derivation stamps them so a unique constraint is dropped before the
490
+ * columns it is built on. Never compared by `isEqualTo`.
491
+ */
492
+ readonly dependsOn?: readonly SchemaNodeRef[];
493
+ }
494
+ /**
495
+ * Schema IR node for a table-level unique constraint as observed by
496
+ * introspection.
497
+ *
498
+ * Implements `DiffableNode` so a unique constraint is directly a table's
499
+ * diff-tree child. Unique constraints are frequently unnamed, so `id` is
500
+ * derived from the column tuple rather than `name` — the column tuple is
501
+ * also what makes two unique constraints the same constraint, so it doubles
502
+ * as the pairing key. There are no further attributes to compare once
503
+ * columns are equal (the differ pairs on `id`), so `isEqualTo` is identity.
504
+ */
505
+ declare class SqlUniqueIR extends SqlSchemaIRNode implements DiffableNode {
506
+ readonly nodeKind: "sql-unique";
507
+ readonly columns: readonly string[];
508
+ readonly name?: string;
509
+ readonly annotations?: SqlAnnotations;
510
+ /** See {@link SqlUniqueIRInput.dependsOn}. Non-enumerable so it stays out of JSON and structural equality, matching `SqlColumnIR.codecRef`. */
511
+ readonly dependsOn?: readonly SchemaNodeRef[];
512
+ constructor(input: SqlUniqueIRInput);
513
+ get id(): string;
514
+ children(): readonly DiffableNode[];
515
+ static is(node: SqlSchemaIRNode): node is SqlUniqueIR;
516
+ isEqualTo(other: DiffableNode): boolean;
517
+ }
518
+ //#endregion
519
+ //#region src/ir/sql-table-ir.d.ts
520
+ interface SqlTableIRInput {
521
+ readonly name: string;
522
+ readonly columns: Record<string, SqlColumnIR | SqlColumnIRInput>;
523
+ readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR | SqlForeignKeyIRInput>;
524
+ readonly uniques: ReadonlyArray<SqlUniqueIR | SqlUniqueIRInput>;
525
+ readonly indexes: ReadonlyArray<SqlIndexIR | SqlIndexIRInput>;
526
+ readonly primaryKey?: PrimaryKey | PrimaryKeyInput;
527
+ readonly annotations?: SqlAnnotations;
528
+ /** Optional check constraints for enum-restricted columns. Omitted when none present. */
529
+ readonly checks?: ReadonlyArray<SqlCheckConstraintIR | SqlCheckConstraintIRInput>;
530
+ }
531
+ /**
532
+ * Schema IR node for a single table as observed by introspection.
533
+ *
534
+ * Unlike the Contract IR `StorageTable`, this carries the table's
535
+ * `name` — introspection queries return tables as arrays and the
536
+ * verifier keys them into `SqlSchemaIR.tables` afterwards, so the name
537
+ * stays on the table object for downstream call sites that walk
538
+ * `Object.values(schema.tables)`.
539
+ *
540
+ * The constructor normalises nested IR-class fields so downstream
541
+ * walks see a uniform AST regardless of whether the input was a
542
+ * plain-data literal (from introspection) or already-constructed
543
+ * class instances.
544
+ *
545
+ * Implements `DiffableNode` so a flat (single-schema) tree is directly
546
+ * diffable: `id` is the table name; `isEqualTo` is identity (the table's
547
+ * structural drift is entirely expressed by its children); `children()`
548
+ * yields every column, the primary key (when present), every foreign key,
549
+ * unique, index, and check constraint — the same composition and order as
550
+ * the Postgres table node, minus policies.
551
+ */
552
+ declare class SqlTableIR extends SqlSchemaIRNode implements DiffableNode {
553
+ readonly nodeKind: "sql-table";
554
+ readonly name: string;
555
+ readonly columns: Readonly<Record<string, SqlColumnIR>>;
556
+ readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR>;
557
+ readonly uniques: ReadonlyArray<SqlUniqueIR>;
558
+ readonly indexes: ReadonlyArray<SqlIndexIR>;
559
+ readonly primaryKey?: PrimaryKey;
560
+ readonly annotations?: SqlAnnotations;
561
+ readonly checks?: ReadonlyArray<SqlCheckConstraintIR>;
562
+ constructor(input: SqlTableIRInput);
563
+ get id(): string;
564
+ isEqualTo(other: DiffableNode): boolean;
565
+ children(): readonly DiffableNode[];
566
+ }
567
+ //#endregion
568
+ //#region src/ir/sql-schema-ir.d.ts
569
+ interface SqlSchemaIRInput {
570
+ readonly tables: Record<string, SqlTableIR | SqlTableIRInput>;
571
+ readonly annotations?: SqlAnnotations;
572
+ }
573
+ /**
574
+ * Root Schema IR node representing the complete database schema as
575
+ * observed by introspection. Target-agnostic; used by both verifiers
576
+ * (compare against intended Contract storage) and migration planners
577
+ * (derive operations needed to reconcile).
578
+ *
579
+ * The constructor normalises nested `SqlTableIR` instances so
580
+ * downstream walks see a uniform AST regardless of whether the input
581
+ * was a plain-data literal or already-constructed class instances.
582
+ *
583
+ * Implements `DiffableNode` as the root of a flat (single-schema) diff
584
+ * tree: `id` is the fixed sentinel `'database'` (roots have no siblings),
585
+ * `isEqualTo` is identity (a container has no own attributes), and
586
+ * `children()` yields the table nodes.
587
+ */
588
+ declare class SqlSchemaIR extends SqlSchemaIRNode implements DiffableNode {
589
+ readonly nodeKind: "sql-schema";
590
+ readonly tables: Readonly<Record<string, SqlTableIR>>;
591
+ readonly annotations?: SqlAnnotations;
592
+ constructor(input: SqlSchemaIRInput);
593
+ get id(): string;
594
+ isEqualTo(other: DiffableNode): boolean;
595
+ children(): readonly DiffableNode[];
596
+ }
597
+ //#endregion
598
+ //#region src/types.d.ts
599
+ /**
600
+ * SQL type metadata for control-plane and execution-plane type
601
+ * availability and mapping. Read-only view of type information
602
+ * without encode/decode behavior.
603
+ */
604
+ interface SqlTypeMetadata {
605
+ /** Namespaced type identifier, e.g. `pg/int4@1`, `pg/text@1`. */
606
+ readonly typeId: string;
607
+ /** Contract scalar type IDs this type can handle. */
608
+ readonly targetTypes: readonly string[];
609
+ /**
610
+ * Native database type name (target-specific). Optional because
611
+ * not all types have a native database representation.
612
+ */
613
+ readonly nativeType?: string;
614
+ }
615
+ /**
616
+ * Registry interface for SQL type metadata. Provides read-only
617
+ * iteration over type metadata entries.
618
+ */
619
+ interface SqlTypeMetadataRegistry {
620
+ values(): IterableIterator<SqlTypeMetadata>;
621
+ }
622
+ //#endregion
623
+ export { relationalNodeGranularity as C, assertNode as D, SqlSchemaIRNode as E, defineNonEnumerable as O, relationalNodeEntityKind as S, PrimaryKeyInput as T, SqlColumnDefaultIR as _, SqlTableIR as a, SqlCheckConstraintIRInput as b, SqlUniqueIRInput as c, SqlForeignKeyIR as d, SqlForeignKeyIRInput as f, SqlColumnIRInput as g, SqlColumnIR as h, SqlSchemaIRInput as i, SqlIndexIR as l, SqlAnnotations as m, SqlTypeMetadataRegistry as n, SqlTableIRInput as o, SqlReferentialAction as p, SqlSchemaIR as r, SqlUniqueIR as s, SqlTypeMetadata as t, SqlIndexIRInput as u, SqlColumnDefaultIRInput as v, PrimaryKey as w, RelationalSchemaNodeKind as x, SqlCheckConstraintIR as y };
624
+ //# sourceMappingURL=types-CeJhPT7f.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-CeJhPT7f.d.mts","names":[],"sources":["../src/ir/sql-schema-ir-node.ts","../src/ir/primary-key.ts","../src/ir/schema-node-kinds.ts","../src/ir/sql-check-constraint-ir.ts","../src/ir/sql-column-default-ir.ts","../src/ir/sql-column-ir.ts","../src/ir/sql-foreign-key-ir.ts","../src/ir/sql-index-ir.ts","../src/ir/sql-unique-ir.ts","../src/ir/sql-table-ir.ts","../src/ir/sql-schema-ir.ts","../src/types.ts"],"mappings":";;;;;;;;;;;AAuBA;;;;;;;;;;AA8BA;;;;;;uBA9BsB,eAAA,SAAwB,UAAU;EAAA,SACrC,IAAA;EAiCC;;;;;;;;EAAA,kBAvBA,QAAA;;;;;;;AAuBA;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