@uncutsql/core 0.3.0 → 0.5.0
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/index.cjs +939 -60
- package/dist/index.d.cts +399 -22
- package/dist/index.d.ts +399 -22
- package/dist/index.js +928 -61
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,12 +10,16 @@ export interface TableIdentity {
|
|
|
10
10
|
readonly schema?: string;
|
|
11
11
|
}
|
|
12
12
|
export interface Constraint {
|
|
13
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
14
|
+
readonly comment?: string;
|
|
13
15
|
readonly kind: string;
|
|
14
16
|
readonly properties: {
|
|
15
17
|
readonly [key: string]: SchemaValue;
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
20
|
export interface DatabaseColumn {
|
|
21
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
22
|
+
readonly comment?: string;
|
|
19
23
|
readonly constraints: readonly Constraint[];
|
|
20
24
|
readonly dataType: SchemaValue;
|
|
21
25
|
readonly key: string;
|
|
@@ -23,6 +27,8 @@ export interface DatabaseColumn {
|
|
|
23
27
|
}
|
|
24
28
|
/** Standalone indexes belong to a table; keys are normalized within its namespace. */
|
|
25
29
|
export interface DatabaseIndex {
|
|
30
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
31
|
+
readonly comment?: string;
|
|
26
32
|
readonly key: string;
|
|
27
33
|
readonly name: string;
|
|
28
34
|
/**
|
|
@@ -38,6 +44,8 @@ export interface DatabaseIndex {
|
|
|
38
44
|
}
|
|
39
45
|
export interface DatabaseTable {
|
|
40
46
|
readonly columns: readonly DatabaseColumn[];
|
|
47
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
48
|
+
readonly comment?: string;
|
|
41
49
|
readonly constraints: readonly Constraint[];
|
|
42
50
|
readonly identity: TableIdentity;
|
|
43
51
|
readonly indexes?: readonly DatabaseIndex[];
|
|
@@ -48,7 +56,16 @@ export interface DatabaseTable {
|
|
|
48
56
|
};
|
|
49
57
|
}
|
|
50
58
|
export interface DatabaseView {
|
|
59
|
+
/**
|
|
60
|
+
* Comments of columns, keyed by output column name; each is non-empty. Absent and `{}` are the
|
|
61
|
+
* same value; writers omit the field when it would be empty.
|
|
62
|
+
*/
|
|
63
|
+
readonly columnComments?: {
|
|
64
|
+
readonly [column: string]: string;
|
|
65
|
+
};
|
|
51
66
|
readonly columns?: readonly string[];
|
|
67
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
68
|
+
readonly comment?: string;
|
|
52
69
|
readonly identity: TableIdentity;
|
|
53
70
|
readonly name: string;
|
|
54
71
|
/**
|
|
@@ -61,10 +78,17 @@ export interface DatabaseView {
|
|
|
61
78
|
readonly query: SchemaValue;
|
|
62
79
|
}
|
|
63
80
|
export interface DatabaseTrigger {
|
|
81
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
82
|
+
readonly comment?: string;
|
|
64
83
|
/** Dialect-normalized timing, event, condition and ordered actions. */
|
|
65
84
|
readonly definition: SchemaValue;
|
|
66
85
|
readonly identity: TableIdentity;
|
|
67
86
|
readonly name: string;
|
|
87
|
+
/**
|
|
88
|
+
* Where the name is unique. Absent: in its namespace (SQLite). `"target"`: on its target
|
|
89
|
+
* (PostgreSQL), so `identity` and `target` together are the key.
|
|
90
|
+
*/
|
|
91
|
+
readonly scope?: "target";
|
|
68
92
|
/** Normalized identity of the table or view that owns this trigger. */
|
|
69
93
|
readonly target: TableIdentity;
|
|
70
94
|
}
|
|
@@ -74,6 +98,8 @@ export interface SequenceOwner {
|
|
|
74
98
|
readonly table: TableIdentity;
|
|
75
99
|
}
|
|
76
100
|
export interface DatabaseSequence {
|
|
101
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
102
|
+
readonly comment?: string;
|
|
77
103
|
/**
|
|
78
104
|
* Dialect-normalized data type and parameters. Core compares it with `schemaValueEqual`
|
|
79
105
|
* and never interprets its keys.
|
|
@@ -87,6 +113,8 @@ export interface DatabaseSequence {
|
|
|
87
113
|
readonly owner?: SequenceOwner;
|
|
88
114
|
}
|
|
89
115
|
export interface DatabaseFunction {
|
|
116
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
117
|
+
readonly comment?: string;
|
|
90
118
|
/**
|
|
91
119
|
* Dialect-normalized language, arguments, result, attributes and body. Core compares it with
|
|
92
120
|
* `schemaValueEqual` and never interprets its keys.
|
|
@@ -108,6 +136,8 @@ export interface NamespaceIdentity {
|
|
|
108
136
|
readonly name: string;
|
|
109
137
|
}
|
|
110
138
|
export interface DatabaseNamespace {
|
|
139
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
140
|
+
readonly comment?: string;
|
|
111
141
|
readonly identity: NamespaceIdentity;
|
|
112
142
|
readonly name: string;
|
|
113
143
|
/** Namespaced keys retain vendor-specific features without teaching core their meaning. */
|
|
@@ -115,13 +145,40 @@ export interface DatabaseNamespace {
|
|
|
115
145
|
readonly [key: string]: SchemaValue;
|
|
116
146
|
};
|
|
117
147
|
}
|
|
148
|
+
export interface DatabaseExtension {
|
|
149
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
150
|
+
readonly comment?: string;
|
|
151
|
+
/** The name as the database stores it. Unique in a model. */
|
|
152
|
+
readonly name: string;
|
|
153
|
+
/** The namespace that holds the extension's objects; absent in dialects without namespaces. */
|
|
154
|
+
readonly schema?: string;
|
|
155
|
+
/** The pinned version. Absent: the server's default version at creation, never compared. */
|
|
156
|
+
readonly version?: string;
|
|
157
|
+
}
|
|
158
|
+
/** A named type that holds one of an ordered list of labels. */
|
|
159
|
+
export interface DatabaseEnum {
|
|
160
|
+
/** Documentation text: non-empty, compared exactly. Absent: no comment. */
|
|
161
|
+
readonly comment?: string;
|
|
162
|
+
readonly identity: TableIdentity;
|
|
163
|
+
readonly name: string;
|
|
164
|
+
/** Labels in sort order, unique, compared exactly (case and spaces count). May be empty. */
|
|
165
|
+
readonly values: readonly string[];
|
|
166
|
+
}
|
|
118
167
|
export interface DatabaseExternals {
|
|
168
|
+
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
169
|
+
readonly enums?: readonly DatabaseEnum[];
|
|
170
|
+
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
171
|
+
readonly extensions?: readonly DatabaseExtension[];
|
|
119
172
|
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
120
173
|
readonly functions?: readonly DatabaseFunction[];
|
|
121
174
|
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
122
175
|
readonly tables?: readonly DatabaseTable[];
|
|
123
176
|
}
|
|
124
177
|
export interface DatabaseSchema {
|
|
178
|
+
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
179
|
+
readonly enums?: readonly DatabaseEnum[];
|
|
180
|
+
/** Absent and `[]` are the same value; writers omit the field when it would be empty. */
|
|
181
|
+
readonly extensions?: readonly DatabaseExtension[];
|
|
125
182
|
/**
|
|
126
183
|
* Objects outside the managed scope that the model references. Diff, procedures and lowering
|
|
127
184
|
* never create, alter or drop them. Absent and `{}` are the same value.
|
|
@@ -138,6 +195,7 @@ export interface DatabaseSchema {
|
|
|
138
195
|
readonly views?: readonly DatabaseView[];
|
|
139
196
|
}
|
|
140
197
|
export declare const tableKey: (table: TableIdentity) => string;
|
|
198
|
+
export declare const triggerKey: (trigger: DatabaseTrigger) => string;
|
|
141
199
|
export declare const functionKey: (fn: Pick<DatabaseFunction, "identity" | "signature">) => string;
|
|
142
200
|
/** `schema.name(type, …)` for diagnostics; signature entries that are not strings print as JSON. */
|
|
143
201
|
export declare const functionLabel: (fn: Pick<DatabaseFunction, "identity" | "signature">) => string;
|
|
@@ -150,17 +208,97 @@ export interface ExternalObject {
|
|
|
150
208
|
}
|
|
151
209
|
/** The external objects of the models, tables before functions, each listed once by its key. */
|
|
152
210
|
export declare const externalObjects: (...databases: readonly DatabaseSchema[]) => readonly ExternalObject[];
|
|
211
|
+
export interface EnumObject {
|
|
212
|
+
readonly identity: TableIdentity;
|
|
213
|
+
/** `Enum schema.name` or `External enum schema.name`. */
|
|
214
|
+
readonly label: string;
|
|
215
|
+
}
|
|
216
|
+
/** The managed and external enums of the models, each listed once by its key. */
|
|
217
|
+
export declare const enumObjects: (...databases: readonly DatabaseSchema[]) => readonly EnumObject[];
|
|
218
|
+
/** The managed and external extensions of the models, each listed once by its name. */
|
|
219
|
+
export declare const extensionObjects: (...databases: readonly DatabaseSchema[]) => readonly DatabaseExtension[];
|
|
220
|
+
/** The object a comment belongs to. Table, column and other names are those of the after model. */
|
|
221
|
+
export type CommentTarget = {
|
|
222
|
+
readonly identity: TableIdentity;
|
|
223
|
+
readonly kind: "enum" | "sequence" | "table" | "view";
|
|
224
|
+
} |
|
|
225
|
+
/** `column` is a column key. */
|
|
226
|
+
{
|
|
227
|
+
readonly column: string;
|
|
228
|
+
readonly kind: "column";
|
|
229
|
+
readonly table: TableIdentity;
|
|
230
|
+
} |
|
|
231
|
+
/** `column` is an output column name. */
|
|
232
|
+
{
|
|
233
|
+
readonly column: string;
|
|
234
|
+
readonly kind: "viewColumn";
|
|
235
|
+
readonly view: TableIdentity;
|
|
236
|
+
} |
|
|
237
|
+
/** `index` is an index key. */
|
|
238
|
+
{
|
|
239
|
+
readonly index: string;
|
|
240
|
+
readonly kind: "index";
|
|
241
|
+
readonly table: TableIdentity;
|
|
242
|
+
} |
|
|
243
|
+
/** Core does not know constraint names: the constraint is its value, without its comment. */
|
|
244
|
+
{
|
|
245
|
+
readonly constraint: Constraint;
|
|
246
|
+
readonly kind: "constraint";
|
|
247
|
+
readonly table: TableIdentity;
|
|
248
|
+
} | {
|
|
249
|
+
readonly identity: TableIdentity;
|
|
250
|
+
readonly kind: "function";
|
|
251
|
+
readonly signature: readonly SchemaValue[];
|
|
252
|
+
} | {
|
|
253
|
+
readonly kind: "trigger";
|
|
254
|
+
readonly name: string;
|
|
255
|
+
readonly target: TableIdentity;
|
|
256
|
+
} | {
|
|
257
|
+
readonly identity: NamespaceIdentity;
|
|
258
|
+
readonly kind: "namespace";
|
|
259
|
+
} | {
|
|
260
|
+
readonly kind: "extension";
|
|
261
|
+
readonly name: string;
|
|
262
|
+
};
|
|
263
|
+
export interface CommentObject {
|
|
264
|
+
/** The relation or named object, for the location of a diagnostic. */
|
|
265
|
+
readonly identity: TableIdentity;
|
|
266
|
+
/** `Comment on table schema.name`, `Comment on column schema.table.column`, and so on. */
|
|
267
|
+
readonly label: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Every commented object of the models, externals included, and of `targets` (for example those of
|
|
271
|
+
* `SetComment` procedures), each listed once by its label. A dialect without comments refuses them.
|
|
272
|
+
*/
|
|
273
|
+
export declare const commentObjects: (databases: readonly DatabaseSchema[], targets?: readonly CommentTarget[]) => readonly CommentObject[];
|
|
153
274
|
export declare const namespaceKey: (namespace: NamespaceIdentity) => string;
|
|
154
275
|
/** The namespace that contains an object, or undefined when its identity has no schema level. */
|
|
155
276
|
export declare const namespaceOf: (identity: TableIdentity) => NamespaceIdentity | undefined;
|
|
156
277
|
/** Object property insertion order is not semantic; array order is retained. */
|
|
157
278
|
export declare const schemaValueEqual: (before: SchemaValue, after: SchemaValue) => boolean;
|
|
279
|
+
/** A table or other relation by catalog names, or one of its columns. */
|
|
280
|
+
export interface MissingObject {
|
|
281
|
+
readonly column?: string;
|
|
282
|
+
readonly table: TableIdentity;
|
|
283
|
+
}
|
|
158
284
|
export interface DiffDiagnostic {
|
|
159
285
|
/** Dialect adapters may contribute their own validation codes. */
|
|
160
286
|
readonly code: string;
|
|
161
287
|
readonly column?: string;
|
|
288
|
+
/**
|
|
289
|
+
* 0-based index of the failing statement's document in the parts given to
|
|
290
|
+
* `Dialect.combineSchemas`; absent for one document.
|
|
291
|
+
*/
|
|
292
|
+
readonly document?: number;
|
|
162
293
|
readonly message: string;
|
|
294
|
+
/**
|
|
295
|
+
* The object an `Undeclared<Kind>` diagnostic misses, when `table` and `column` do not name it
|
|
296
|
+
* (the statement refers to it from another object). Set and read by the dialect.
|
|
297
|
+
*/
|
|
298
|
+
readonly missing?: MissingObject;
|
|
163
299
|
readonly side: "before" | "after";
|
|
300
|
+
/** 0-based index of the failing statement in its document. */
|
|
301
|
+
readonly statement?: number;
|
|
164
302
|
readonly table: TableIdentity;
|
|
165
303
|
}
|
|
166
304
|
declare const SchemaDiffError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -267,6 +405,29 @@ export type FunctionChange = {
|
|
|
267
405
|
readonly after: DatabaseFunction;
|
|
268
406
|
readonly before: DatabaseFunction;
|
|
269
407
|
};
|
|
408
|
+
export interface EnumValueRename {
|
|
409
|
+
readonly after: string;
|
|
410
|
+
readonly before: string;
|
|
411
|
+
}
|
|
412
|
+
export type EnumChange = {
|
|
413
|
+
readonly _tag: "EnumAdded" | "EnumRemoved";
|
|
414
|
+
readonly enum: DatabaseEnum;
|
|
415
|
+
} | {
|
|
416
|
+
readonly _tag: "EnumRenamed" | "EnumChanged";
|
|
417
|
+
readonly after: DatabaseEnum;
|
|
418
|
+
readonly before: DatabaseEnum;
|
|
419
|
+
/** The accepted value renames. Other label differences are additions, removals or order. */
|
|
420
|
+
readonly values: readonly EnumValueRename[];
|
|
421
|
+
};
|
|
422
|
+
/** An extension that changes both its version and its schema has one change of each. */
|
|
423
|
+
export type ExtensionChange = {
|
|
424
|
+
readonly _tag: "ExtensionAdded" | "ExtensionRemoved";
|
|
425
|
+
readonly extension: DatabaseExtension;
|
|
426
|
+
} | {
|
|
427
|
+
readonly _tag: "ExtensionVersionChanged" | "ExtensionSchemaChanged";
|
|
428
|
+
readonly after: DatabaseExtension;
|
|
429
|
+
readonly before: DatabaseExtension;
|
|
430
|
+
};
|
|
270
431
|
/** A namespace change lists the namespace only; objects inside it keep their own changes. */
|
|
271
432
|
export type NamespaceChange = {
|
|
272
433
|
readonly _tag: "NamespaceAdded" | "NamespaceRemoved";
|
|
@@ -276,13 +437,20 @@ export type NamespaceChange = {
|
|
|
276
437
|
readonly after: DatabaseNamespace;
|
|
277
438
|
readonly before: DatabaseNamespace;
|
|
278
439
|
};
|
|
440
|
+
/** A changed comment of an object that both models hold. `target` names it in the after model. */
|
|
441
|
+
export interface CommentChange {
|
|
442
|
+
readonly _tag: "CommentChanged";
|
|
443
|
+
readonly after?: string;
|
|
444
|
+
readonly before?: string;
|
|
445
|
+
readonly target: CommentTarget;
|
|
446
|
+
}
|
|
279
447
|
export interface DropGuard {
|
|
280
448
|
/** Source column name. Omit to require an empty table. */
|
|
281
449
|
readonly column?: string;
|
|
282
450
|
readonly table: TableIdentity;
|
|
283
451
|
}
|
|
284
452
|
export interface DatabaseDiff {
|
|
285
|
-
readonly changes: readonly (NamespaceChange | TableChange | ViewChange | TriggerChange | SequenceChange | FunctionChange)[];
|
|
453
|
+
readonly changes: readonly (NamespaceChange | EnumChange | ExtensionChange | TableChange | ViewChange | TriggerChange | SequenceChange | FunctionChange | CommentChange)[];
|
|
286
454
|
readonly dropGuards?: readonly DropGuard[];
|
|
287
455
|
}
|
|
288
456
|
export declare const validateDatabase: (database: DatabaseSchema, side: DiffDiagnostic["side"]) => readonly DiffDiagnostic[];
|
|
@@ -292,6 +460,8 @@ export declare const validateDatabase: (database: DatabaseSchema, side: DiffDiag
|
|
|
292
460
|
* unique, including `public`) is the caller's to validate.
|
|
293
461
|
*/
|
|
294
462
|
export declare const checkManagedScope: (model: DatabaseSchema, managedSchemas: readonly string[]) => readonly DiffDiagnostic[];
|
|
463
|
+
/** Same kinds and properties in the same order; comments are compared by `diffComments`. */
|
|
464
|
+
export declare const constraintsEqual: (before: readonly Constraint[], after: readonly Constraint[]) => boolean;
|
|
295
465
|
export declare const compareTable: (before: DatabaseTable, after: DatabaseTable) => readonly TableAlteration[];
|
|
296
466
|
/** Table and column renames of a migration, keyed by the table's key before the rename. */
|
|
297
467
|
export interface SequenceRenames {
|
|
@@ -304,6 +474,28 @@ export declare const sequenceRenames: (changes: DatabaseDiff["changes"]) => Sequ
|
|
|
304
474
|
export declare const diffFunctions: (before: DatabaseSchema, after: DatabaseSchema) => readonly FunctionChange[];
|
|
305
475
|
/** Sequence changes. `renames` are the table and column renames the migration applies. */
|
|
306
476
|
export declare const diffSequences: (before: DatabaseSchema, after: DatabaseSchema, renames?: SequenceRenames) => readonly SequenceChange[];
|
|
477
|
+
/**
|
|
478
|
+
* Trigger changes, paired by `triggerKey`. `renames` are the table renames the migration applies: a
|
|
479
|
+
* trigger follows its renamed target. There are no trigger renames.
|
|
480
|
+
*/
|
|
481
|
+
export declare const diffTriggers: (before: DatabaseSchema, after: DatabaseSchema, renames?: SequenceRenames) => readonly TriggerChange[];
|
|
482
|
+
/** The enum and value renames of a migration, keyed by the enum's key before the rename. */
|
|
483
|
+
export interface EnumRenames {
|
|
484
|
+
readonly enums: ReadonlyMap<string, TableIdentity>;
|
|
485
|
+
/** Per enum, each renamed label before and after. */
|
|
486
|
+
readonly values: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Enum changes, paired by `tableKey`. A renamed enum has one `EnumRenamed`, whether or not its
|
|
490
|
+
* labels differ too. Removals and order are not judged here; external enums are ignored.
|
|
491
|
+
*/
|
|
492
|
+
export declare const diffEnums: (before: DatabaseSchema, after: DatabaseSchema, renames?: EnumRenames) => readonly EnumChange[];
|
|
493
|
+
/**
|
|
494
|
+
* Comment changes of the managed objects that both models hold. `changes` are the changes of the
|
|
495
|
+
* migration: their table, column, sequence and enum renames pair objects across a rename. Added and
|
|
496
|
+
* removed objects have no change here.
|
|
497
|
+
*/
|
|
498
|
+
export declare const diffComments: (before: DatabaseSchema, after: DatabaseSchema, changes?: DatabaseDiff["changes"]) => readonly CommentChange[];
|
|
307
499
|
/** Compare normalized relational models without parsing SQL or consulting a dialect. */
|
|
308
500
|
export declare const diffDatabases: (before: DatabaseSchema, after: DatabaseSchema) => Effect.Effect<DatabaseDiff, SchemaDiffError>;
|
|
309
501
|
interface TableProcedure {
|
|
@@ -319,6 +511,28 @@ export type MigrationProcedure = {
|
|
|
319
511
|
readonly _tag: "AlterNamespace";
|
|
320
512
|
readonly after: DatabaseNamespace;
|
|
321
513
|
readonly before: DatabaseNamespace;
|
|
514
|
+
} | {
|
|
515
|
+
readonly _tag: "CreateEnum" | "DropEnum";
|
|
516
|
+
readonly enum: DatabaseEnum;
|
|
517
|
+
} | {
|
|
518
|
+
readonly _tag: "RenameEnum" | "AlterEnum";
|
|
519
|
+
readonly after: DatabaseEnum;
|
|
520
|
+
readonly before: DatabaseEnum;
|
|
521
|
+
/** Labels to rename; other label differences are additions, removals or order. */
|
|
522
|
+
readonly values: readonly EnumValueRename[];
|
|
523
|
+
} | {
|
|
524
|
+
readonly _tag: "CreateExtension" | "DropExtension";
|
|
525
|
+
readonly extension: DatabaseExtension;
|
|
526
|
+
} | {
|
|
527
|
+
/** Changes the pinned version. */
|
|
528
|
+
readonly _tag: "UpdateExtension";
|
|
529
|
+
readonly after: DatabaseExtension;
|
|
530
|
+
readonly before: DatabaseExtension;
|
|
531
|
+
} | {
|
|
532
|
+
/** Changes the schema. */
|
|
533
|
+
readonly _tag: "MoveExtension";
|
|
534
|
+
readonly after: DatabaseExtension;
|
|
535
|
+
readonly before: DatabaseExtension;
|
|
322
536
|
} | {
|
|
323
537
|
readonly _tag: "CreateFunction" | "DropFunction";
|
|
324
538
|
readonly function: DatabaseFunction;
|
|
@@ -357,7 +571,13 @@ export type MigrationProcedure = {
|
|
|
357
571
|
readonly _tag: "AlterTable";
|
|
358
572
|
}) | (TableProcedure & {
|
|
359
573
|
readonly _tag: "RenameTable";
|
|
360
|
-
})
|
|
574
|
+
}) | {
|
|
575
|
+
/** Sets, changes or (without `after`) removes the comment of an object that both models hold. */
|
|
576
|
+
readonly _tag: "SetComment";
|
|
577
|
+
readonly after?: string;
|
|
578
|
+
readonly before?: string;
|
|
579
|
+
readonly target: CommentTarget;
|
|
580
|
+
};
|
|
361
581
|
export interface DatabaseMigration {
|
|
362
582
|
readonly dropGuards?: readonly DropGuard[];
|
|
363
583
|
readonly procedures: readonly MigrationProcedure[];
|
|
@@ -394,7 +614,7 @@ interface SemanticStructField extends SemanticElement {
|
|
|
394
614
|
}
|
|
395
615
|
/**
|
|
396
616
|
* Dialect-neutral, non-null database values. Numeric bounds are inclusive and exact decimal strings.
|
|
397
|
-
*
|
|
617
|
+
* Domains are equal when they are structurally equal, field and value order included.
|
|
398
618
|
*/
|
|
399
619
|
type SemanticValueDomain = {
|
|
400
620
|
readonly kind: "decimal" | "integer" | "real";
|
|
@@ -407,7 +627,14 @@ type SemanticValueDomain = {
|
|
|
407
627
|
readonly scale?: number;
|
|
408
628
|
};
|
|
409
629
|
} | {
|
|
410
|
-
readonly kind: "binary" | "boolean" | "date" | "json" | "opaque" | "
|
|
630
|
+
readonly kind: "binary" | "boolean" | "date" | "json" | "opaque" | "time" | "timestamp";
|
|
631
|
+
} | {
|
|
632
|
+
readonly kind: "text";
|
|
633
|
+
/**
|
|
634
|
+
* The only non-null values the type allows, in the type's order: unique, compared exactly,
|
|
635
|
+
* possibly empty. Absent: any text.
|
|
636
|
+
*/
|
|
637
|
+
readonly values?: readonly string[];
|
|
411
638
|
} | {
|
|
412
639
|
/** An ordered sequence. */
|
|
413
640
|
readonly element: SemanticElement;
|
|
@@ -443,6 +670,8 @@ interface SemanticInsertPolicy extends SemanticWritePolicy {
|
|
|
443
670
|
readonly omission: SemanticFact<"allowed" | "required">;
|
|
444
671
|
}
|
|
445
672
|
interface SemanticColumn {
|
|
673
|
+
/** The column's comment: non-empty, as the database stores it. */
|
|
674
|
+
readonly comment?: string;
|
|
446
675
|
/** A known null means there is no computed expression. */
|
|
447
676
|
readonly computed: SemanticFact<{
|
|
448
677
|
readonly storage: SemanticFact<"stored" | "virtual">;
|
|
@@ -482,6 +711,8 @@ interface SemanticForeignKey {
|
|
|
482
711
|
readonly target: SemanticForeignKeyTarget;
|
|
483
712
|
}
|
|
484
713
|
interface SemanticRelationIdentity {
|
|
714
|
+
/** The relation's comment: non-empty, as the database stores it. */
|
|
715
|
+
readonly comment?: string;
|
|
485
716
|
readonly identity: TableIdentity;
|
|
486
717
|
readonly kind: "table" | "view";
|
|
487
718
|
/** Original SQL relation name. */
|
|
@@ -521,16 +752,63 @@ interface SemanticSchemaResolution {
|
|
|
521
752
|
readonly diagnostics: readonly SemanticDiagnostic[];
|
|
522
753
|
readonly schema: SemanticDatabaseSchema;
|
|
523
754
|
}
|
|
755
|
+
/** One change of one statement of a source (ADR 0037 Decision 3). */
|
|
756
|
+
type StatementEdit = {
|
|
757
|
+
readonly action: "skip";
|
|
758
|
+
/** 0-based index of the statement in the source, as `DiffDiagnostic.statement`. */
|
|
759
|
+
readonly statement: number;
|
|
760
|
+
} | {
|
|
761
|
+
readonly action: "retarget";
|
|
762
|
+
/** The `Undeclared<Kind>` failure of the statement, as `toDatabaseSchema` reported it. */
|
|
763
|
+
readonly diagnostic: DiffDiagnostic;
|
|
764
|
+
readonly statement: number;
|
|
765
|
+
/** The name of an existing object of the same kind and owner, written as the dialect's SQL. */
|
|
766
|
+
readonly target: string;
|
|
767
|
+
};
|
|
768
|
+
declare const StatementEditError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
769
|
+
readonly _tag: "StatementEditError";
|
|
770
|
+
} & Readonly<A>;
|
|
771
|
+
export declare class StatementEditError extends StatementEditError_base<{
|
|
772
|
+
readonly message: string;
|
|
773
|
+
readonly reason: "DuplicateEdit" | "InvalidTarget" | "OutOfRange" | "UnsupportedRetarget";
|
|
774
|
+
/** The index the refused edit gave. */
|
|
775
|
+
readonly statement: number;
|
|
776
|
+
}> {}
|
|
777
|
+
/**
|
|
778
|
+
* What a statement resolved against externals (ADR 0038 Decision 1), told to the
|
|
779
|
+
* `onExternalUse` option of `Dialect.toDatabaseSchema`.
|
|
780
|
+
*/
|
|
781
|
+
interface ExternalUse {
|
|
782
|
+
/** Index of the document in a combined schema, as in `DiffDiagnostic`. */
|
|
783
|
+
readonly document?: number;
|
|
784
|
+
/** The part used: a table with only the used columns and keys, a function, an enum or an extension. */
|
|
785
|
+
readonly externals: DatabaseExternals;
|
|
786
|
+
readonly statement: number;
|
|
787
|
+
}
|
|
524
788
|
/** Dialect capabilities. The caller owns comparison and logical planning. */
|
|
525
789
|
interface Dialect<Ast, PhysicalPlan, E extends Error = Error, R = never, SemanticError extends Error = E, SemanticServices = R> {
|
|
526
790
|
/** Combine independently parsed schema documents in source order. */
|
|
527
791
|
readonly combineSchemas?: (parts: readonly Ast[]) => Ast;
|
|
792
|
+
/**
|
|
793
|
+
* Applies edits to the statements of one source, through the dialect's own parser and codecs,
|
|
794
|
+
* and returns the source with every character outside the edited statements unchanged.
|
|
795
|
+
* `skip` removes the statement and its terminator; `retarget` rewrites, in that statement only,
|
|
796
|
+
* the names that denote the missing object, and writes the statement in its encoded form. The
|
|
797
|
+
* result is not replayed. Absent when the dialect cannot edit statements yet.
|
|
798
|
+
*/
|
|
799
|
+
readonly editStatements?: (source: string, edits: readonly StatementEdit[]) => Effect.Effect<string, E | StatementEditError, R>;
|
|
528
800
|
/** The model of an empty database, used as the migration baseline before the first migration. Defaults to `{ tables: [] }`. */
|
|
529
801
|
readonly emptyDatabaseSchema?: DatabaseSchema;
|
|
530
802
|
readonly encodeMigration: (plan: PhysicalPlan) => Effect.Effect<string, E, R>;
|
|
531
803
|
readonly format: (ast: Ast) => Effect.Effect<string, E, R>;
|
|
532
804
|
readonly lowerMigration: (migration: DatabaseMigration, before: DatabaseSchema, after: DatabaseSchema) => Effect.Effect<PhysicalPlan, E, R>;
|
|
533
805
|
readonly name: string;
|
|
806
|
+
/**
|
|
807
|
+
* The normal form used to compare structures (`diffStructures`). It folds only distinctions
|
|
808
|
+
* the engine does not store: the column or table form of a constraint, an omitted constraint
|
|
809
|
+
* name versus the name the engine derives, and constraint order. Identity when absent.
|
|
810
|
+
*/
|
|
811
|
+
readonly normalizeSchema?: (schema: DatabaseSchema) => Effect.Effect<DatabaseSchema, E, R>;
|
|
534
812
|
readonly parse: (source: string) => Effect.Effect<Ast, E, R>;
|
|
535
813
|
/** Derive semantic facts from a structural schema, including decoded snapshots. */
|
|
536
814
|
readonly resolveSemanticSchema?: (schema: DatabaseSchema) => Effect.Effect<SemanticSchemaResolution, SemanticError, SemanticServices>;
|
|
@@ -541,13 +819,58 @@ interface Dialect<Ast, PhysicalPlan, E extends Error = Error, R = never, Semanti
|
|
|
541
819
|
* `false`, a migration with guards is refused before lowering.
|
|
542
820
|
*/
|
|
543
821
|
readonly supportsDropGuards?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* When `true`, `toDatabaseSchema` honors `options.externals`: externals declared elsewhere count
|
|
824
|
+
* as declared before the first statement, one is hidden while the structure manages it, and
|
|
825
|
+
* none causes a diagnostic by existing (ADR 0036 amendment A2). When absent or `false`, the
|
|
826
|
+
* options are ignored.
|
|
827
|
+
*
|
|
828
|
+
* `options.onExternalUse` is honored only when this is `true`: it is told what references
|
|
829
|
+
* resolved against externals, seeded or declared in the document, with that declaration's shape.
|
|
830
|
+
* It reports on the same conversion, whose result and diagnostics do not depend on it (ADR 0038
|
|
831
|
+
* Decision 1).
|
|
832
|
+
*/
|
|
833
|
+
readonly supportsExternals?: boolean;
|
|
544
834
|
/**
|
|
545
835
|
* When `true`, a project may list the schemas it manages (ADR 0024 Decision 1). When absent or
|
|
546
836
|
* `false`, the caller refuses such a list by name.
|
|
547
837
|
*/
|
|
548
838
|
readonly supportsManagedSchemas?: boolean;
|
|
549
|
-
readonly toDatabaseSchema: (ast: Ast, side?: DiffDiagnostic["side"]
|
|
550
|
-
|
|
839
|
+
readonly toDatabaseSchema: (ast: Ast, side?: DiffDiagnostic["side"], options?: {
|
|
840
|
+
readonly externals?: DatabaseExternals;
|
|
841
|
+
readonly onExternalUse?: (use: ExternalUse) => void;
|
|
842
|
+
}) => Effect.Effect<DatabaseSchema, E, R>;
|
|
843
|
+
}
|
|
844
|
+
/** An external of `after` that `before` lacks (`new`) or declares differently (`changed`). */
|
|
845
|
+
type ExternalChange = {
|
|
846
|
+
readonly change: "changed" | "new";
|
|
847
|
+
/** The key the model identifies the external by: its name for an extension. */
|
|
848
|
+
readonly key: string;
|
|
849
|
+
} & ({
|
|
850
|
+
readonly external: DatabaseEnum;
|
|
851
|
+
readonly kind: "enum";
|
|
852
|
+
} | {
|
|
853
|
+
readonly external: DatabaseExtension;
|
|
854
|
+
readonly kind: "extension";
|
|
855
|
+
} | {
|
|
856
|
+
readonly external: DatabaseFunction;
|
|
857
|
+
readonly kind: "function";
|
|
858
|
+
} | {
|
|
859
|
+
readonly external: DatabaseTable;
|
|
860
|
+
readonly kind: "table";
|
|
861
|
+
});
|
|
862
|
+
/**
|
|
863
|
+
* The externals that are new or changed from `before` to `after`: enums, extensions, functions,
|
|
864
|
+
* then tables, each in the order of `after`. An external is changed when its declaration is not
|
|
865
|
+
* structurally equal. Removed externals are not listed.
|
|
866
|
+
*/
|
|
867
|
+
export declare const changedExternals: (before: DatabaseExternals | undefined, after: DatabaseExternals | undefined) => readonly ExternalChange[];
|
|
868
|
+
/**
|
|
869
|
+
* Structural comparison of two models (ADR 0036 Decision 5): `diffDatabases` after the
|
|
870
|
+
* dialect's `normalizeSchema`, applied to both sides, or the identity when absent. The two
|
|
871
|
+
* structures are equal when the result has no change.
|
|
872
|
+
*/
|
|
873
|
+
export declare const diffStructures: <E extends Error, R>(dialect: Pick<Dialect<unknown, unknown, E, R>, "normalizeSchema">, a: DatabaseSchema, b: DatabaseSchema) => Effect.Effect<DatabaseDiff, E | SchemaDiffError, R>;
|
|
551
874
|
declare const SchemaModelError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
552
875
|
readonly _tag: "SchemaModelError";
|
|
553
876
|
} & Readonly<A>;
|
|
@@ -561,10 +884,14 @@ interface MigrationSource {
|
|
|
561
884
|
/** A root baseline records the original prefix tip as the logical checkpoint. */
|
|
562
885
|
readonly baselineCheckpoint?: string;
|
|
563
886
|
readonly down?: {
|
|
887
|
+
/** What the down SQL relies on (ADR 0038 Decision 2). */
|
|
888
|
+
readonly externals?: DatabaseExternals;
|
|
564
889
|
readonly sql: string;
|
|
565
890
|
} | {
|
|
566
891
|
readonly reason: string;
|
|
567
892
|
};
|
|
893
|
+
/** What the up SQL relies on (ADR 0038 Decision 2). */
|
|
894
|
+
readonly externals?: DatabaseExternals;
|
|
568
895
|
readonly id: number;
|
|
569
896
|
readonly sha256: string;
|
|
570
897
|
/** The whole migration file, including the CLI's `-- ` header lines. */
|
|
@@ -579,24 +906,60 @@ interface ExecutionResult {
|
|
|
579
906
|
readonly lastAppliedId: number;
|
|
580
907
|
readonly rolledBackId?: number;
|
|
581
908
|
}
|
|
909
|
+
interface ReplayOptions {
|
|
910
|
+
/** External declarations of the generation lock, created as stand-ins before replay (ADR 0024). */
|
|
911
|
+
readonly externals?: DatabaseExternals;
|
|
912
|
+
/** A database to replay in instead of the driver's default; nothing is kept in it. */
|
|
913
|
+
readonly replayDatabase?: string;
|
|
914
|
+
}
|
|
915
|
+
interface ExecutionOptions {
|
|
916
|
+
/** Told, at most once per call, that the call is waiting for the migration lock. */
|
|
917
|
+
readonly onLockWait?: (message: string) => Effect.Effect<void>;
|
|
918
|
+
}
|
|
919
|
+
interface ExtractOptions {
|
|
920
|
+
/** ADR 0024 managed schemas. Set only when configured and the dialect supports them. */
|
|
921
|
+
readonly managedSchemas?: readonly string[];
|
|
922
|
+
}
|
|
923
|
+
interface ExtractedPart {
|
|
924
|
+
/** The owning object, as written in messages. */
|
|
925
|
+
readonly name: string;
|
|
926
|
+
/** Directory segments, then the file stem, relative to the destination. Absent means `[name]`. */
|
|
927
|
+
readonly path?: readonly string[];
|
|
928
|
+
readonly sql: string;
|
|
929
|
+
}
|
|
930
|
+
interface ExtractOmission {
|
|
931
|
+
readonly category: "dependent" | "unmanaged" | "unsupported";
|
|
932
|
+
/** For `dependent`, the omitted object it depends on; otherwise an optional reason. */
|
|
933
|
+
readonly detail?: string;
|
|
934
|
+
/** For example "partitioned table", "policy", "column type ltree". */
|
|
935
|
+
readonly kind: string;
|
|
936
|
+
/** Qualified catalog name: schema.object, then the sub-object (column, constraint, index, trigger, policy). */
|
|
937
|
+
readonly name: string;
|
|
938
|
+
}
|
|
939
|
+
interface ExtractResult {
|
|
940
|
+
/** Informational lines printed after success. */
|
|
941
|
+
readonly notes?: readonly string[];
|
|
942
|
+
readonly omitted: readonly ExtractOmission[];
|
|
943
|
+
/** In load order: concatenated in this order, and sorted by path, the parts give the same order. */
|
|
944
|
+
readonly parts: readonly ExtractedPart[];
|
|
945
|
+
}
|
|
946
|
+
/** One line per omission, ordered by category (unsupported, unmanaged, dependent), then name. */
|
|
947
|
+
export declare const formatExtractOmissions: (omitted: readonly ExtractOmission[]) => readonly string[];
|
|
582
948
|
/** Optional execution capability, selected and wired by the consumer separately from syntax. */
|
|
583
949
|
interface MigrationExecutor<E extends Error = Error, R = never> {
|
|
584
950
|
/** Verify a replayed prefix against an existing target, then initialize its history. */
|
|
585
|
-
readonly adopt?: <V extends Error, RV>(target: string, prefix: readonly MigrationSource[], verifySchema: (actual: DatabaseSchema, expected: DatabaseSchema) => Effect.Effect<void, V, RV>, desired?: DatabaseSchema) => Effect.Effect<void, E | V, R | RV>;
|
|
951
|
+
readonly adopt?: <V extends Error, RV>(target: string, prefix: readonly MigrationSource[], verifySchema: (actual: DatabaseSchema, expected: DatabaseSchema) => Effect.Effect<void, V, RV>, desired?: DatabaseSchema, options?: ReplayOptions) => Effect.Effect<void, E | V, R | RV>;
|
|
586
952
|
readonly apply: <V extends Error, RV>(target: string, migrations: readonly MigrationSource[], desired: DatabaseSchema, verifySchema: (actual: DatabaseSchema, expected: DatabaseSchema, stage: "applied" | "desired") => Effect.Effect<void, V, RV>,
|
|
587
953
|
/** With a checkpoint, files start immediately after it (at it for rollback).
|
|
588
954
|
* Recheck the database position under the write transaction before executing. */
|
|
589
|
-
checkpoint?: MigrationCheckpoint) => Effect.Effect<ExecutionResult, E | V, R | RV>;
|
|
590
|
-
readonly checkpoint: (target: string) => Effect.Effect<MigrationCheckpoint, E, R>;
|
|
955
|
+
checkpoint?: MigrationCheckpoint, options?: ExecutionOptions) => Effect.Effect<ExecutionResult, E | V, R | RV>;
|
|
956
|
+
readonly checkpoint: (target: string, options?: ExecutionOptions) => Effect.Effect<MigrationCheckpoint, E, R>;
|
|
591
957
|
/** Replay a verified prefix on an empty database and render its state as one SQL migration. */
|
|
592
|
-
readonly compact?: (migrations: readonly MigrationSource[]) => Effect.Effect<string, E, R>;
|
|
958
|
+
readonly compact?: (migrations: readonly MigrationSource[], options?: ReplayOptions) => Effect.Effect<string, E, R>;
|
|
593
959
|
/** Equal to the `Dialect.name` that produced the lock. Core and the CLI compare it only for equality. */
|
|
594
960
|
readonly dialect: string;
|
|
595
|
-
/** Schema-only SQL
|
|
596
|
-
readonly extract?: (target: string) => Effect.Effect<
|
|
597
|
-
readonly name: string;
|
|
598
|
-
readonly sql: string;
|
|
599
|
-
}[], E, R>;
|
|
961
|
+
/** Schema-only SQL in parts, with the objects the driver left out. */
|
|
962
|
+
readonly extract?: (target: string, options?: ExtractOptions) => Effect.Effect<ExtractResult, E, R>;
|
|
600
963
|
/** Undo only the most recently applied migration. */
|
|
601
964
|
readonly rollback?: MigrationExecutor<E, R>["apply"];
|
|
602
965
|
}
|
|
@@ -615,10 +978,9 @@ export declare const migrationRun: (direction: "up" | "down", migrations: readon
|
|
|
615
978
|
export declare const continuesRun: (run: MigrationRun, migrations: readonly MigrationSource[], checkpoint: MigrationCheckpoint | undefined, tip: MigrationCheckpoint) => boolean;
|
|
616
979
|
/** The file to execute after the tip, or `undefined` when the run is complete. */
|
|
617
980
|
export declare const nextMigration: (run: MigrationRun, migrations: readonly MigrationSource[], tipId: number) => MigrationSource | undefined;
|
|
618
|
-
|
|
619
|
-
/** Added
|
|
981
|
+
interface DecisionQuestion {
|
|
982
|
+
/** Added names, column keys or enum labels, not guesses: none is selected automatically. */
|
|
620
983
|
readonly candidates: readonly string[];
|
|
621
|
-
readonly column?: string;
|
|
622
984
|
readonly id: string;
|
|
623
985
|
readonly question: string;
|
|
624
986
|
readonly resolution: {
|
|
@@ -629,8 +991,19 @@ export interface MigrationDecision {
|
|
|
629
991
|
readonly action: "rename";
|
|
630
992
|
readonly target: string;
|
|
631
993
|
};
|
|
994
|
+
}
|
|
995
|
+
/** A removed table, or a removed column when `column` is set. */
|
|
996
|
+
export interface TableMigrationDecision extends DecisionQuestion {
|
|
997
|
+
readonly column?: string;
|
|
632
998
|
readonly table: TableIdentity;
|
|
633
999
|
}
|
|
1000
|
+
/** A removed enum, or a removed label when `value` is set. `drop_if_empty` does not apply. */
|
|
1001
|
+
export interface EnumMigrationDecision extends DecisionQuestion {
|
|
1002
|
+
/** The enum's identity before the migration. */
|
|
1003
|
+
readonly enum: TableIdentity;
|
|
1004
|
+
readonly value?: string;
|
|
1005
|
+
}
|
|
1006
|
+
export type MigrationDecision = TableMigrationDecision | EnumMigrationDecision;
|
|
634
1007
|
export interface MigrationDecisions {
|
|
635
1008
|
readonly after: DatabaseSchema;
|
|
636
1009
|
readonly before: DatabaseSchema;
|
|
@@ -667,7 +1040,7 @@ export interface SourceSpan {
|
|
|
667
1040
|
readonly end: number;
|
|
668
1041
|
readonly start: number;
|
|
669
1042
|
}
|
|
670
|
-
export type SchemaSymbolKind = "column" | "function" | "index" | "namespace" | "table" | "trigger" | "view";
|
|
1043
|
+
export type SchemaSymbolKind = "column" | "extension" | "function" | "index" | "namespace" | "table" | "trigger" | "type" | "view";
|
|
671
1044
|
export interface SchemaSymbol {
|
|
672
1045
|
readonly children: readonly SchemaSymbol[];
|
|
673
1046
|
/** Short context shown next to the name, such as the written namespace. */
|
|
@@ -701,7 +1074,7 @@ export interface SchemaReference extends SourceSpan {
|
|
|
701
1074
|
readonly selection?: SourceSpan;
|
|
702
1075
|
}
|
|
703
1076
|
/** Where an unresolved identifier token was found. */
|
|
704
|
-
export type SchemaNameContext = "check" | "default" | "generated" | "index" | "query" | "table" | "trigger" | "view";
|
|
1077
|
+
export type SchemaNameContext = "check" | "comment" | "default" | "generated" | "index" | "query" | "table" | "trigger" | "type" | "view";
|
|
705
1078
|
/** An identifier token the service does not resolve. `nameKey` is built like `SchemaDeclaration.nameKey`. */
|
|
706
1079
|
export interface SchemaNameUse extends SourceSpan {
|
|
707
1080
|
readonly context: SchemaNameContext;
|
|
@@ -744,7 +1117,11 @@ export interface SchemaCandidate {
|
|
|
744
1117
|
readonly text: string;
|
|
745
1118
|
}
|
|
746
1119
|
export interface LanguageService {
|
|
747
|
-
/**
|
|
1120
|
+
/**
|
|
1121
|
+
* Analyzes one document. Synchronous and total: it never throws. Each diagnostic is either a
|
|
1122
|
+
* parse failure or a statement whose precondition fails (it cannot apply). Either kind means the
|
|
1123
|
+
* document has errors, which suspends project checks.
|
|
1124
|
+
*/
|
|
748
1125
|
readonly analyze: (source: string) => SchemaAnalysis;
|
|
749
1126
|
/** The completion context at `offset`. Pure, synchronous and total; `undefined` where no site is known. */
|
|
750
1127
|
readonly complete?: (source: string, offset: number) => SchemaCompletion | undefined;
|
|
@@ -882,4 +1259,4 @@ interface DynamicGeneratorPlugin {
|
|
|
882
1259
|
export declare const decodeMapperPlugin: (value: unknown) => Effect.Effect<DynamicMapperPlugin, CodegenError>;
|
|
883
1260
|
/** Validate the generator value selected from a module by the consumer. */
|
|
884
1261
|
export declare const decodeGeneratorPlugin: (value: unknown) => Effect.Effect<DynamicGeneratorPlugin, CodegenError>;
|
|
885
|
-
export type { ApplicationContract, ApplicationMapper, CodegenDiagnostic, ColumnIdentity, Dialect, DynamicGeneratorPlugin, DynamicMapperPlugin, ExecutionResult, GeneratedFile, GenerationResult, Generator, GeneratorDescriptor, GeneratorPlugin, MapperDescriptor, MapperPlugin, MappingResult, MigrationCheckpoint, MigrationExecutor, MigrationRun, MigrationSource, SemanticColumn, SemanticColumnType, SemanticDatabaseSchema, SemanticDiagnostic, SemanticDiagnosticSubject, SemanticElement, SemanticFact, SemanticForeignKey, SemanticForeignKeyTarget, SemanticInsertPolicy, SemanticKey, SemanticRelation, SemanticSchemaResolution, SemanticStructField, SemanticValueDomain, SemanticWritePolicy };
|
|
1262
|
+
export type { ApplicationContract, ApplicationMapper, CodegenDiagnostic, ColumnIdentity, Dialect, DynamicGeneratorPlugin, DynamicMapperPlugin, ExecutionOptions, ExecutionResult, ExternalChange, ExternalUse, ExtractOmission, ExtractOptions, ExtractResult, ExtractedPart, GeneratedFile, GenerationResult, Generator, GeneratorDescriptor, GeneratorPlugin, MapperDescriptor, MapperPlugin, MappingResult, MigrationCheckpoint, MigrationExecutor, MigrationRun, MigrationSource, ReplayOptions, SemanticColumn, SemanticColumnType, SemanticDatabaseSchema, SemanticDiagnostic, SemanticDiagnosticSubject, SemanticElement, SemanticFact, SemanticForeignKey, SemanticForeignKeyTarget, SemanticInsertPolicy, SemanticKey, SemanticRelation, SemanticSchemaResolution, SemanticStructField, SemanticValueDomain, SemanticWritePolicy, StatementEdit };
|