@prisma-next/sql-schema-ir 0.14.0-dev.49 → 0.14.0-dev.50

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,273 +0,0 @@
1
- import { IRNodeBase } from "@prisma-next/framework-components/ir";
2
-
3
- //#region src/ir/sql-schema-ir-node.d.ts
4
- /**
5
- * SQL Schema IR node base. Carries the family-level
6
- * `kind = 'sql-schema-ir'` discriminator and inherits the framework's
7
- * `freezeNode` affordance.
8
- *
9
- * SQL Schema IR represents the actual database state as discovered by
10
- * introspection (the parallel to SQL Contract IR, which represents the
11
- * desired state). Like the Contract side, today's Schema IR has no
12
- * polymorphic dispatch — verifiers and planners walk by structural
13
- * position, not by inspecting `kind` — so a single family-level
14
- * discriminator is sufficient. Future per-leaf overrides land cleanly
15
- * the same way as on the Contract side.
16
- *
17
- * The discriminator is installed as a non-enumerable own property,
18
- * matching the SqlNode pattern. This keeps `JSON.stringify(node)`
19
- * canonical (no `kind` field), keeps `toEqual({...})` test assertions
20
- * against pre-lift flat shapes passing, and keeps `node.kind` readable
21
- * for future polymorphic dispatch.
22
- */
23
- declare abstract class SqlSchemaIRNode extends IRNodeBase {
24
- readonly kind?: string;
25
- /**
26
- * Enumerable discriminant identifying which node this is (database /
27
- * namespace / table / policy / role). Target concretions set a unique value;
28
- * the `.is`/`.assert` guards compare against it. Unlike `kind`, it is
29
- * enumerable, so it survives a spread that flattens a node into a plain
30
- * object.
31
- */
32
- readonly nodeKind?: string;
33
- constructor();
34
- }
35
- //#endregion
36
- //#region src/ir/primary-key.d.ts
37
- interface PrimaryKeyInput {
38
- readonly columns: readonly string[];
39
- readonly name?: string;
40
- }
41
- /**
42
- * Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`
43
- * shape (same `columns` + optional `name`) so verification can compare
44
- * intent and actual structurally. Defined here independently to avoid
45
- * a sql-schema-ir -> sql-contract dependency.
46
- */
47
- declare class PrimaryKey extends SqlSchemaIRNode {
48
- readonly columns: readonly string[];
49
- readonly name?: string;
50
- constructor(input: PrimaryKeyInput);
51
- }
52
- //#endregion
53
- //#region src/ir/sql-check-constraint-ir.d.ts
54
- interface SqlCheckConstraintIRInput {
55
- /** Constraint name as stored in the database catalog. */
56
- readonly name: string;
57
- /** Column the check restricts. */
58
- readonly column: string;
59
- /** Permitted values the column must be IN. */
60
- readonly permittedValues: readonly string[];
61
- }
62
- /**
63
- * Schema IR node for a table-level check constraint that restricts a
64
- * column to a set of permitted values (an enum-style `IN (...)` check).
65
- *
66
- * Carries the **resolved values** rather than a raw SQL predicate so
67
- * callers can compare value-sets without parsing SQL.
68
- */
69
- declare class SqlCheckConstraintIR extends SqlSchemaIRNode {
70
- readonly name: string;
71
- readonly column: string;
72
- readonly permittedValues: readonly string[];
73
- constructor(input: SqlCheckConstraintIRInput);
74
- }
75
- //#endregion
76
- //#region src/ir/sql-column-ir.d.ts
77
- /**
78
- * Namespaced annotations for extensibility. Each namespace
79
- * (e.g. `pg`, `pgvector`) owns its annotations subtree.
80
- */
81
- type SqlAnnotations = {
82
- readonly [namespace: string]: unknown;
83
- };
84
- interface SqlColumnIRInput {
85
- readonly name: string;
86
- readonly nativeType: string;
87
- readonly nullable: boolean;
88
- /** Raw database default expression (e.g. `'hello'::text`, `nextval('seq')`). */
89
- readonly default?: string;
90
- readonly annotations?: SqlAnnotations;
91
- /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
92
- readonly many?: boolean;
93
- }
94
- /**
95
- * Schema IR node for a single column on a table, as observed by
96
- * introspection. Unlike the Contract IR `StorageColumn`, this carries
97
- * the column's `name` (Schema IR columns are returned as arrays from
98
- * introspection queries; the parent table re-keys them into a record
99
- * for downstream consumers).
100
- */
101
- declare class SqlColumnIR extends SqlSchemaIRNode {
102
- readonly name: string;
103
- readonly nativeType: string;
104
- readonly nullable: boolean;
105
- readonly default?: string;
106
- readonly annotations?: SqlAnnotations;
107
- /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
108
- readonly many?: boolean;
109
- constructor(input: SqlColumnIRInput);
110
- }
111
- //#endregion
112
- //#region src/ir/sql-foreign-key-ir.d.ts
113
- type SqlReferentialAction = 'noAction' | 'restrict' | 'cascade' | 'setNull' | 'setDefault';
114
- interface SqlForeignKeyIRInput {
115
- readonly columns: readonly string[];
116
- readonly referencedTable: string;
117
- readonly referencedColumns: readonly string[];
118
- /** Schema (namespace) of the referenced table — populated by adapters that introspect cross-schema FKs. */
119
- readonly referencedSchema?: string;
120
- readonly name?: string;
121
- readonly onDelete?: SqlReferentialAction;
122
- readonly onUpdate?: SqlReferentialAction;
123
- readonly annotations?: SqlAnnotations;
124
- }
125
- /**
126
- * Schema IR node for a foreign-key constraint as observed by
127
- * introspection. The `referencedTable` / `referencedColumns` field
128
- * names match the introspection vocabulary (`pg_constraint.confkey`,
129
- * etc.) and intentionally differ from the Contract IR's nested
130
- * `references: { table, columns }` shape so that the verifier's
131
- * structural comparison stays explicit about which side it's reading.
132
- */
133
- declare class SqlForeignKeyIR extends SqlSchemaIRNode {
134
- readonly columns: readonly string[];
135
- readonly referencedTable: string;
136
- readonly referencedColumns: readonly string[];
137
- readonly referencedSchema?: string;
138
- readonly name?: string;
139
- readonly onDelete?: SqlReferentialAction;
140
- readonly onUpdate?: SqlReferentialAction;
141
- readonly annotations?: SqlAnnotations;
142
- constructor(input: SqlForeignKeyIRInput);
143
- }
144
- //#endregion
145
- //#region src/ir/sql-index-ir.d.ts
146
- interface SqlIndexIRInput {
147
- readonly columns: readonly string[];
148
- readonly unique: boolean;
149
- readonly name?: string;
150
- readonly type?: string;
151
- readonly options?: Record<string, unknown>;
152
- readonly annotations?: SqlAnnotations;
153
- }
154
- /**
155
- * Schema IR node for a secondary index as observed by introspection.
156
- * Unlike the Contract IR `Index`, the Schema IR carries an explicit
157
- * `unique` field — introspection sees the underlying index regardless
158
- * of whether the user expressed it as `@@index` or `@@unique`, and the
159
- * verifier needs to distinguish them when comparing to the Contract.
160
- */
161
- declare class SqlIndexIR extends SqlSchemaIRNode {
162
- readonly columns: readonly string[];
163
- readonly unique: boolean;
164
- readonly name?: string;
165
- readonly type?: string;
166
- readonly options?: Record<string, unknown>;
167
- readonly annotations?: SqlAnnotations;
168
- constructor(input: SqlIndexIRInput);
169
- }
170
- //#endregion
171
- //#region src/ir/sql-unique-ir.d.ts
172
- interface SqlUniqueIRInput {
173
- readonly columns: readonly string[];
174
- readonly name?: string;
175
- readonly annotations?: SqlAnnotations;
176
- }
177
- /**
178
- * Schema IR node for a table-level unique constraint as observed by
179
- * introspection.
180
- */
181
- declare class SqlUniqueIR extends SqlSchemaIRNode {
182
- readonly columns: readonly string[];
183
- readonly name?: string;
184
- readonly annotations?: SqlAnnotations;
185
- constructor(input: SqlUniqueIRInput);
186
- }
187
- //#endregion
188
- //#region src/ir/sql-table-ir.d.ts
189
- interface SqlTableIRInput {
190
- readonly name: string;
191
- readonly columns: Record<string, SqlColumnIR | SqlColumnIRInput>;
192
- readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR | SqlForeignKeyIRInput>;
193
- readonly uniques: ReadonlyArray<SqlUniqueIR | SqlUniqueIRInput>;
194
- readonly indexes: ReadonlyArray<SqlIndexIR | SqlIndexIRInput>;
195
- readonly primaryKey?: PrimaryKey | PrimaryKeyInput;
196
- readonly annotations?: SqlAnnotations;
197
- /** Optional check constraints for enum-restricted columns. Omitted when none present. */
198
- readonly checks?: ReadonlyArray<SqlCheckConstraintIR | SqlCheckConstraintIRInput>;
199
- }
200
- /**
201
- * Schema IR node for a single table as observed by introspection.
202
- *
203
- * Unlike the Contract IR `StorageTable`, this carries the table's
204
- * `name` — introspection queries return tables as arrays and the
205
- * verifier keys them into `SqlSchemaIR.tables` afterwards, so the name
206
- * stays on the table object for downstream call sites that walk
207
- * `Object.values(schema.tables)`.
208
- *
209
- * The constructor normalises nested IR-class fields so downstream
210
- * walks see a uniform AST regardless of whether the input was a
211
- * plain-data literal (from introspection) or already-constructed
212
- * class instances.
213
- */
214
- declare class SqlTableIR extends SqlSchemaIRNode {
215
- readonly name: string;
216
- readonly columns: Readonly<Record<string, SqlColumnIR>>;
217
- readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR>;
218
- readonly uniques: ReadonlyArray<SqlUniqueIR>;
219
- readonly indexes: ReadonlyArray<SqlIndexIR>;
220
- readonly primaryKey?: PrimaryKey;
221
- readonly annotations?: SqlAnnotations;
222
- readonly checks?: ReadonlyArray<SqlCheckConstraintIR>;
223
- constructor(input: SqlTableIRInput);
224
- }
225
- //#endregion
226
- //#region src/ir/sql-schema-ir.d.ts
227
- interface SqlSchemaIRInput {
228
- readonly tables: Record<string, SqlTableIR | SqlTableIRInput>;
229
- readonly annotations?: SqlAnnotations;
230
- }
231
- /**
232
- * Root Schema IR node representing the complete database schema as
233
- * observed by introspection. Target-agnostic; used by both verifiers
234
- * (compare against intended Contract storage) and migration planners
235
- * (derive operations needed to reconcile).
236
- *
237
- * The constructor normalises nested `SqlTableIR` instances so
238
- * downstream walks see a uniform AST regardless of whether the input
239
- * was a plain-data literal or already-constructed class instances.
240
- */
241
- declare class SqlSchemaIR extends SqlSchemaIRNode {
242
- readonly tables: Readonly<Record<string, SqlTableIR>>;
243
- readonly annotations?: SqlAnnotations;
244
- constructor(input: SqlSchemaIRInput);
245
- }
246
- //#endregion
247
- //#region src/types.d.ts
248
- /**
249
- * SQL type metadata for control-plane and execution-plane type
250
- * availability and mapping. Read-only view of type information
251
- * without encode/decode behavior.
252
- */
253
- interface SqlTypeMetadata {
254
- /** Namespaced type identifier, e.g. `pg/int4@1`, `pg/text@1`. */
255
- readonly typeId: string;
256
- /** Contract scalar type IDs this type can handle. */
257
- readonly targetTypes: readonly string[];
258
- /**
259
- * Native database type name (target-specific). Optional because
260
- * not all types have a native database representation.
261
- */
262
- readonly nativeType?: string;
263
- }
264
- /**
265
- * Registry interface for SQL type metadata. Provides read-only
266
- * iteration over type metadata entries.
267
- */
268
- interface SqlTypeMetadataRegistry {
269
- values(): IterableIterator<SqlTypeMetadata>;
270
- }
271
- //#endregion
272
- export { SqlCheckConstraintIR as _, SqlTableIR as a, PrimaryKeyInput 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, SqlCheckConstraintIRInput as v, SqlSchemaIRNode as x, PrimaryKey as y };
273
- //# sourceMappingURL=types-CJU1kcRM.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-CJU1kcRM.d.mts","names":[],"sources":["../src/ir/sql-schema-ir-node.ts","../src/ir/primary-key.ts","../src/ir/sql-check-constraint-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":";;;;;AAqBA;;;;;;;;;;;;;AClBA;;;;uBDkBsB,eAAA,SAAwB,UAAU;EAAA,SAC7C,IAAA;ECRa;;;;;;;EAAA,SDiBb,QAAA;;;;;UC5BM,eAAA;EAAA,SACN,OAAA;EAAA,SACA,IAAI;AAAA;;;;;;;cASF,UAAA,SAAmB,eAAe;EAAA,SACpC,OAAA;EAAA,SACQ,IAAA;cAEL,KAAA,EAAO,eAAA;AAAA;;;UCfJ,yBAAA;;WAEN,IAAA;EFgB2B;EAAA,SEd3B,MAAA;EFc6C;EAAA,SEZ7C,eAAA;AAAA;;;;;;;;cAUE,oBAAA,SAA6B,eAAe;EAAA,SAC9C,IAAA;EAAA,SACA,MAAA;EAAA,SACA,eAAA;cAEG,KAAA,EAAO,yBAAA;AAAA;;;;;AFH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APnBN;AASf;;;UQuBiB,eAAA;ERvBe;EAAA,SQyBrB,MAAA;ERvBQ;EAAA,SQ0BR,WAAA;ERxBU;;;AAAe;EAAf,SQ8BV,UAAA;AAAA;;AP7CX;;;UOoDiB,uBAAA;EACf,MAAA,IAAU,gBAAgB,CAAC,eAAA;AAAA"}
@@ -1,229 +0,0 @@
1
- import { IRNodeBase, freezeNode } from "@prisma-next/framework-components/ir";
2
- //#region src/ir/sql-schema-ir-node.ts
3
- /**
4
- * SQL Schema IR node base. Carries the family-level
5
- * `kind = 'sql-schema-ir'` discriminator and inherits the framework's
6
- * `freezeNode` affordance.
7
- *
8
- * SQL Schema IR represents the actual database state as discovered by
9
- * introspection (the parallel to SQL Contract IR, which represents the
10
- * desired state). Like the Contract side, today's Schema IR has no
11
- * polymorphic dispatch — verifiers and planners walk by structural
12
- * position, not by inspecting `kind` — so a single family-level
13
- * discriminator is sufficient. Future per-leaf overrides land cleanly
14
- * the same way as on the Contract side.
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 future polymorphic dispatch.
21
- */
22
- var SqlSchemaIRNode = class extends IRNodeBase {
23
- kind;
24
- /**
25
- * Enumerable discriminant identifying which node this is (database /
26
- * namespace / table / policy / role). Target concretions set a unique value;
27
- * the `.is`/`.assert` guards compare against it. Unlike `kind`, it is
28
- * enumerable, so it survives a spread that flattens a node into a plain
29
- * object.
30
- */
31
- nodeKind;
32
- constructor() {
33
- super();
34
- Object.defineProperty(this, "kind", {
35
- value: "sql-schema-ir",
36
- writable: false,
37
- enumerable: false,
38
- configurable: false
39
- });
40
- }
41
- };
42
- //#endregion
43
- //#region src/ir/primary-key.ts
44
- /**
45
- * Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`
46
- * shape (same `columns` + optional `name`) so verification can compare
47
- * intent and actual structurally. Defined here independently to avoid
48
- * a sql-schema-ir -> sql-contract dependency.
49
- */
50
- var PrimaryKey = class extends SqlSchemaIRNode {
51
- columns;
52
- constructor(input) {
53
- super();
54
- this.columns = input.columns;
55
- if (input.name !== void 0) this.name = input.name;
56
- freezeNode(this);
57
- }
58
- };
59
- //#endregion
60
- //#region src/ir/sql-check-constraint-ir.ts
61
- /**
62
- * Schema IR node for a table-level check constraint that restricts a
63
- * column to a set of permitted values (an enum-style `IN (...)` check).
64
- *
65
- * Carries the **resolved values** rather than a raw SQL predicate so
66
- * callers can compare value-sets without parsing SQL.
67
- */
68
- var SqlCheckConstraintIR = class extends SqlSchemaIRNode {
69
- name;
70
- column;
71
- permittedValues;
72
- constructor(input) {
73
- super();
74
- this.name = input.name;
75
- this.column = input.column;
76
- this.permittedValues = Object.freeze([...input.permittedValues]);
77
- freezeNode(this);
78
- }
79
- };
80
- //#endregion
81
- //#region src/ir/sql-column-ir.ts
82
- /**
83
- * Schema IR node for a single column on a table, as observed by
84
- * introspection. Unlike the Contract IR `StorageColumn`, this carries
85
- * the column's `name` (Schema IR columns are returned as arrays from
86
- * introspection queries; the parent table re-keys them into a record
87
- * for downstream consumers).
88
- */
89
- var SqlColumnIR = class extends SqlSchemaIRNode {
90
- name;
91
- nativeType;
92
- nullable;
93
- constructor(input) {
94
- super();
95
- this.name = input.name;
96
- this.nativeType = input.nativeType;
97
- this.nullable = input.nullable;
98
- if (input.default !== void 0) this.default = input.default;
99
- if (input.annotations !== void 0) this.annotations = input.annotations;
100
- if (input.many !== void 0) this.many = input.many;
101
- freezeNode(this);
102
- }
103
- };
104
- //#endregion
105
- //#region src/ir/sql-foreign-key-ir.ts
106
- /**
107
- * Schema IR node for a foreign-key constraint as observed by
108
- * introspection. The `referencedTable` / `referencedColumns` field
109
- * names match the introspection vocabulary (`pg_constraint.confkey`,
110
- * etc.) and intentionally differ from the Contract IR's nested
111
- * `references: { table, columns }` shape so that the verifier's
112
- * structural comparison stays explicit about which side it's reading.
113
- */
114
- var SqlForeignKeyIR = class extends SqlSchemaIRNode {
115
- columns;
116
- referencedTable;
117
- referencedColumns;
118
- constructor(input) {
119
- super();
120
- this.columns = input.columns;
121
- this.referencedTable = input.referencedTable;
122
- this.referencedColumns = input.referencedColumns;
123
- if (input.referencedSchema !== void 0) this.referencedSchema = input.referencedSchema;
124
- if (input.name !== void 0) this.name = input.name;
125
- if (input.onDelete !== void 0) this.onDelete = input.onDelete;
126
- if (input.onUpdate !== void 0) this.onUpdate = input.onUpdate;
127
- if (input.annotations !== void 0) this.annotations = input.annotations;
128
- freezeNode(this);
129
- }
130
- };
131
- //#endregion
132
- //#region src/ir/sql-index-ir.ts
133
- /**
134
- * Schema IR node for a secondary index as observed by introspection.
135
- * Unlike the Contract IR `Index`, the Schema IR carries an explicit
136
- * `unique` field — introspection sees the underlying index regardless
137
- * of whether the user expressed it as `@@index` or `@@unique`, and the
138
- * verifier needs to distinguish them when comparing to the Contract.
139
- */
140
- var SqlIndexIR = class extends SqlSchemaIRNode {
141
- columns;
142
- unique;
143
- constructor(input) {
144
- super();
145
- this.columns = input.columns;
146
- this.unique = input.unique;
147
- if (input.name !== void 0) this.name = input.name;
148
- if (input.type !== void 0) this.type = input.type;
149
- if (input.options !== void 0) this.options = input.options;
150
- if (input.annotations !== void 0) this.annotations = input.annotations;
151
- freezeNode(this);
152
- }
153
- };
154
- //#endregion
155
- //#region src/ir/sql-unique-ir.ts
156
- /**
157
- * Schema IR node for a table-level unique constraint as observed by
158
- * introspection.
159
- */
160
- var SqlUniqueIR = class extends SqlSchemaIRNode {
161
- columns;
162
- constructor(input) {
163
- super();
164
- this.columns = [...input.columns];
165
- if (input.name !== void 0) this.name = input.name;
166
- if (input.annotations !== void 0) this.annotations = input.annotations;
167
- freezeNode(this);
168
- }
169
- };
170
- //#endregion
171
- //#region src/ir/sql-table-ir.ts
172
- /**
173
- * Schema IR node for a single table as observed by introspection.
174
- *
175
- * Unlike the Contract IR `StorageTable`, this carries the table's
176
- * `name` — introspection queries return tables as arrays and the
177
- * verifier keys them into `SqlSchemaIR.tables` afterwards, so the name
178
- * stays on the table object for downstream call sites that walk
179
- * `Object.values(schema.tables)`.
180
- *
181
- * The constructor normalises nested IR-class fields so downstream
182
- * walks see a uniform AST regardless of whether the input was a
183
- * plain-data literal (from introspection) or already-constructed
184
- * class instances.
185
- */
186
- var SqlTableIR = class extends SqlSchemaIRNode {
187
- name;
188
- columns;
189
- foreignKeys;
190
- uniques;
191
- indexes;
192
- constructor(input) {
193
- super();
194
- this.name = input.name;
195
- this.columns = Object.freeze(Object.fromEntries(Object.entries(input.columns).map(([key, col]) => [key, col instanceof SqlColumnIR ? col : new SqlColumnIR(col)])));
196
- this.foreignKeys = Object.freeze(input.foreignKeys.map((fk) => fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk)));
197
- this.uniques = Object.freeze(input.uniques.map((u) => u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u)));
198
- this.indexes = Object.freeze(input.indexes.map((i) => i instanceof SqlIndexIR ? i : new SqlIndexIR(i)));
199
- if (input.primaryKey !== void 0) this.primaryKey = input.primaryKey instanceof PrimaryKey ? input.primaryKey : new PrimaryKey(input.primaryKey);
200
- if (input.annotations !== void 0) this.annotations = input.annotations;
201
- if (input.checks !== void 0 && input.checks.length > 0) this.checks = Object.freeze(input.checks.map((c) => c instanceof SqlCheckConstraintIR ? c : new SqlCheckConstraintIR(c)));
202
- freezeNode(this);
203
- }
204
- };
205
- //#endregion
206
- //#region src/ir/sql-schema-ir.ts
207
- /**
208
- * Root Schema IR node representing the complete database schema as
209
- * observed by introspection. Target-agnostic; used by both verifiers
210
- * (compare against intended Contract storage) and migration planners
211
- * (derive operations needed to reconcile).
212
- *
213
- * The constructor normalises nested `SqlTableIR` instances so
214
- * downstream walks see a uniform AST regardless of whether the input
215
- * was a plain-data literal or already-constructed class instances.
216
- */
217
- var SqlSchemaIR = class extends SqlSchemaIRNode {
218
- tables;
219
- constructor(input) {
220
- super();
221
- this.tables = Object.freeze(Object.fromEntries(Object.entries(input.tables).map(([key, t]) => [key, t instanceof SqlTableIR ? t : new SqlTableIR(t)])));
222
- if (input.annotations !== void 0) this.annotations = input.annotations;
223
- freezeNode(this);
224
- }
225
- };
226
- //#endregion
227
- export { SqlForeignKeyIR as a, PrimaryKey as c, SqlIndexIR as i, SqlSchemaIRNode as l, SqlTableIR as n, SqlColumnIR as o, SqlUniqueIR as r, SqlCheckConstraintIR as s, SqlSchemaIR as t };
228
-
229
- //# sourceMappingURL=types-Drcy_LQx.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-Drcy_LQx.mjs","names":[],"sources":["../src/ir/sql-schema-ir-node.ts","../src/ir/primary-key.ts","../src/ir/sql-check-constraint-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"],"sourcesContent":["import { IRNodeBase } from '@prisma-next/framework-components/ir';\n\n/**\n * SQL Schema IR node base. Carries the family-level\n * `kind = 'sql-schema-ir'` discriminator and inherits the framework's\n * `freezeNode` affordance.\n *\n * SQL Schema IR represents the actual database state as discovered by\n * introspection (the parallel to SQL Contract IR, which represents the\n * desired state). Like the Contract side, today's Schema IR has no\n * polymorphic dispatch — verifiers and planners walk by structural\n * position, not by inspecting `kind` — so a single family-level\n * discriminator is sufficient. Future per-leaf overrides land cleanly\n * the same way as on the Contract side.\n *\n * The discriminator is installed as a non-enumerable own property,\n * matching the SqlNode pattern. This keeps `JSON.stringify(node)`\n * canonical (no `kind` field), keeps `toEqual({...})` test assertions\n * against pre-lift flat shapes passing, and keeps `node.kind` readable\n * for future polymorphic dispatch.\n */\nexport abstract class SqlSchemaIRNode extends IRNodeBase {\n readonly kind?: string;\n\n /**\n * Enumerable discriminant identifying which node this is (database /\n * namespace / table / policy / role). Target concretions set a unique value;\n * the `.is`/`.assert` guards compare against it. Unlike `kind`, it is\n * enumerable, so it survives a spread that flattens a node into a plain\n * object.\n */\n readonly nodeKind?: string;\n\n constructor() {\n super();\n Object.defineProperty(this, 'kind', {\n value: 'sql-schema-ir',\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\nexport interface PrimaryKeyInput {\n readonly columns: readonly string[];\n readonly name?: string;\n}\n\n/**\n * Primary-key Schema IR node. Mirrors the Contract IR `PrimaryKey`\n * shape (same `columns` + optional `name`) so verification can compare\n * intent and actual structurally. Defined here independently to avoid\n * a sql-schema-ir -> sql-contract dependency.\n */\nexport class PrimaryKey extends SqlSchemaIRNode {\n readonly columns: readonly string[];\n declare readonly name?: string;\n\n constructor(input: PrimaryKeyInput) {\n super();\n this.columns = input.columns;\n if (input.name !== undefined) this.name = input.name;\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\nexport interface SqlCheckConstraintIRInput {\n /** Constraint name as stored in the database catalog. */\n readonly name: string;\n /** Column the check restricts. */\n readonly column: string;\n /** Permitted values the column must be IN. */\n readonly permittedValues: readonly string[];\n}\n\n/**\n * Schema IR node for a table-level check constraint that restricts a\n * column to a set of permitted values (an enum-style `IN (...)` check).\n *\n * Carries the **resolved values** rather than a raw SQL predicate so\n * callers can compare value-sets without parsing SQL.\n */\nexport class SqlCheckConstraintIR extends SqlSchemaIRNode {\n readonly name: string;\n readonly column: string;\n readonly permittedValues: readonly string[];\n\n constructor(input: SqlCheckConstraintIRInput) {\n super();\n this.name = input.name;\n this.column = input.column;\n this.permittedValues = Object.freeze([...input.permittedValues]);\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\n/**\n * Namespaced annotations for extensibility. Each namespace\n * (e.g. `pg`, `pgvector`) owns its annotations subtree.\n */\nexport type SqlAnnotations = {\n readonly [namespace: string]: unknown;\n};\n\nexport interface SqlColumnIRInput {\n readonly name: string;\n readonly nativeType: string;\n readonly nullable: boolean;\n /** Raw database default expression (e.g. `'hello'::text`, `nextval('seq')`). */\n readonly default?: string;\n readonly annotations?: SqlAnnotations;\n /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */\n readonly many?: boolean;\n}\n\n/**\n * Schema IR node for a single column on a table, as observed by\n * introspection. Unlike the Contract IR `StorageColumn`, this carries\n * the column's `name` (Schema IR columns are returned as arrays from\n * introspection queries; the parent table re-keys them into a record\n * for downstream consumers).\n */\nexport class SqlColumnIR extends SqlSchemaIRNode {\n readonly name: string;\n readonly nativeType: string;\n readonly nullable: boolean;\n declare readonly default?: string;\n declare readonly annotations?: SqlAnnotations;\n /** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */\n declare readonly many?: boolean;\n\n constructor(input: SqlColumnIRInput) {\n super();\n this.name = input.name;\n this.nativeType = input.nativeType;\n this.nullable = input.nullable;\n if (input.default !== undefined) this.default = input.default;\n if (input.annotations !== undefined) this.annotations = input.annotations;\n if (input.many !== undefined) this.many = input.many;\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport type { SqlAnnotations } from './sql-column-ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\nexport type SqlReferentialAction = 'noAction' | 'restrict' | 'cascade' | 'setNull' | 'setDefault';\n\nexport interface SqlForeignKeyIRInput {\n readonly columns: readonly string[];\n readonly referencedTable: string;\n readonly referencedColumns: readonly string[];\n /** Schema (namespace) of the referenced table — populated by adapters that introspect cross-schema FKs. */\n readonly referencedSchema?: string;\n readonly name?: string;\n readonly onDelete?: SqlReferentialAction;\n readonly onUpdate?: SqlReferentialAction;\n readonly annotations?: SqlAnnotations;\n}\n\n/**\n * Schema IR node for a foreign-key constraint as observed by\n * introspection. The `referencedTable` / `referencedColumns` field\n * names match the introspection vocabulary (`pg_constraint.confkey`,\n * etc.) and intentionally differ from the Contract IR's nested\n * `references: { table, columns }` shape so that the verifier's\n * structural comparison stays explicit about which side it's reading.\n */\nexport class SqlForeignKeyIR extends SqlSchemaIRNode {\n readonly columns: readonly string[];\n readonly referencedTable: string;\n readonly referencedColumns: readonly string[];\n declare readonly referencedSchema?: string;\n declare readonly name?: string;\n declare readonly onDelete?: SqlReferentialAction;\n declare readonly onUpdate?: SqlReferentialAction;\n declare readonly annotations?: SqlAnnotations;\n\n constructor(input: SqlForeignKeyIRInput) {\n super();\n this.columns = input.columns;\n this.referencedTable = input.referencedTable;\n this.referencedColumns = input.referencedColumns;\n if (input.referencedSchema !== undefined) this.referencedSchema = input.referencedSchema;\n if (input.name !== undefined) this.name = input.name;\n if (input.onDelete !== undefined) this.onDelete = input.onDelete;\n if (input.onUpdate !== undefined) this.onUpdate = input.onUpdate;\n if (input.annotations !== undefined) this.annotations = input.annotations;\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport type { SqlAnnotations } from './sql-column-ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\nexport interface SqlIndexIRInput {\n readonly columns: readonly string[];\n readonly unique: boolean;\n readonly name?: string;\n readonly type?: string;\n readonly options?: Record<string, unknown>;\n readonly annotations?: SqlAnnotations;\n}\n\n/**\n * Schema IR node for a secondary index as observed by introspection.\n * Unlike the Contract IR `Index`, the Schema IR carries an explicit\n * `unique` field — introspection sees the underlying index regardless\n * of whether the user expressed it as `@@index` or `@@unique`, and the\n * verifier needs to distinguish them when comparing to the Contract.\n */\nexport class SqlIndexIR extends SqlSchemaIRNode {\n readonly columns: readonly string[];\n readonly unique: boolean;\n declare readonly name?: string;\n declare readonly type?: string;\n declare readonly options?: Record<string, unknown>;\n declare readonly annotations?: SqlAnnotations;\n\n constructor(input: SqlIndexIRInput) {\n super();\n this.columns = input.columns;\n this.unique = input.unique;\n if (input.name !== undefined) this.name = input.name;\n if (input.type !== undefined) this.type = input.type;\n if (input.options !== undefined) this.options = input.options;\n if (input.annotations !== undefined) this.annotations = input.annotations;\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport type { SqlAnnotations } from './sql-column-ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\n\nexport interface SqlUniqueIRInput {\n readonly columns: readonly string[];\n readonly name?: string;\n readonly annotations?: SqlAnnotations;\n}\n\n/**\n * Schema IR node for a table-level unique constraint as observed by\n * introspection.\n */\nexport class SqlUniqueIR extends SqlSchemaIRNode {\n readonly columns: readonly string[];\n declare readonly name?: string;\n declare readonly annotations?: SqlAnnotations;\n\n constructor(input: SqlUniqueIRInput) {\n super();\n this.columns = [...input.columns];\n if (input.name !== undefined) this.name = input.name;\n if (input.annotations !== undefined) this.annotations = input.annotations;\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport { PrimaryKey, type PrimaryKeyInput } from './primary-key';\nimport { SqlCheckConstraintIR, type SqlCheckConstraintIRInput } from './sql-check-constraint-ir';\nimport { type SqlAnnotations, SqlColumnIR, type SqlColumnIRInput } from './sql-column-ir';\nimport { SqlForeignKeyIR, type SqlForeignKeyIRInput } from './sql-foreign-key-ir';\nimport { SqlIndexIR, type SqlIndexIRInput } from './sql-index-ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\nimport { SqlUniqueIR, type SqlUniqueIRInput } from './sql-unique-ir';\n\nexport interface SqlTableIRInput {\n readonly name: string;\n readonly columns: Record<string, SqlColumnIR | SqlColumnIRInput>;\n readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR | SqlForeignKeyIRInput>;\n readonly uniques: ReadonlyArray<SqlUniqueIR | SqlUniqueIRInput>;\n readonly indexes: ReadonlyArray<SqlIndexIR | SqlIndexIRInput>;\n readonly primaryKey?: PrimaryKey | PrimaryKeyInput;\n readonly annotations?: SqlAnnotations;\n /** Optional check constraints for enum-restricted columns. Omitted when none present. */\n readonly checks?: ReadonlyArray<SqlCheckConstraintIR | SqlCheckConstraintIRInput>;\n}\n\n/**\n * Schema IR node for a single table as observed by introspection.\n *\n * Unlike the Contract IR `StorageTable`, this carries the table's\n * `name` — introspection queries return tables as arrays and the\n * verifier keys them into `SqlSchemaIR.tables` afterwards, so the name\n * stays on the table object for downstream call sites that walk\n * `Object.values(schema.tables)`.\n *\n * The constructor normalises nested IR-class fields so downstream\n * walks see a uniform AST regardless of whether the input was a\n * plain-data literal (from introspection) or already-constructed\n * class instances.\n */\nexport class SqlTableIR extends SqlSchemaIRNode {\n readonly name: string;\n readonly columns: Readonly<Record<string, SqlColumnIR>>;\n readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR>;\n readonly uniques: ReadonlyArray<SqlUniqueIR>;\n readonly indexes: ReadonlyArray<SqlIndexIR>;\n declare readonly primaryKey?: PrimaryKey;\n declare readonly annotations?: SqlAnnotations;\n declare readonly checks?: ReadonlyArray<SqlCheckConstraintIR>;\n\n constructor(input: SqlTableIRInput) {\n super();\n this.name = input.name;\n this.columns = Object.freeze(\n Object.fromEntries(\n Object.entries(input.columns).map(([key, col]) => [\n key,\n col instanceof SqlColumnIR ? col : new SqlColumnIR(col),\n ]),\n ),\n );\n this.foreignKeys = Object.freeze(\n input.foreignKeys.map((fk) => (fk instanceof SqlForeignKeyIR ? fk : new SqlForeignKeyIR(fk))),\n );\n this.uniques = Object.freeze(\n input.uniques.map((u) => (u instanceof SqlUniqueIR ? u : new SqlUniqueIR(u))),\n );\n this.indexes = Object.freeze(\n input.indexes.map((i) => (i instanceof SqlIndexIR ? i : new SqlIndexIR(i))),\n );\n if (input.primaryKey !== undefined) {\n this.primaryKey =\n input.primaryKey instanceof PrimaryKey\n ? input.primaryKey\n : new PrimaryKey(input.primaryKey);\n }\n if (input.annotations !== undefined) this.annotations = input.annotations;\n if (input.checks !== undefined && input.checks.length > 0) {\n this.checks = Object.freeze(\n input.checks.map((c) =>\n c instanceof SqlCheckConstraintIR ? c : new SqlCheckConstraintIR(c),\n ),\n );\n }\n freezeNode(this);\n }\n}\n","import { freezeNode } from '@prisma-next/framework-components/ir';\nimport type { SqlAnnotations } from './sql-column-ir';\nimport { SqlSchemaIRNode } from './sql-schema-ir-node';\nimport { SqlTableIR, type SqlTableIRInput } from './sql-table-ir';\n\nexport interface SqlSchemaIRInput {\n readonly tables: Record<string, SqlTableIR | SqlTableIRInput>;\n readonly annotations?: SqlAnnotations;\n}\n\n/**\n * Root Schema IR node representing the complete database schema as\n * observed by introspection. Target-agnostic; used by both verifiers\n * (compare against intended Contract storage) and migration planners\n * (derive operations needed to reconcile).\n *\n * The constructor normalises nested `SqlTableIR` instances so\n * downstream walks see a uniform AST regardless of whether the input\n * was a plain-data literal or already-constructed class instances.\n */\nexport class SqlSchemaIR extends SqlSchemaIRNode {\n readonly tables: Readonly<Record<string, SqlTableIR>>;\n declare readonly annotations?: SqlAnnotations;\n\n constructor(input: SqlSchemaIRInput) {\n super();\n this.tables = Object.freeze(\n Object.fromEntries(\n Object.entries(input.tables).map(([key, t]) => [\n key,\n t instanceof SqlTableIR ? t : new SqlTableIR(t),\n ]),\n ),\n );\n if (input.annotations !== undefined) this.annotations = input.annotations;\n freezeNode(this);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAsB,kBAAtB,cAA8C,WAAW;CACvD;;;;;;;;CASA;CAEA,cAAc;EACZ,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GAClC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EAChB,CAAC;CACH;AACF;;;;;;;;;AC5BA,IAAa,aAAb,cAAgC,gBAAgB;CAC9C;CAGA,YAAY,OAAwB;EAClC,MAAM;EACN,KAAK,UAAU,MAAM;EACrB,IAAI,MAAM,SAAS,KAAA,GAAW,KAAK,OAAO,MAAM;EAChD,WAAW,IAAI;CACjB;AACF;;;;;;;;;;ACLA,IAAa,u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