@prisma-next/sql-schema-ir 0.14.0-dev.9 → 0.14.0-dev.90

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