@prisma-next/sql-schema-ir 0.14.0-dev.2 → 0.14.0-dev.20
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.
- package/dist/exports/types.d.mts +2 -2
- package/dist/exports/types.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{types-Du44_nsJ.d.mts → types-DWEmV6V6.d.mts} +16 -2
- package/dist/types-DWEmV6V6.d.mts.map +1 -0
- package/dist/{types-C0WFfEkA.mjs → types-DWefi1qU.mjs} +3 -1
- package/dist/types-DWefi1qU.mjs.map +1 -0
- package/package.json +6 -6
- package/src/exports/types.ts +1 -0
- package/src/ir/sql-column-ir.ts +5 -0
- package/src/ir/sql-schema-ir.ts +15 -0
- package/src/types.ts +1 -1
- package/dist/types-C0WFfEkA.mjs.map +0 -1
- package/dist/types-Du44_nsJ.d.mts.map +0 -1
package/dist/exports/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
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 { S as SqlSchemaIRNode, _ as SqlColumnIRInput, a as SqlSchemaTarget, b as PrimaryKey, c as SqlUniqueIR, d as SqlIndexIRInput, f as SqlForeignKeyIR, g as SqlColumnIR, h as SqlAnnotations, i as SqlSchemaIRInput, l as SqlUniqueIRInput, m as SqlReferentialAction, n as SqlTypeMetadataRegistry, o as SqlTableIR, p as SqlForeignKeyIRInput, r as SqlSchemaIR, s as SqlTableIRInput, t as SqlTypeMetadata, u as SqlIndexIR, v as SqlCheckConstraintIR, x as PrimaryKeyInput, y as SqlCheckConstraintIRInput } from "../types-DWEmV6V6.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, type SqlSchemaTarget, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput };
|
package/dist/exports/types.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-
|
|
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-DWefi1qU.mjs";
|
|
2
2
|
export { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
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 { S as SqlSchemaIRNode, _ as SqlColumnIRInput, a as SqlSchemaTarget, b as PrimaryKey, c as SqlUniqueIR, d as SqlIndexIRInput, f as SqlForeignKeyIR, g as SqlColumnIR, h as SqlAnnotations, i as SqlSchemaIRInput, l as SqlUniqueIRInput, m as SqlReferentialAction, n as SqlTypeMetadataRegistry, o as SqlTableIR, p as SqlForeignKeyIRInput, r as SqlSchemaIR, s as SqlTableIRInput, t as SqlTypeMetadata, u as SqlIndexIR, v as SqlCheckConstraintIR, x as PrimaryKeyInput, y as SqlCheckConstraintIRInput } from "./types-DWEmV6V6.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, type SqlSchemaTarget, SqlTableIR, type SqlTableIRInput, type SqlTypeMetadata, type SqlTypeMetadataRegistry, SqlUniqueIR, type SqlUniqueIRInput };
|
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-
|
|
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-DWefi1qU.mjs";
|
|
2
2
|
export { PrimaryKey, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlSchemaIRNode, SqlTableIR, SqlUniqueIR };
|
|
@@ -80,6 +80,8 @@ interface SqlColumnIRInput {
|
|
|
80
80
|
/** Raw database default expression (e.g. `'hello'::text`, `nextval('seq')`). */
|
|
81
81
|
readonly default?: string;
|
|
82
82
|
readonly annotations?: SqlAnnotations;
|
|
83
|
+
/** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
|
|
84
|
+
readonly many?: boolean;
|
|
83
85
|
}
|
|
84
86
|
/**
|
|
85
87
|
* Schema IR node for a single column on a table, as observed by
|
|
@@ -94,6 +96,8 @@ declare class SqlColumnIR extends SqlSchemaIRNode {
|
|
|
94
96
|
readonly nullable: boolean;
|
|
95
97
|
readonly default?: string;
|
|
96
98
|
readonly annotations?: SqlAnnotations;
|
|
99
|
+
/** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
|
|
100
|
+
readonly many?: boolean;
|
|
97
101
|
constructor(input: SqlColumnIRInput);
|
|
98
102
|
}
|
|
99
103
|
//#endregion
|
|
@@ -212,6 +216,15 @@ declare class SqlTableIR extends SqlSchemaIRNode {
|
|
|
212
216
|
}
|
|
213
217
|
//#endregion
|
|
214
218
|
//#region src/ir/sql-schema-ir.d.ts
|
|
219
|
+
/**
|
|
220
|
+
* Target discriminant for a schema-root IR node. `'sql'` is the
|
|
221
|
+
* target-agnostic generic root (SQLite uses it directly); target-specific
|
|
222
|
+
* concretions set their own id (e.g. Postgres → `'postgres'`). It is an
|
|
223
|
+
* enumerable own field so it survives a `{ ...schema }` spread (unlike the
|
|
224
|
+
* non-enumerable, shared `kind` discriminator), which the multi-space verify
|
|
225
|
+
* path relies on.
|
|
226
|
+
*/
|
|
227
|
+
type SqlSchemaTarget = 'sql' | 'postgres';
|
|
215
228
|
interface SqlSchemaIRInput {
|
|
216
229
|
readonly tables: Record<string, SqlTableIR | SqlTableIRInput>;
|
|
217
230
|
readonly annotations?: SqlAnnotations;
|
|
@@ -227,6 +240,7 @@ interface SqlSchemaIRInput {
|
|
|
227
240
|
* was a plain-data literal or already-constructed class instances.
|
|
228
241
|
*/
|
|
229
242
|
declare class SqlSchemaIR extends SqlSchemaIRNode {
|
|
243
|
+
readonly nodeTarget?: SqlSchemaTarget;
|
|
230
244
|
readonly tables: Readonly<Record<string, SqlTableIR>>;
|
|
231
245
|
readonly annotations?: SqlAnnotations;
|
|
232
246
|
constructor(input: SqlSchemaIRInput);
|
|
@@ -257,5 +271,5 @@ interface SqlTypeMetadataRegistry {
|
|
|
257
271
|
values(): IterableIterator<SqlTypeMetadata>;
|
|
258
272
|
}
|
|
259
273
|
//#endregion
|
|
260
|
-
export {
|
|
261
|
-
//# sourceMappingURL=types-
|
|
274
|
+
export { SqlSchemaIRNode as S, SqlColumnIRInput as _, SqlSchemaTarget as a, PrimaryKey as b, SqlUniqueIR as c, SqlIndexIRInput as d, SqlForeignKeyIR as f, SqlColumnIR as g, SqlAnnotations as h, SqlSchemaIRInput as i, SqlUniqueIRInput as l, SqlReferentialAction as m, SqlTypeMetadataRegistry as n, SqlTableIR as o, SqlForeignKeyIRInput as p, SqlSchemaIR as r, SqlTableIRInput as s, SqlTypeMetadata as t, SqlIndexIR as u, SqlCheckConstraintIR as v, PrimaryKeyInput as x, SqlCheckConstraintIRInput as y };
|
|
275
|
+
//# sourceMappingURL=types-DWEmV6V6.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DWEmV6V6.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;;;;AAEe;uBDgBO,eAAA,SAAwB,U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OAAA,EAAS,aAAA,CAAc,UAAA;EAAA,SACf,UAAA,GAAa,UAAA;EAAA,SACb,WAAA,GAAc,cAAA;EAAA,SACd,MAAA,GAAS,aAAA,CAAc,oBAAA;cAE5B,KAAA,EAAO,eAAA;AAAA;;;APxBrB;;;;;;;;AAAA,KQRY,eAAA;AAAA,UAEK,gBAAA;EAAA,SACN,MAAA,EAAQ,MAAA,SAAe,UAAA,GAAa,eAAA;EAAA,SACpC,WAAA,GAAc,cAAA;AAAA;;;;APZV;AASf;;;;;;cOgBa,WAAA,SAAoB,eAAA;EAAA,SAKtB,UAAA,GAAa,eAAA;EAAA,SACb,MAAA,EAAQ,QAAA,CAAS,MAAA,SAAe,UAAA;EAAA,SACxB,WAAA,GAAc,cAAA;cAEnB,KAAA,EAAO,gBAAA;AAAA;;;APlCN;AASf;;;;AATe,UQgCE,eAAA;ERtBN;EAAA,SQwBA,MAAA;;WAGA,WAAA;ERxBG;;AAAsB;;EAAtB,SQ8BH,UAAA;AAAA;AP7CX;;;;AAAA,UOoDiB,uBAAA;EACf,MAAA,IAAU,gBAAgB,CAAC,eAAA;AAAA"}
|
|
@@ -89,6 +89,7 @@ var SqlColumnIR = class extends SqlSchemaIRNode {
|
|
|
89
89
|
this.nullable = input.nullable;
|
|
90
90
|
if (input.default !== void 0) this.default = input.default;
|
|
91
91
|
if (input.annotations !== void 0) this.annotations = input.annotations;
|
|
92
|
+
if (input.many !== void 0) this.many = input.many;
|
|
92
93
|
freezeNode(this);
|
|
93
94
|
}
|
|
94
95
|
};
|
|
@@ -206,6 +207,7 @@ var SqlTableIR = class extends SqlSchemaIRNode {
|
|
|
206
207
|
* was a plain-data literal or already-constructed class instances.
|
|
207
208
|
*/
|
|
208
209
|
var SqlSchemaIR = class extends SqlSchemaIRNode {
|
|
210
|
+
nodeTarget = "sql";
|
|
209
211
|
tables;
|
|
210
212
|
constructor(input) {
|
|
211
213
|
super();
|
|
@@ -217,4 +219,4 @@ var SqlSchemaIR = class extends SqlSchemaIRNode {
|
|
|
217
219
|
//#endregion
|
|
218
220
|
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 };
|
|
219
221
|
|
|
220
|
-
//# sourceMappingURL=types-
|
|
222
|
+
//# sourceMappingURL=types-DWefi1qU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DWefi1qU.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 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\n/**\n * Target discriminant for a schema-root IR node. `'sql'` is the\n * target-agnostic generic root (SQLite uses it directly); target-specific\n * concretions set their own id (e.g. Postgres → `'postgres'`). It is an\n * enumerable own field so it survives a `{ ...schema }` spread (unlike the\n * non-enumerable, shared `kind` discriminator), which the multi-space verify\n * path relies on.\n */\nexport type SqlSchemaTarget = 'sql' | 'postgres';\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 // Optional on the type so plain-data `SqlSchemaIR`-shaped literals (common in\n // tests and the contract-derived schema) still satisfy it without restating\n // the field; instances always carry the concrete `'sql'`. `isPostgresSchemaIR`\n // reads it — an absent value is correctly not Postgres.\n readonly nodeTarget?: SqlSchemaTarget = 'sql';\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;CAEA,cAAc;EACZ,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GAClC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EAChB,CAAC;CACH;AACF;;;;;;;;;ACnBA,IAAa,aAAb,cAAgC,gBAAgB;CAC9C;CAGA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,CAC5E;EACA,IAAI,MAAM,eAAe,KAAA,GACvB,KAAK,aACH,MAAM,sBAAsB,aACxB,MAAM,aACN,IAAI,WAAW,MAAM,UAAU;EAEvC,IAAI,MAAM,gBAAgB,KAAA,GAAW,KAAK,cAAc,MAAM;EAC9D,IAAI,MAAM,WAAW,KAAA,KAAa,MAAM,OAAO,SAAS,GACtD,KAAK,SAAS,OAAO,OACnB,MAAM,OAAO,KAAK,MAChB,aAAa,uBAAuB,IAAI,IAAI,qBAAqB,CAAC,CACpE,CACF;EAEF,WAAW,IAAI;CACjB;AACF;;;;;;;;;;;;;ACnDA,IAAa,cAAb,cAAiC,gBAAgB;CAK/C,aAAwC;CACxC;CAGA,YAAY,OAAyB;EACnC,MAAM;EACN,KAAK,SAAS,OAAO,OACnB,OAAO,YACL,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,OAAO,CAC7C,KACA,aAAa,aAAa,IAAI,IAAI,WAAW,CAAC,CAChD,CAAC,CACH,CACF;EACA,IAAI,MAAM,gBAAgB,KAAA,GAAW,KAAK,cAAc,MAAM;EAC9D,WAAW,IAAI;CACjB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-schema-ir",
|
|
3
|
-
"version": "0.14.0-dev.
|
|
3
|
+
"version": "0.14.0-dev.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "SQL Schema IR types for schema introspection and verification",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@prisma-next/contract": "0.14.0-dev.
|
|
10
|
-
"@prisma-next/framework-components": "0.14.0-dev.
|
|
9
|
+
"@prisma-next/contract": "0.14.0-dev.20",
|
|
10
|
+
"@prisma-next/framework-components": "0.14.0-dev.20"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@prisma-next/test-utils": "0.14.0-dev.
|
|
14
|
-
"@prisma-next/tsconfig": "0.14.0-dev.
|
|
15
|
-
"@prisma-next/tsdown": "0.14.0-dev.
|
|
13
|
+
"@prisma-next/test-utils": "0.14.0-dev.20",
|
|
14
|
+
"@prisma-next/tsconfig": "0.14.0-dev.20",
|
|
15
|
+
"@prisma-next/tsdown": "0.14.0-dev.20",
|
|
16
16
|
"tsdown": "0.22.1",
|
|
17
17
|
"typescript": "5.9.3",
|
|
18
18
|
"vitest": "4.1.8"
|
package/src/exports/types.ts
CHANGED
package/src/ir/sql-column-ir.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface SqlColumnIRInput {
|
|
|
16
16
|
/** Raw database default expression (e.g. `'hello'::text`, `nextval('seq')`). */
|
|
17
17
|
readonly default?: string;
|
|
18
18
|
readonly annotations?: SqlAnnotations;
|
|
19
|
+
/** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
|
|
20
|
+
readonly many?: boolean;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -31,6 +33,8 @@ export class SqlColumnIR extends SqlSchemaIRNode {
|
|
|
31
33
|
readonly nullable: boolean;
|
|
32
34
|
declare readonly default?: string;
|
|
33
35
|
declare readonly annotations?: SqlAnnotations;
|
|
36
|
+
/** True when the column is a native array (e.g. `text[]`, `int4[]`). The `nativeType` carries the element type only (e.g. `text`, `int4`). */
|
|
37
|
+
declare readonly many?: boolean;
|
|
34
38
|
|
|
35
39
|
constructor(input: SqlColumnIRInput) {
|
|
36
40
|
super();
|
|
@@ -39,6 +43,7 @@ export class SqlColumnIR extends SqlSchemaIRNode {
|
|
|
39
43
|
this.nullable = input.nullable;
|
|
40
44
|
if (input.default !== undefined) this.default = input.default;
|
|
41
45
|
if (input.annotations !== undefined) this.annotations = input.annotations;
|
|
46
|
+
if (input.many !== undefined) this.many = input.many;
|
|
42
47
|
freezeNode(this);
|
|
43
48
|
}
|
|
44
49
|
}
|
package/src/ir/sql-schema-ir.ts
CHANGED
|
@@ -3,6 +3,16 @@ import type { SqlAnnotations } from './sql-column-ir';
|
|
|
3
3
|
import { SqlSchemaIRNode } from './sql-schema-ir-node';
|
|
4
4
|
import { SqlTableIR, type SqlTableIRInput } from './sql-table-ir';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Target discriminant for a schema-root IR node. `'sql'` is the
|
|
8
|
+
* target-agnostic generic root (SQLite uses it directly); target-specific
|
|
9
|
+
* concretions set their own id (e.g. Postgres → `'postgres'`). It is an
|
|
10
|
+
* enumerable own field so it survives a `{ ...schema }` spread (unlike the
|
|
11
|
+
* non-enumerable, shared `kind` discriminator), which the multi-space verify
|
|
12
|
+
* path relies on.
|
|
13
|
+
*/
|
|
14
|
+
export type SqlSchemaTarget = 'sql' | 'postgres';
|
|
15
|
+
|
|
6
16
|
export interface SqlSchemaIRInput {
|
|
7
17
|
readonly tables: Record<string, SqlTableIR | SqlTableIRInput>;
|
|
8
18
|
readonly annotations?: SqlAnnotations;
|
|
@@ -19,6 +29,11 @@ export interface SqlSchemaIRInput {
|
|
|
19
29
|
* was a plain-data literal or already-constructed class instances.
|
|
20
30
|
*/
|
|
21
31
|
export class SqlSchemaIR extends SqlSchemaIRNode {
|
|
32
|
+
// Optional on the type so plain-data `SqlSchemaIR`-shaped literals (common in
|
|
33
|
+
// tests and the contract-derived schema) still satisfy it without restating
|
|
34
|
+
// the field; instances always carry the concrete `'sql'`. `isPostgresSchemaIR`
|
|
35
|
+
// reads it — an absent value is correctly not Postgres.
|
|
36
|
+
readonly nodeTarget?: SqlSchemaTarget = 'sql';
|
|
22
37
|
readonly tables: Readonly<Record<string, SqlTableIR>>;
|
|
23
38
|
declare readonly annotations?: SqlAnnotations;
|
|
24
39
|
|
package/src/types.ts
CHANGED
|
@@ -25,7 +25,7 @@ export {
|
|
|
25
25
|
type SqlReferentialAction,
|
|
26
26
|
} from './ir/sql-foreign-key-ir';
|
|
27
27
|
export { SqlIndexIR, type SqlIndexIRInput } from './ir/sql-index-ir';
|
|
28
|
-
export { SqlSchemaIR, type SqlSchemaIRInput } from './ir/sql-schema-ir';
|
|
28
|
+
export { SqlSchemaIR, type SqlSchemaIRInput, type SqlSchemaTarget } from './ir/sql-schema-ir';
|
|
29
29
|
export { SqlSchemaIRNode } from './ir/sql-schema-ir-node';
|
|
30
30
|
export { SqlTableIR, type SqlTableIRInput } from './ir/sql-table-ir';
|
|
31
31
|
export { SqlUniqueIR, type SqlUniqueIRInput } from './ir/sql-unique-ir';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-C0WFfEkA.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 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}\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\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 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;CAEA,cAAc;EACZ,MAAM;EACN,OAAO,eAAe,MAAM,QAAQ;GAClC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EAChB,CAAC;CACH;AACF;;;;;;;;;ACnBA,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,uBAAb,cAA0C,gBAAgB;CACxD;CACA;CACA;CAEA,YAAY,OAAkC;EAC5C,MAAM;EACN,KAAK,OAAO,MAAM;EAClB,KAAK,SAAS,MAAM;EACpB,KAAK,kBAAkB,OAAO,OAAO,CAAC,GAAG,MAAM,eAAe,CAAC;EAC/D,WAAW,IAAI;CACjB;AACF;;;;;;;;;;ACJA,IAAa,cAAb,cAAiC,gBAAgB;CAC/C;CACA;CACA;CAIA,YAAY,OAAyB;EACnC,MAAM;EACN,KAAK,OAAO,MAAM;EAClB,KAAK,aAAa,MAAM;EACxB,KAAK,WAAW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IAAI,WAAW,CAAC,CAChD,CAAC,CACH,CACF;EACA,IAAI,MAAM,gBAAgB,KAAA,GAAW,KAAK,cAAc,MAAM;EAC9D,WAAW,IAAI;CACjB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-Du44_nsJ.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;;;;AAEe;uBDgBO,eAAA,SAAwB,UAAU;EAAA,SAC7C,IAAA;;;;;UCnBM,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;;;;;;;ADNX;cCgBa,oBAAA,SAA6B,eAAe;EAAA,SAC9C,IAAA;EAAA,SACA,MAAA;EAAA,SACA,eAAA;cAEG,KAAA,EAAO,yBAAA;AAAA;;;;;AFHrB;;KGdY,cAAA;EAAA,UACA,SAAiB;AAAA;AAAA,UAGZ,gBAAA;EAAA,SACN,IAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;;WAEA,OAAA;EAAA,SACA,WAAA,GAAc,cAAc;AAAA;;;;AFZxB;AASf;;;cEaa,WAAA,SAAoB,eAAA;EAAA,SACtB,IAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;EAAA,SACQ,OAAA;EAAA,SACA,WAAA,GAAc,cAAA;cAEnB,KAAA,EAAO,gBAAA;AAAA;;;KC9BT,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