arkormx 2.0.0-next.2 → 2.0.0-next.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/cli.mjs +1287 -155
- package/dist/index.cjs +7227 -5599
- package/dist/index.d.cts +539 -99
- package/dist/index.d.mts +539 -99
- package/dist/index.mjs +7225 -5631
- package/package.json +1 -1
- package/stubs/model.js.stub +1 -1
- package/stubs/model.stub +2 -2
- package/stubs/pivot-model.stub +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,113 @@ import { Command } from "@h3ravel/musket";
|
|
|
3
3
|
import { Collection } from "@h3ravel/collect.js";
|
|
4
4
|
import { PrismaClient } from "@prisma/client";
|
|
5
5
|
|
|
6
|
+
//#region src/types/migrations.d.ts
|
|
7
|
+
type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
|
|
8
|
+
interface PrimaryKeyGeneration {
|
|
9
|
+
strategy: 'uuid';
|
|
10
|
+
prismaDefault?: string;
|
|
11
|
+
databaseDefault?: string;
|
|
12
|
+
runtimeFactory?: 'uuid';
|
|
13
|
+
}
|
|
14
|
+
interface TimestampColumnBehavior {
|
|
15
|
+
column: string;
|
|
16
|
+
default?: 'now()';
|
|
17
|
+
updatedAt?: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface SchemaColumn {
|
|
20
|
+
name: string;
|
|
21
|
+
type: SchemaColumnType;
|
|
22
|
+
enumName?: string;
|
|
23
|
+
enumValues?: string[];
|
|
24
|
+
map?: string;
|
|
25
|
+
nullable?: boolean;
|
|
26
|
+
unique?: boolean;
|
|
27
|
+
primary?: boolean;
|
|
28
|
+
autoIncrement?: boolean;
|
|
29
|
+
after?: string;
|
|
30
|
+
default?: unknown;
|
|
31
|
+
updatedAt?: boolean;
|
|
32
|
+
primaryKeyGeneration?: PrimaryKeyGeneration;
|
|
33
|
+
}
|
|
34
|
+
interface SchemaIndex {
|
|
35
|
+
columns: string[];
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
type SchemaForeignKeyAction = 'cascade' | 'restrict' | 'setNull' | 'noAction' | 'setDefault';
|
|
39
|
+
interface SchemaForeignKey {
|
|
40
|
+
column: string;
|
|
41
|
+
referencesTable: string;
|
|
42
|
+
referencesColumn: string;
|
|
43
|
+
onDelete?: SchemaForeignKeyAction;
|
|
44
|
+
relationAlias?: string;
|
|
45
|
+
inverseRelationAlias?: string;
|
|
46
|
+
fieldAlias?: string;
|
|
47
|
+
}
|
|
48
|
+
interface SchemaTableCreateOperation {
|
|
49
|
+
type: 'createTable';
|
|
50
|
+
table: string;
|
|
51
|
+
columns: SchemaColumn[];
|
|
52
|
+
indexes: SchemaIndex[];
|
|
53
|
+
foreignKeys: SchemaForeignKey[];
|
|
54
|
+
}
|
|
55
|
+
interface SchemaTableAlterOperation {
|
|
56
|
+
type: 'alterTable';
|
|
57
|
+
table: string;
|
|
58
|
+
addColumns: SchemaColumn[];
|
|
59
|
+
dropColumns: string[];
|
|
60
|
+
addIndexes: SchemaIndex[];
|
|
61
|
+
addForeignKeys: SchemaForeignKey[];
|
|
62
|
+
}
|
|
63
|
+
interface SchemaTableDropOperation {
|
|
64
|
+
type: 'dropTable';
|
|
65
|
+
table: string;
|
|
66
|
+
}
|
|
67
|
+
type SchemaOperation = SchemaTableCreateOperation | SchemaTableAlterOperation | SchemaTableDropOperation;
|
|
68
|
+
interface GenerateMigrationOptions {
|
|
69
|
+
directory?: string;
|
|
70
|
+
extension?: 'ts' | 'js';
|
|
71
|
+
write?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface GeneratedMigrationFile {
|
|
74
|
+
fileName: string;
|
|
75
|
+
filePath: string;
|
|
76
|
+
className: string;
|
|
77
|
+
content: string;
|
|
78
|
+
}
|
|
79
|
+
interface PrismaSchemaSyncOptions {
|
|
80
|
+
schemaPath?: string;
|
|
81
|
+
write?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface PrismaMigrationWorkflowOptions extends PrismaSchemaSyncOptions {
|
|
84
|
+
cwd?: string;
|
|
85
|
+
runGenerate?: boolean;
|
|
86
|
+
runMigrate?: boolean;
|
|
87
|
+
migrateMode?: 'dev' | 'deploy';
|
|
88
|
+
migrationName?: string;
|
|
89
|
+
}
|
|
90
|
+
type MigrationInstanceLike = {
|
|
91
|
+
up: (...args: any[]) => Promise<void> | void;
|
|
92
|
+
down: (...args: any[]) => Promise<void> | void;
|
|
93
|
+
};
|
|
94
|
+
interface AppliedMigrationEntry {
|
|
95
|
+
id: string;
|
|
96
|
+
file: string;
|
|
97
|
+
className: string;
|
|
98
|
+
appliedAt: string;
|
|
99
|
+
checksum?: string;
|
|
100
|
+
}
|
|
101
|
+
interface AppliedMigrationRun {
|
|
102
|
+
id: string;
|
|
103
|
+
appliedAt: string;
|
|
104
|
+
migrationIds: string[];
|
|
105
|
+
}
|
|
106
|
+
interface AppliedMigrationsState {
|
|
107
|
+
version: 1;
|
|
108
|
+
migrations: AppliedMigrationEntry[];
|
|
109
|
+
runs?: AppliedMigrationRun[];
|
|
110
|
+
}
|
|
111
|
+
type MigrationClass = new () => MigrationInstanceLike;
|
|
112
|
+
//#endregion
|
|
6
113
|
//#region src/types/core.d.ts
|
|
7
114
|
type CastType = 'string' | 'number' | 'boolean' | 'date' | 'json' | 'array';
|
|
8
115
|
interface CastHandler<T = unknown> {
|
|
@@ -29,6 +136,26 @@ interface ArkormBootContext {
|
|
|
29
136
|
prisma?: PrismaClientLike;
|
|
30
137
|
bindAdapter: (adapter: DatabaseAdapter, models: AdapterBindableModel[]) => DatabaseAdapter;
|
|
31
138
|
}
|
|
139
|
+
interface AdapterQueryInspection {
|
|
140
|
+
adapter: string;
|
|
141
|
+
operation: string;
|
|
142
|
+
target?: string;
|
|
143
|
+
sql?: string;
|
|
144
|
+
parameters?: ReadonlyArray<unknown>;
|
|
145
|
+
detail?: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
interface ArkormDebugEvent {
|
|
148
|
+
type: 'query';
|
|
149
|
+
phase: 'before' | 'after' | 'error';
|
|
150
|
+
adapter: string;
|
|
151
|
+
operation: string;
|
|
152
|
+
target?: string;
|
|
153
|
+
inspection?: AdapterQueryInspection | null;
|
|
154
|
+
meta?: Record<string, unknown>;
|
|
155
|
+
durationMs?: number;
|
|
156
|
+
error?: unknown;
|
|
157
|
+
}
|
|
158
|
+
type ArkormDebugHandler = (event: ArkormDebugEvent) => void;
|
|
32
159
|
interface ArkormConfig {
|
|
33
160
|
/**
|
|
34
161
|
* @property prisma Optional Prisma client instance or resolver used for compatibility, CLI flows, and Prisma-backed transactions.
|
|
@@ -42,6 +169,11 @@ interface ArkormConfig {
|
|
|
42
169
|
* @property boot Optional synchronous runtime boot hook for central adapter binding.
|
|
43
170
|
*/
|
|
44
171
|
boot?: (context: ArkormBootContext) => void;
|
|
172
|
+
/**
|
|
173
|
+
* @property debug Optional runtime query debugging. `true` logs through Arkorm's default logger;
|
|
174
|
+
* a callback receives structured debug events for custom handling.
|
|
175
|
+
*/
|
|
176
|
+
debug?: boolean | ArkormDebugHandler;
|
|
45
177
|
/**
|
|
46
178
|
* @property pagination Configuration options related to pagination behavior and URL generation.
|
|
47
179
|
*/
|
|
@@ -49,6 +181,21 @@ interface ArkormConfig {
|
|
|
49
181
|
urlDriver?: PaginationURLDriverFactory;
|
|
50
182
|
resolveCurrentPage?: PaginationCurrentPageResolver;
|
|
51
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* @property features Optional feature flags for persisted non-Prisma runtime metadata.
|
|
186
|
+
*/
|
|
187
|
+
features?: {
|
|
188
|
+
/**
|
|
189
|
+
* @property persistedColumnMappings Persist migration-defined column mappings for non-Prisma adapters.
|
|
190
|
+
* Defaults to true.
|
|
191
|
+
*/
|
|
192
|
+
persistedColumnMappings?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* @property persistedEnums Persist migration-defined enum values for non-Prisma adapters.
|
|
195
|
+
* Defaults to true.
|
|
196
|
+
*/
|
|
197
|
+
persistedEnums?: boolean;
|
|
198
|
+
};
|
|
52
199
|
/**
|
|
53
200
|
* @property paths Optional custom paths for various generated files.
|
|
54
201
|
*/
|
|
@@ -210,11 +357,17 @@ type Serializable = Record<string, unknown>;
|
|
|
210
357
|
//#endregion
|
|
211
358
|
//#region src/types/metadata.d.ts
|
|
212
359
|
type ColumnMap = Record<string, string>;
|
|
360
|
+
interface PivotModelStatic {
|
|
361
|
+
new (attributes?: Record<string, unknown>): any;
|
|
362
|
+
hydrate?: (attributes: Record<string, unknown>) => any;
|
|
363
|
+
}
|
|
213
364
|
interface ModelMetadata {
|
|
214
365
|
table: string;
|
|
215
366
|
primaryKey: string;
|
|
216
367
|
columns: ColumnMap;
|
|
217
368
|
softDelete: SoftDeleteConfig;
|
|
369
|
+
primaryKeyGeneration?: PrimaryKeyGeneration;
|
|
370
|
+
timestampColumns?: TimestampColumnBehavior[];
|
|
218
371
|
}
|
|
219
372
|
type RelationMetadataType = 'hasOne' | 'hasMany' | 'belongsTo' | 'belongsToMany' | 'hasOneThrough' | 'hasManyThrough' | 'morphOne' | 'morphMany' | 'morphToMany';
|
|
220
373
|
interface BaseRelationMetadata {
|
|
@@ -243,6 +396,12 @@ interface BelongsToManyRelationMetadata extends BaseRelationMetadata {
|
|
|
243
396
|
relatedPivotKey: string;
|
|
244
397
|
parentKey: string;
|
|
245
398
|
relatedKey: string;
|
|
399
|
+
pivotAccessor?: string;
|
|
400
|
+
pivotColumns?: string[];
|
|
401
|
+
pivotCreatedAtColumn?: string;
|
|
402
|
+
pivotUpdatedAtColumn?: string;
|
|
403
|
+
pivotWhere?: QueryCondition;
|
|
404
|
+
pivotModel?: PivotModelStatic;
|
|
246
405
|
}
|
|
247
406
|
interface HasOneThroughRelationMetadata extends BaseRelationMetadata {
|
|
248
407
|
type: 'hasOneThrough';
|
|
@@ -286,6 +445,22 @@ interface MorphToManyRelationMetadata extends BaseRelationMetadata {
|
|
|
286
445
|
}
|
|
287
446
|
type RelationMetadata = HasOneRelationMetadata | HasManyRelationMetadata | BelongsToRelationMetadata | BelongsToManyRelationMetadata | HasOneThroughRelationMetadata | HasManyThroughRelationMetadata | MorphOneRelationMetadata | MorphManyRelationMetadata | MorphToManyRelationMetadata;
|
|
288
447
|
//#endregion
|
|
448
|
+
//#region src/types/db.d.ts
|
|
449
|
+
interface DatabaseTablePersistedMetadataOptions {
|
|
450
|
+
cwd?: string;
|
|
451
|
+
configuredPath?: string;
|
|
452
|
+
strict?: boolean;
|
|
453
|
+
}
|
|
454
|
+
interface DatabaseTableOptions {
|
|
455
|
+
adapter?: DatabaseAdapter;
|
|
456
|
+
primaryKey?: string;
|
|
457
|
+
columns?: Record<string, string>;
|
|
458
|
+
softDelete?: SoftDeleteConfig;
|
|
459
|
+
primaryKeyGeneration?: PrimaryKeyGeneration;
|
|
460
|
+
persistedMetadata?: boolean | DatabaseTablePersistedMetadataOptions;
|
|
461
|
+
timestampColumns?: TimestampColumnBehavior[];
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
289
464
|
//#region src/types/factories.d.ts
|
|
290
465
|
type FactoryAttributes = Record<string, unknown>;
|
|
291
466
|
interface FactoryModelConstructor<TModel> {
|
|
@@ -294,101 +469,6 @@ interface FactoryModelConstructor<TModel> {
|
|
|
294
469
|
type FactoryDefinition<TAttributes extends FactoryAttributes> = (sequence: number) => TAttributes;
|
|
295
470
|
type FactoryState<TAttributes extends FactoryAttributes> = (attributes: TAttributes, sequence: number) => TAttributes;
|
|
296
471
|
//#endregion
|
|
297
|
-
//#region src/types/migrations.d.ts
|
|
298
|
-
type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'boolean' | 'json' | 'date' | 'timestamp';
|
|
299
|
-
interface SchemaColumn {
|
|
300
|
-
name: string;
|
|
301
|
-
type: SchemaColumnType;
|
|
302
|
-
enumName?: string;
|
|
303
|
-
enumValues?: string[];
|
|
304
|
-
map?: string;
|
|
305
|
-
nullable?: boolean;
|
|
306
|
-
unique?: boolean;
|
|
307
|
-
primary?: boolean;
|
|
308
|
-
autoIncrement?: boolean;
|
|
309
|
-
after?: string;
|
|
310
|
-
default?: unknown;
|
|
311
|
-
updatedAt?: boolean;
|
|
312
|
-
}
|
|
313
|
-
interface SchemaIndex {
|
|
314
|
-
columns: string[];
|
|
315
|
-
name?: string;
|
|
316
|
-
}
|
|
317
|
-
type SchemaForeignKeyAction = 'cascade' | 'restrict' | 'setNull' | 'noAction' | 'setDefault';
|
|
318
|
-
interface SchemaForeignKey {
|
|
319
|
-
column: string;
|
|
320
|
-
referencesTable: string;
|
|
321
|
-
referencesColumn: string;
|
|
322
|
-
onDelete?: SchemaForeignKeyAction;
|
|
323
|
-
relationAlias?: string;
|
|
324
|
-
inverseRelationAlias?: string;
|
|
325
|
-
fieldAlias?: string;
|
|
326
|
-
}
|
|
327
|
-
interface SchemaTableCreateOperation {
|
|
328
|
-
type: 'createTable';
|
|
329
|
-
table: string;
|
|
330
|
-
columns: SchemaColumn[];
|
|
331
|
-
indexes: SchemaIndex[];
|
|
332
|
-
foreignKeys: SchemaForeignKey[];
|
|
333
|
-
}
|
|
334
|
-
interface SchemaTableAlterOperation {
|
|
335
|
-
type: 'alterTable';
|
|
336
|
-
table: string;
|
|
337
|
-
addColumns: SchemaColumn[];
|
|
338
|
-
dropColumns: string[];
|
|
339
|
-
addIndexes: SchemaIndex[];
|
|
340
|
-
addForeignKeys: SchemaForeignKey[];
|
|
341
|
-
}
|
|
342
|
-
interface SchemaTableDropOperation {
|
|
343
|
-
type: 'dropTable';
|
|
344
|
-
table: string;
|
|
345
|
-
}
|
|
346
|
-
type SchemaOperation = SchemaTableCreateOperation | SchemaTableAlterOperation | SchemaTableDropOperation;
|
|
347
|
-
interface GenerateMigrationOptions {
|
|
348
|
-
directory?: string;
|
|
349
|
-
extension?: 'ts' | 'js';
|
|
350
|
-
write?: boolean;
|
|
351
|
-
}
|
|
352
|
-
interface GeneratedMigrationFile {
|
|
353
|
-
fileName: string;
|
|
354
|
-
filePath: string;
|
|
355
|
-
className: string;
|
|
356
|
-
content: string;
|
|
357
|
-
}
|
|
358
|
-
interface PrismaSchemaSyncOptions {
|
|
359
|
-
schemaPath?: string;
|
|
360
|
-
write?: boolean;
|
|
361
|
-
}
|
|
362
|
-
interface PrismaMigrationWorkflowOptions extends PrismaSchemaSyncOptions {
|
|
363
|
-
cwd?: string;
|
|
364
|
-
runGenerate?: boolean;
|
|
365
|
-
runMigrate?: boolean;
|
|
366
|
-
migrateMode?: 'dev' | 'deploy';
|
|
367
|
-
migrationName?: string;
|
|
368
|
-
}
|
|
369
|
-
type MigrationInstanceLike = {
|
|
370
|
-
up: (...args: any[]) => Promise<void> | void;
|
|
371
|
-
down: (...args: any[]) => Promise<void> | void;
|
|
372
|
-
};
|
|
373
|
-
interface AppliedMigrationEntry {
|
|
374
|
-
id: string;
|
|
375
|
-
file: string;
|
|
376
|
-
className: string;
|
|
377
|
-
appliedAt: string;
|
|
378
|
-
checksum?: string;
|
|
379
|
-
}
|
|
380
|
-
interface AppliedMigrationRun {
|
|
381
|
-
id: string;
|
|
382
|
-
appliedAt: string;
|
|
383
|
-
migrationIds: string[];
|
|
384
|
-
}
|
|
385
|
-
interface AppliedMigrationsState {
|
|
386
|
-
version: 1;
|
|
387
|
-
migrations: AppliedMigrationEntry[];
|
|
388
|
-
runs?: AppliedMigrationRun[];
|
|
389
|
-
}
|
|
390
|
-
type MigrationClass = new () => MigrationInstanceLike;
|
|
391
|
-
//#endregion
|
|
392
472
|
//#region src/Collection.d.ts
|
|
393
473
|
declare class ArkormCollection<T = any, X = T[]> extends Collection<T, X> {}
|
|
394
474
|
//#endregion
|
|
@@ -610,9 +690,127 @@ declare class BelongsToManyRelation<TParent, TRelated> extends Relation<TRelated
|
|
|
610
690
|
private readonly relatedPivotKey;
|
|
611
691
|
private readonly parentKey;
|
|
612
692
|
private readonly relatedKey;
|
|
693
|
+
private static readonly queryDecorationMarker;
|
|
694
|
+
private pivotColumns;
|
|
695
|
+
private pivotAccessor;
|
|
696
|
+
private pivotCreatedAtColumn;
|
|
697
|
+
private pivotUpdatedAtColumn;
|
|
698
|
+
private pivotWhere;
|
|
699
|
+
private pivotModel;
|
|
700
|
+
private shouldAttachPivot;
|
|
613
701
|
constructor(parent: TParent & {
|
|
614
702
|
getAttribute: (key: string) => unknown;
|
|
615
703
|
}, related: RelationshipModelStatic, throughDelegate: string, foreignPivotKey: string, relatedPivotKey: string, parentKey: string, relatedKey: string);
|
|
704
|
+
/**
|
|
705
|
+
* Specifies additional pivot columns to include on the related models.
|
|
706
|
+
*
|
|
707
|
+
* @param columns The pivot columns to include on the related models.
|
|
708
|
+
* @returns
|
|
709
|
+
*/
|
|
710
|
+
withPivot(...columns: Array<string | string[]>): this;
|
|
711
|
+
/**
|
|
712
|
+
* Specifies that the pivot table contains timestamp columns and optionally
|
|
713
|
+
* allows customizing the names of those columns.
|
|
714
|
+
*
|
|
715
|
+
* @param createdAtColumn The name of the "created at" timestamp column.
|
|
716
|
+
* @param updatedAtColumn The name of the "updated at" timestamp column.
|
|
717
|
+
* @returns The current instance of the relationship.
|
|
718
|
+
*/
|
|
719
|
+
withTimestamps(createdAtColumn?: string, updatedAtColumn?: string): this;
|
|
720
|
+
/**
|
|
721
|
+
* Specifies a custom accessor name for the pivot attributes on the related models.
|
|
722
|
+
* By default, pivot attributes are accessible via the `pivot` property on the
|
|
723
|
+
* related models.
|
|
724
|
+
*
|
|
725
|
+
* @param accessor The custom accessor name for the pivot attributes.
|
|
726
|
+
* @returns The current instance of the relationship.
|
|
727
|
+
*/
|
|
728
|
+
as(accessor: string): this;
|
|
729
|
+
/**
|
|
730
|
+
* Specifies a custom pivot model to use for the pivot records. The pivot model can
|
|
731
|
+
* be used to define custom behavior or methods on the pivot records, as well as to
|
|
732
|
+
* specify a custom hydration method for the pivot records.
|
|
733
|
+
*
|
|
734
|
+
* @param pivotModel The custom pivot model to use.
|
|
735
|
+
* @returns The current instance of the relationship.
|
|
736
|
+
*/
|
|
737
|
+
using(pivotModel: PivotModelStatic): this;
|
|
738
|
+
/**
|
|
739
|
+
* Adds a "pivot column" condition to the relationship query.
|
|
740
|
+
*
|
|
741
|
+
* @param column The pivot column to apply the condition on.
|
|
742
|
+
* @param value The value to compare the pivot column against.
|
|
743
|
+
*/
|
|
744
|
+
wherePivot(column: string, value: unknown): this;
|
|
745
|
+
/**
|
|
746
|
+
* Adds a "pivot column" condition to the relationship query.
|
|
747
|
+
*
|
|
748
|
+
* @param column The pivot column to apply the condition on.
|
|
749
|
+
* @param operator The operator to use for the comparison.
|
|
750
|
+
* @param value The value to compare the pivot column against.
|
|
751
|
+
*/
|
|
752
|
+
wherePivot(column: string, operator: QueryComparisonOperator, value: unknown): this;
|
|
753
|
+
/**
|
|
754
|
+
* Adds a "pivot column in" condition to the relationship query.
|
|
755
|
+
*
|
|
756
|
+
* @param column
|
|
757
|
+
* @param values
|
|
758
|
+
* @returns
|
|
759
|
+
*/
|
|
760
|
+
wherePivotNotIn(column: string, values: unknown[]): this;
|
|
761
|
+
/**
|
|
762
|
+
* Adds a "pivot column between" condition to the relationship query.
|
|
763
|
+
*
|
|
764
|
+
* @param column
|
|
765
|
+
* @param range
|
|
766
|
+
* @returns
|
|
767
|
+
*/
|
|
768
|
+
wherePivotBetween(column: string, range: [unknown, unknown]): this;
|
|
769
|
+
/**
|
|
770
|
+
* Adds a "pivot column not between" condition to the relationship query.
|
|
771
|
+
*
|
|
772
|
+
* @param column
|
|
773
|
+
* @param range
|
|
774
|
+
* @returns
|
|
775
|
+
*/
|
|
776
|
+
wherePivotNotBetween(column: string, range: [unknown, unknown]): this;
|
|
777
|
+
/**
|
|
778
|
+
* Adds a "pivot column is null" condition to the relationship query.
|
|
779
|
+
*
|
|
780
|
+
* @param column
|
|
781
|
+
* @returns
|
|
782
|
+
*/
|
|
783
|
+
wherePivotNull(column: string): this;
|
|
784
|
+
/**
|
|
785
|
+
* Adds a "pivot column is not null" condition to the relationship query.
|
|
786
|
+
*
|
|
787
|
+
* @param column
|
|
788
|
+
* @returns
|
|
789
|
+
*/
|
|
790
|
+
wherePivotNotNull(column: string): this;
|
|
791
|
+
private addPivotWhere;
|
|
792
|
+
private makePivotComparison;
|
|
793
|
+
private buildPivotWhere;
|
|
794
|
+
private shouldAttachPivotAttributes;
|
|
795
|
+
private getPivotColumnSelection;
|
|
796
|
+
/**
|
|
797
|
+
* Creates a pivot record from a row of data.
|
|
798
|
+
*
|
|
799
|
+
* @param row The row of data containing pivot attributes.
|
|
800
|
+
* @returns The pivot record.
|
|
801
|
+
*/
|
|
802
|
+
private createPivotRecord;
|
|
803
|
+
/**
|
|
804
|
+
* Attaches pivot attributes to the related models if pivot attributes should be included.
|
|
805
|
+
*
|
|
806
|
+
* @param results
|
|
807
|
+
* @param pivotRows
|
|
808
|
+
* @returns
|
|
809
|
+
*/
|
|
810
|
+
private attachPivotToResults;
|
|
811
|
+
private attachPivotToModel;
|
|
812
|
+
private decorateQueryBuilder;
|
|
813
|
+
private loadPivotRowsForParent;
|
|
616
814
|
/**
|
|
617
815
|
* Build the relationship query.
|
|
618
816
|
*
|
|
@@ -1233,6 +1431,8 @@ declare abstract class Model<TSchema extends PrismaDelegateLike | Record<string,
|
|
|
1233
1431
|
* @param key
|
|
1234
1432
|
* @returns
|
|
1235
1433
|
*/
|
|
1434
|
+
getAttribute<TKey extends ModelRelationshipKey<this>>(key: TKey): ModelRelationshipResult<this, TKey>;
|
|
1435
|
+
getAttribute<TKey extends keyof this & string>(key: TKey): this[TKey] extends ((...args: any[]) => any) ? unknown : this[TKey];
|
|
1236
1436
|
getAttribute<TKey extends keyof TAttributes & string>(key: TKey): TAttributes[TKey];
|
|
1237
1437
|
getAttribute(key: string): unknown;
|
|
1238
1438
|
/**
|
|
@@ -1242,6 +1442,8 @@ declare abstract class Model<TSchema extends PrismaDelegateLike | Record<string,
|
|
|
1242
1442
|
* @param value
|
|
1243
1443
|
* @returns
|
|
1244
1444
|
*/
|
|
1445
|
+
setAttribute<TKey extends ModelRelationshipKey<this>>(key: TKey, value: ModelRelationshipResult<this, TKey>): this;
|
|
1446
|
+
setAttribute<TKey extends keyof this & string>(key: TKey, value: this[TKey] extends ((...args: any[]) => any) ? never : this[TKey]): this;
|
|
1245
1447
|
setAttribute<TKey extends keyof TAttributes & string>(key: TKey, value: TAttributes[TKey]): this;
|
|
1246
1448
|
setAttribute(key: string, value: unknown): this;
|
|
1247
1449
|
/**
|
|
@@ -1667,6 +1869,11 @@ interface AttributeSchemaDelegate<TAttributes extends Record<string, unknown>> e
|
|
|
1667
1869
|
type DelegateForModelSchema<TSchema extends PrismaDelegateLike | Record<string, unknown> | string, TAttributes extends Record<string, unknown> = ModelAttributesOf<TSchema>> = TSchema extends PrismaDelegateLike ? TSchema : TSchema extends string ? DelegateFromPrismaClient<TSchema> extends PrismaDelegateLike ? DelegateFromPrismaClient<TSchema> : PrismaDelegateLike : AttributeSchemaDelegate<TAttributes>;
|
|
1668
1870
|
type ModelAttributesOf<TSchema extends PrismaDelegateLike | Record<string, unknown> | string> = TSchema extends PrismaDelegateLike ? DelegateRow<TSchema> extends Record<string, unknown> ? DelegateRow<TSchema> : Record<string, any> : TSchema extends string ? DelegateFromPrismaClient<TSchema> extends PrismaDelegateLike ? DelegateRow<DelegateFromPrismaClient<TSchema>> extends Record<string, unknown> ? DelegateRow<DelegateFromPrismaClient<TSchema>> : Record<string, any> : Record<string, any> : TSchema extends Record<string, unknown> ? TSchema : Record<string, any>;
|
|
1669
1871
|
type ModelAttributes<TModel> = TModel extends Model<any, infer TAttributes> ? TAttributes : Record<string, any>;
|
|
1872
|
+
type RelationshipResultProvider<TResult = unknown> = {
|
|
1873
|
+
getResults: (...args: any[]) => Promise<TResult>;
|
|
1874
|
+
};
|
|
1875
|
+
type ModelRelationshipKey<TModel> = { [TKey in keyof TModel & string]: TModel[TKey] extends ((...args: any[]) => infer TReturn) ? TReturn extends RelationshipResultProvider<any> ? TKey : never : never }[keyof TModel & string];
|
|
1876
|
+
type ModelRelationshipResult<TModel, TKey extends ModelRelationshipKey<TModel>> = TModel[TKey] extends ((...args: any[]) => infer TReturn) ? TReturn extends RelationshipResultProvider<infer TResult> ? TResult : never : never;
|
|
1670
1877
|
type ModelCreateData<TModel, TDelegate extends PrismaDelegateLike> = TModel extends Model<any, infer TAttributes> ? TDelegate extends AttributeSchemaDelegate<TAttributes> ? AttributeCreateInput<TAttributes> : DelegateCreateData<TDelegate> : DelegateCreateData<TDelegate>;
|
|
1671
1878
|
type ModelUpdateData<TModel, TDelegate extends PrismaDelegateLike> = TModel extends Model<any, infer TAttributes> ? TDelegate extends AttributeSchemaDelegate<TAttributes> ? AttributeUpdateInput<TAttributes> : DelegateUpdateData<TDelegate> : DelegateUpdateData<TDelegate>;
|
|
1672
1879
|
type RelatedModelClass<TInstance = unknown> = (abstract new (attributes?: Record<string, unknown>) => TInstance) & RelationshipModelStatic;
|
|
@@ -2206,6 +2413,13 @@ declare class QueryBuilder<TModel, TDelegate extends PrismaDelegateLike = Prisma
|
|
|
2206
2413
|
* @returns
|
|
2207
2414
|
*/
|
|
2208
2415
|
limit(value: number): this;
|
|
2416
|
+
/**
|
|
2417
|
+
* Returns a representation of the query that can be used for debugging or logging purposes.
|
|
2418
|
+
*
|
|
2419
|
+
* @param operation
|
|
2420
|
+
* @returns
|
|
2421
|
+
*/
|
|
2422
|
+
inspect(operation?: Extract<AdapterQueryOperation, 'select' | 'selectOne' | 'count' | 'exists'>): AdapterQueryInspection | null;
|
|
2209
2423
|
/**
|
|
2210
2424
|
* Sets offset/limit for a 1-based page.
|
|
2211
2425
|
*
|
|
@@ -2392,6 +2606,7 @@ declare class QueryBuilder<TModel, TDelegate extends PrismaDelegateLike = Prisma
|
|
|
2392
2606
|
*/
|
|
2393
2607
|
doesntExist(): Promise<boolean>;
|
|
2394
2608
|
private normalizeInsertPayloads;
|
|
2609
|
+
private normalizeUpdatePayload;
|
|
2395
2610
|
private resolveAffectedCount;
|
|
2396
2611
|
private resolveInsertUsingRows;
|
|
2397
2612
|
private resolveInsertUsingSource;
|
|
@@ -2613,6 +2828,8 @@ interface QueryTarget<TModel = unknown> {
|
|
|
2613
2828
|
modelName?: string;
|
|
2614
2829
|
table?: string;
|
|
2615
2830
|
primaryKey?: string;
|
|
2831
|
+
primaryKeyGeneration?: PrimaryKeyGeneration;
|
|
2832
|
+
timestampColumns?: TimestampColumnBehavior[];
|
|
2616
2833
|
columns?: Record<string, string>;
|
|
2617
2834
|
softDelete?: SoftDeleteConfig;
|
|
2618
2835
|
alias?: string;
|
|
@@ -2735,6 +2952,47 @@ interface RelationLoadSpec<TModel = unknown> {
|
|
|
2735
2952
|
models: TModel[];
|
|
2736
2953
|
relations: RelationLoadPlan[];
|
|
2737
2954
|
}
|
|
2955
|
+
type AdapterQueryOperation = 'select' | 'selectOne' | 'count' | 'exists' | 'insert' | 'insertMany' | 'upsert' | 'update' | 'updateFirst' | 'updateMany' | 'delete' | 'deleteFirst' | 'deleteMany';
|
|
2956
|
+
type AdapterInspectionRequest<TModel = unknown> = {
|
|
2957
|
+
operation: 'select';
|
|
2958
|
+
spec: SelectSpec<TModel>;
|
|
2959
|
+
} | {
|
|
2960
|
+
operation: 'selectOne';
|
|
2961
|
+
spec: SelectSpec<TModel>;
|
|
2962
|
+
} | {
|
|
2963
|
+
operation: 'count';
|
|
2964
|
+
spec: AggregateSpec<TModel>;
|
|
2965
|
+
} | {
|
|
2966
|
+
operation: 'exists';
|
|
2967
|
+
spec: SelectSpec<TModel>;
|
|
2968
|
+
} | {
|
|
2969
|
+
operation: 'insert';
|
|
2970
|
+
spec: InsertSpec<TModel>;
|
|
2971
|
+
} | {
|
|
2972
|
+
operation: 'insertMany';
|
|
2973
|
+
spec: InsertManySpec<TModel>;
|
|
2974
|
+
} | {
|
|
2975
|
+
operation: 'upsert';
|
|
2976
|
+
spec: UpsertSpec<TModel>;
|
|
2977
|
+
} | {
|
|
2978
|
+
operation: 'update';
|
|
2979
|
+
spec: UpdateSpec<TModel>;
|
|
2980
|
+
} | {
|
|
2981
|
+
operation: 'updateFirst';
|
|
2982
|
+
spec: UpdateSpec<TModel>;
|
|
2983
|
+
} | {
|
|
2984
|
+
operation: 'updateMany';
|
|
2985
|
+
spec: UpdateManySpec<TModel>;
|
|
2986
|
+
} | {
|
|
2987
|
+
operation: 'delete';
|
|
2988
|
+
spec: DeleteSpec<TModel>;
|
|
2989
|
+
} | {
|
|
2990
|
+
operation: 'deleteFirst';
|
|
2991
|
+
spec: DeleteSpec<TModel>;
|
|
2992
|
+
} | {
|
|
2993
|
+
operation: 'deleteMany';
|
|
2994
|
+
spec: DeleteManySpec<TModel>;
|
|
2995
|
+
};
|
|
2738
2996
|
interface AdapterTransactionContext {
|
|
2739
2997
|
isolationLevel?: string;
|
|
2740
2998
|
readOnly?: boolean;
|
|
@@ -2770,7 +3028,12 @@ interface DatabaseAdapter {
|
|
|
2770
3028
|
count: <TModel = unknown>(spec: AggregateSpec<TModel>) => Promise<number>;
|
|
2771
3029
|
exists?: <TModel = unknown>(spec: SelectSpec<TModel>) => Promise<boolean>;
|
|
2772
3030
|
loadRelations?: <TModel = unknown>(spec: RelationLoadSpec<TModel>) => Promise<void>;
|
|
3031
|
+
inspectQuery?: <TModel = unknown>(request: AdapterInspectionRequest<TModel>) => AdapterQueryInspection | null;
|
|
2773
3032
|
introspectModels?: (options?: AdapterModelIntrospectionOptions) => Promise<AdapterModelStructure[]>;
|
|
3033
|
+
executeSchemaOperations?: (operations: SchemaOperation[]) => Promise<void>;
|
|
3034
|
+
resetDatabase?: () => Promise<void>;
|
|
3035
|
+
readAppliedMigrationsState?: () => Promise<AppliedMigrationsState>;
|
|
3036
|
+
writeAppliedMigrationsState?: (state: AppliedMigrationsState) => Promise<void>;
|
|
2774
3037
|
transaction: <TResult = unknown>(callback: (adapter: DatabaseAdapter) => TResult | Promise<TResult>, context?: AdapterTransactionContext) => Promise<TResult>;
|
|
2775
3038
|
}
|
|
2776
3039
|
//#endregion
|
|
@@ -2787,8 +3050,31 @@ type KyselyTableMapping = Record<string, string>;
|
|
|
2787
3050
|
declare class KyselyDatabaseAdapter implements DatabaseAdapter {
|
|
2788
3051
|
private readonly db;
|
|
2789
3052
|
private readonly mapping;
|
|
3053
|
+
private static readonly migrationStateTable;
|
|
3054
|
+
private static readonly migrationRunTable;
|
|
2790
3055
|
readonly capabilities: AdapterCapabilities;
|
|
2791
3056
|
constructor(db: KyselyExecutor, mapping?: KyselyTableMapping);
|
|
3057
|
+
private quoteIdentifier;
|
|
3058
|
+
private quoteLiteral;
|
|
3059
|
+
private executeRawStatement;
|
|
3060
|
+
private resolveSchemaColumnName;
|
|
3061
|
+
private resolveSchemaIndexName;
|
|
3062
|
+
private resolveSchemaForeignKeyName;
|
|
3063
|
+
private resolveSchemaEnumName;
|
|
3064
|
+
private resolveSchemaColumnType;
|
|
3065
|
+
private resolveSchemaColumnDefault;
|
|
3066
|
+
private shouldUseIdentity;
|
|
3067
|
+
private buildSchemaColumnDefinition;
|
|
3068
|
+
private buildSchemaForeignKeyConstraint;
|
|
3069
|
+
private buildSchemaIndexStatement;
|
|
3070
|
+
private ensureEnumTypes;
|
|
3071
|
+
private executeCreateTableOperation;
|
|
3072
|
+
private executeAlterTableOperation;
|
|
3073
|
+
private executeDropTableOperation;
|
|
3074
|
+
private ensureMigrationStateTables;
|
|
3075
|
+
private writeAppliedMigrationsStateInternal;
|
|
3076
|
+
private resetDatabaseInternal;
|
|
3077
|
+
private normalizeIntrospectionEnumValues;
|
|
2792
3078
|
private introspectionTypeToTs;
|
|
2793
3079
|
private resolveTable;
|
|
2794
3080
|
private resolvePrimaryKey;
|
|
@@ -2818,6 +3104,14 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
|
|
|
2818
3104
|
private buildCombinedWhereClause;
|
|
2819
3105
|
private buildSingleRowTargetCte;
|
|
2820
3106
|
private assertNoRelationLoads;
|
|
3107
|
+
private buildSelectStatement;
|
|
3108
|
+
private buildCountStatement;
|
|
3109
|
+
private buildExistsStatement;
|
|
3110
|
+
private compileInspection;
|
|
3111
|
+
private emitDebugQuery;
|
|
3112
|
+
private wrapExecutionError;
|
|
3113
|
+
private executeWithDebug;
|
|
3114
|
+
inspectQuery<TModel = unknown>(request: AdapterInspectionRequest<TModel>): AdapterQueryInspection | null;
|
|
2821
3115
|
/**
|
|
2822
3116
|
* Selects records from the database matching the specified criteria and returns
|
|
2823
3117
|
* them as an array of database rows.
|
|
@@ -2914,6 +3208,10 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
|
|
|
2914
3208
|
*/
|
|
2915
3209
|
exists<TModel = unknown>(spec: SelectSpec<TModel>): Promise<boolean>;
|
|
2916
3210
|
introspectModels(options?: AdapterModelIntrospectionOptions): Promise<AdapterModelStructure[]>;
|
|
3211
|
+
executeSchemaOperations(operations: SchemaOperation[]): Promise<void>;
|
|
3212
|
+
resetDatabase(): Promise<void>;
|
|
3213
|
+
readAppliedMigrationsState(): Promise<AppliedMigrationsState>;
|
|
3214
|
+
writeAppliedMigrationsState(state: AppliedMigrationsState): Promise<void>;
|
|
2917
3215
|
/**
|
|
2918
3216
|
* Executes a series of database operations within a transaction.
|
|
2919
3217
|
* The provided callback function is called with a new instance of the
|
|
@@ -2960,6 +3258,10 @@ declare class PrismaDatabaseAdapter implements DatabaseAdapter {
|
|
|
2960
3258
|
private toComparisonWhere;
|
|
2961
3259
|
private toQueryWhere;
|
|
2962
3260
|
private buildFindArgs;
|
|
3261
|
+
private emitDebugQuery;
|
|
3262
|
+
private wrapExecutionError;
|
|
3263
|
+
private runWithDebug;
|
|
3264
|
+
inspectQuery<TModel = unknown>(_request: AdapterInspectionRequest<TModel>): AdapterQueryInspection | null;
|
|
2963
3265
|
private toQueryInclude;
|
|
2964
3266
|
introspectModels(options?: AdapterModelIntrospectionOptions): Promise<AdapterModelStructure[]>;
|
|
2965
3267
|
private resolveDelegate;
|
|
@@ -3112,6 +3414,7 @@ declare class CliApp {
|
|
|
3112
3414
|
* @returns The entire configuration object or the value of the specified key
|
|
3113
3415
|
*/
|
|
3114
3416
|
getConfig: GetUserConfig;
|
|
3417
|
+
private isUsingPrismaAdapter;
|
|
3115
3418
|
/**
|
|
3116
3419
|
* Utility to ensure directory exists
|
|
3117
3420
|
*
|
|
@@ -3226,13 +3529,14 @@ declare class CliApp {
|
|
|
3226
3529
|
factory?: boolean;
|
|
3227
3530
|
seeder?: boolean;
|
|
3228
3531
|
migration?: boolean;
|
|
3532
|
+
pivot?: boolean;
|
|
3229
3533
|
all?: boolean;
|
|
3230
3534
|
}): {
|
|
3231
3535
|
model: {
|
|
3232
3536
|
name: string;
|
|
3233
3537
|
path: string;
|
|
3234
3538
|
};
|
|
3235
|
-
prisma
|
|
3539
|
+
prisma?: {
|
|
3236
3540
|
path: string;
|
|
3237
3541
|
updated: boolean;
|
|
3238
3542
|
};
|
|
@@ -3279,12 +3583,13 @@ declare class CliApp {
|
|
|
3279
3583
|
private syncPrismaEnumImports;
|
|
3280
3584
|
private parseModelSyncSource;
|
|
3281
3585
|
private syncModelFiles;
|
|
3586
|
+
private applyPersistedFieldMetadata;
|
|
3282
3587
|
/**
|
|
3283
3588
|
* Parse Prisma enum definitions from a schema and return their member names.
|
|
3284
3589
|
*
|
|
3285
3590
|
* @param schema The Prisma schema source.
|
|
3286
3591
|
* @returns A map of enum names to their declared member names.
|
|
3287
|
-
|
|
3592
|
+
*/
|
|
3288
3593
|
private parsePrismaEnums;
|
|
3289
3594
|
/**
|
|
3290
3595
|
* Resolve the generated TypeScript declaration type for a Prisma field.
|
|
@@ -3473,6 +3778,15 @@ declare class MigrateCommand extends Command<CliApp> {
|
|
|
3473
3778
|
private loadMigrationClassesFromFile;
|
|
3474
3779
|
}
|
|
3475
3780
|
//#endregion
|
|
3781
|
+
//#region src/cli/commands/MigrateFreshCommand.d.ts
|
|
3782
|
+
declare class MigrateFreshCommand extends Command<CliApp> {
|
|
3783
|
+
protected signature: string;
|
|
3784
|
+
protected description: string;
|
|
3785
|
+
handle(): Promise<undefined>;
|
|
3786
|
+
private loadAllMigrations;
|
|
3787
|
+
private loadMigrationClassesFromFile;
|
|
3788
|
+
}
|
|
3789
|
+
//#endregion
|
|
3476
3790
|
//#region src/cli/commands/MigrateRollbackCommand.d.ts
|
|
3477
3791
|
/**
|
|
3478
3792
|
* Rollback migration classes from the Prisma schema and run Prisma workflow.
|
|
@@ -3506,7 +3820,7 @@ declare class MigrationHistoryCommand extends Command<CliApp> {
|
|
|
3506
3820
|
declare class ModelsSyncCommand extends Command<CliApp> {
|
|
3507
3821
|
protected signature: string;
|
|
3508
3822
|
protected description: string;
|
|
3509
|
-
handle(): Promise<
|
|
3823
|
+
handle(): Promise<undefined>;
|
|
3510
3824
|
}
|
|
3511
3825
|
//#endregion
|
|
3512
3826
|
//#region src/cli/commands/SeedCommand.d.ts
|
|
@@ -4035,6 +4349,22 @@ declare abstract class Seeder {
|
|
|
4035
4349
|
private static runSeeders;
|
|
4036
4350
|
}
|
|
4037
4351
|
//#endregion
|
|
4352
|
+
//#region src/DB.d.ts
|
|
4353
|
+
declare class DB {
|
|
4354
|
+
private static adapter?;
|
|
4355
|
+
private readonly scopedAdapter?;
|
|
4356
|
+
private constructor();
|
|
4357
|
+
static setAdapter(adapter?: DatabaseAdapter): void;
|
|
4358
|
+
static getAdapter(): DatabaseAdapter | undefined;
|
|
4359
|
+
getAdapter(): DatabaseAdapter | undefined;
|
|
4360
|
+
static table<TRow extends Record<string, unknown> = Record<string, unknown>>(table: string, options?: DatabaseTableOptions): QueryBuilder<TRow, PrismaDelegateLike>;
|
|
4361
|
+
table<TRow extends Record<string, unknown> = Record<string, unknown>>(table: string, options?: DatabaseTableOptions): QueryBuilder<TRow, PrismaDelegateLike>;
|
|
4362
|
+
static transaction<TResult>(callback: (db: DB) => TResult | Promise<TResult>, context?: AdapterTransactionContext): Promise<TResult>;
|
|
4363
|
+
transaction<TResult>(callback: (db: DB) => TResult | Promise<TResult>, context?: AdapterTransactionContext): Promise<TResult>;
|
|
4364
|
+
private static createTableModel;
|
|
4365
|
+
private static resolvePersistedTableMetadata;
|
|
4366
|
+
}
|
|
4367
|
+
//#endregion
|
|
4038
4368
|
//#region src/Exceptions/ArkormException.d.ts
|
|
4039
4369
|
/**
|
|
4040
4370
|
* The ArkormException class is a custom error type for handling
|
|
@@ -4092,6 +4422,16 @@ declare class QueryConstraintException extends ArkormException {
|
|
|
4092
4422
|
constructor(message: string, context?: ArkormErrorContext);
|
|
4093
4423
|
}
|
|
4094
4424
|
//#endregion
|
|
4425
|
+
//#region src/Exceptions/QueryExecutionException.d.ts
|
|
4426
|
+
interface QueryExecutionExceptionContext extends ArkormErrorContext {
|
|
4427
|
+
inspection?: AdapterQueryInspection | null;
|
|
4428
|
+
}
|
|
4429
|
+
declare class QueryExecutionException extends ArkormException {
|
|
4430
|
+
readonly inspection?: AdapterQueryInspection | null;
|
|
4431
|
+
constructor(message?: string, context?: QueryExecutionExceptionContext);
|
|
4432
|
+
getInspection(): AdapterQueryInspection | null | undefined;
|
|
4433
|
+
}
|
|
4434
|
+
//#endregion
|
|
4095
4435
|
//#region src/Exceptions/RelationResolutionException.d.ts
|
|
4096
4436
|
declare class RelationResolutionException extends ArkormException {
|
|
4097
4437
|
constructor(message: string, context?: ArkormErrorContext);
|
|
@@ -4112,12 +4452,81 @@ declare class UnsupportedAdapterFeatureException extends ArkormException {
|
|
|
4112
4452
|
constructor(message: string, context?: ArkormErrorContext);
|
|
4113
4453
|
}
|
|
4114
4454
|
//#endregion
|
|
4455
|
+
//#region src/helpers/column-mappings.d.ts
|
|
4456
|
+
interface PersistedMetadataFeatures {
|
|
4457
|
+
persistedColumnMappings: boolean;
|
|
4458
|
+
persistedEnums: boolean;
|
|
4459
|
+
}
|
|
4460
|
+
interface PersistedTableMetadata {
|
|
4461
|
+
columns: Record<string, string>;
|
|
4462
|
+
enums: Record<string, string[]>;
|
|
4463
|
+
primaryKeyGeneration?: PersistedPrimaryKeyGeneration;
|
|
4464
|
+
timestampColumns?: PersistedTimestampColumn[];
|
|
4465
|
+
}
|
|
4466
|
+
interface PersistedPrimaryKeyGeneration extends PrimaryKeyGeneration {
|
|
4467
|
+
column: string;
|
|
4468
|
+
}
|
|
4469
|
+
interface PersistedTimestampColumn extends TimestampColumnBehavior {
|
|
4470
|
+
column: string;
|
|
4471
|
+
}
|
|
4472
|
+
interface PersistedColumnMappingsState {
|
|
4473
|
+
version: 1;
|
|
4474
|
+
tables: Record<string, PersistedTableMetadata>;
|
|
4475
|
+
}
|
|
4476
|
+
declare const resolvePersistedMetadataFeatures: (features?: ArkormConfig["features"]) => PersistedMetadataFeatures;
|
|
4477
|
+
declare const createEmptyPersistedColumnMappingsState: () => PersistedColumnMappingsState;
|
|
4478
|
+
declare const resolveColumnMappingsFilePath: (cwd: string, configuredPath?: string) => string;
|
|
4479
|
+
declare const resetPersistedColumnMappingsCache: () => void;
|
|
4480
|
+
declare const readPersistedColumnMappingsState: (filePath: string) => PersistedColumnMappingsState;
|
|
4481
|
+
declare const writePersistedColumnMappingsState: (filePath: string, state: PersistedColumnMappingsState) => void;
|
|
4482
|
+
declare const deletePersistedColumnMappingsState: (filePath: string) => void;
|
|
4483
|
+
declare const getPersistedTableMetadata: (table: string, options?: {
|
|
4484
|
+
cwd?: string;
|
|
4485
|
+
configuredPath?: string;
|
|
4486
|
+
features?: PersistedMetadataFeatures;
|
|
4487
|
+
strict?: boolean;
|
|
4488
|
+
}) => PersistedTableMetadata;
|
|
4489
|
+
declare const getPersistedColumnMap: (table: string, options?: {
|
|
4490
|
+
cwd?: string;
|
|
4491
|
+
configuredPath?: string;
|
|
4492
|
+
features?: PersistedMetadataFeatures;
|
|
4493
|
+
strict?: boolean;
|
|
4494
|
+
}) => Record<string, string>;
|
|
4495
|
+
declare const getPersistedEnumMap: (table: string, options?: {
|
|
4496
|
+
cwd?: string;
|
|
4497
|
+
configuredPath?: string;
|
|
4498
|
+
features?: PersistedMetadataFeatures;
|
|
4499
|
+
strict?: boolean;
|
|
4500
|
+
}) => Record<string, string[]>;
|
|
4501
|
+
declare const getPersistedPrimaryKeyGeneration: (table: string, options?: {
|
|
4502
|
+
cwd?: string;
|
|
4503
|
+
configuredPath?: string;
|
|
4504
|
+
features?: PersistedMetadataFeatures;
|
|
4505
|
+
strict?: boolean;
|
|
4506
|
+
}) => PersistedPrimaryKeyGeneration | undefined;
|
|
4507
|
+
declare const getPersistedTimestampColumns: (table: string, options?: {
|
|
4508
|
+
cwd?: string;
|
|
4509
|
+
configuredPath?: string;
|
|
4510
|
+
features?: PersistedMetadataFeatures;
|
|
4511
|
+
strict?: boolean;
|
|
4512
|
+
}) => PersistedTimestampColumn[];
|
|
4513
|
+
declare const applyOperationsToPersistedColumnMappingsState: (state: PersistedColumnMappingsState, operations: SchemaOperation[], features?: PersistedMetadataFeatures) => PersistedColumnMappingsState;
|
|
4514
|
+
declare const rebuildPersistedColumnMappingsState: (state: AppliedMigrationsState, availableMigrations: [MigrationClass, string][], features?: PersistedMetadataFeatures) => Promise<PersistedColumnMappingsState>;
|
|
4515
|
+
declare const syncPersistedColumnMappingsFromState: (cwd: string, state: AppliedMigrationsState, availableMigrations: [MigrationClass, string][], features?: PersistedMetadataFeatures) => Promise<void>;
|
|
4516
|
+
declare const validatePersistedMetadataFeaturesForMigrations: (migrations: [MigrationClass, string][], features?: PersistedMetadataFeatures) => Promise<void>;
|
|
4517
|
+
declare const getPersistedEnumTsType: (values: string[]) => string;
|
|
4518
|
+
//#endregion
|
|
4115
4519
|
//#region src/helpers/migration-history.d.ts
|
|
4520
|
+
declare const createEmptyAppliedMigrationsState: () => AppliedMigrationsState;
|
|
4521
|
+
declare const supportsDatabaseMigrationState: (adapter?: DatabaseAdapter) => adapter is DatabaseAdapter & Required<Pick<DatabaseAdapter, "readAppliedMigrationsState" | "writeAppliedMigrationsState">>;
|
|
4116
4522
|
declare const resolveMigrationStateFilePath: (cwd: string, configuredPath?: string) => string;
|
|
4117
4523
|
declare const buildMigrationIdentity: (filePath: string, className: string) => string;
|
|
4118
4524
|
declare const computeMigrationChecksum: (filePath: string) => string;
|
|
4119
4525
|
declare const readAppliedMigrationsState: (stateFilePath: string) => AppliedMigrationsState;
|
|
4526
|
+
declare const readAppliedMigrationsStateFromStore: (adapter: DatabaseAdapter | undefined, stateFilePath: string) => Promise<AppliedMigrationsState>;
|
|
4120
4527
|
declare const writeAppliedMigrationsState: (stateFilePath: string, state: AppliedMigrationsState) => void;
|
|
4528
|
+
declare const writeAppliedMigrationsStateToStore: (adapter: DatabaseAdapter | undefined, stateFilePath: string, state: AppliedMigrationsState) => Promise<void>;
|
|
4529
|
+
declare const deleteAppliedMigrationsStateFromStore: (adapter: DatabaseAdapter | undefined, stateFilePath: string) => Promise<"database" | "file" | "missing-file">;
|
|
4121
4530
|
declare const isMigrationApplied: (state: AppliedMigrationsState, identity: string, checksum?: string) => boolean;
|
|
4122
4531
|
declare const findAppliedMigration: (state: AppliedMigrationsState, identity: string) => AppliedMigrationEntry | undefined;
|
|
4123
4532
|
declare const markMigrationApplied: (state: AppliedMigrationsState, entry: AppliedMigrationEntry) => AppliedMigrationsState;
|
|
@@ -4372,6 +4781,15 @@ declare const generateMigrationFile: (name: string, options?: GenerateMigrationO
|
|
|
4372
4781
|
* @returns A promise that resolves to an array of schema operations that would be performed.
|
|
4373
4782
|
*/
|
|
4374
4783
|
declare const getMigrationPlan: (migration: Migration | (new () => Migration), direction?: "up" | "down") => Promise<SchemaOperation[]>;
|
|
4784
|
+
declare const supportsDatabaseMigrationExecution: (adapter?: DatabaseAdapter) => adapter is DatabaseAdapter & Required<Pick<DatabaseAdapter, "executeSchemaOperations">>;
|
|
4785
|
+
declare const supportsDatabaseReset: (adapter?: DatabaseAdapter) => adapter is DatabaseAdapter & Required<Pick<DatabaseAdapter, "resetDatabase">>;
|
|
4786
|
+
declare const stripPrismaSchemaModelsAndEnums: (schema: string) => string;
|
|
4787
|
+
declare const applyMigrationToDatabase: (adapter: DatabaseAdapter, migration: Migration | (new () => Migration)) => Promise<{
|
|
4788
|
+
operations: SchemaOperation[];
|
|
4789
|
+
}>;
|
|
4790
|
+
declare const applyMigrationRollbackToDatabase: (adapter: DatabaseAdapter, migration: Migration | (new () => Migration)) => Promise<{
|
|
4791
|
+
operations: SchemaOperation[];
|
|
4792
|
+
}>;
|
|
4375
4793
|
/**
|
|
4376
4794
|
* Apply the schema operations defined in a migration to a Prisma schema
|
|
4377
4795
|
* file, updating the file on disk if specified, and return the updated
|
|
@@ -4412,6 +4830,12 @@ declare const runMigrationWithPrisma: (migration: Migration | (new () => Migrati
|
|
|
4412
4830
|
operations: SchemaOperation[];
|
|
4413
4831
|
}>;
|
|
4414
4832
|
//#endregion
|
|
4833
|
+
//#region src/helpers/PrimaryKeyGenerationPlanner.d.ts
|
|
4834
|
+
declare class PrimaryKeyGenerationPlanner {
|
|
4835
|
+
static plan(column: Pick<SchemaColumn, 'type' | 'primary' | 'default'>): PrimaryKeyGeneration | undefined;
|
|
4836
|
+
static generate(generation: PrimaryKeyGeneration | undefined): unknown;
|
|
4837
|
+
}
|
|
4838
|
+
//#endregion
|
|
4415
4839
|
//#region src/helpers/runtime-config.d.ts
|
|
4416
4840
|
/**
|
|
4417
4841
|
* Define the ArkORM runtime configuration. This function can be used to provide.
|
|
@@ -4479,6 +4903,8 @@ declare const getRuntimePaginationURLDriverFactory: () => PaginationURLDriverFac
|
|
|
4479
4903
|
* @returns
|
|
4480
4904
|
*/
|
|
4481
4905
|
declare const getRuntimePaginationCurrentPageResolver: () => PaginationCurrentPageResolver | undefined;
|
|
4906
|
+
declare const getRuntimeDebugHandler: () => ArkormDebugHandler | undefined;
|
|
4907
|
+
declare const emitRuntimeDebugEvent: (event: ArkormDebugEvent) => void;
|
|
4482
4908
|
/**
|
|
4483
4909
|
* Check if a given value is a Prisma delegate-like object
|
|
4484
4910
|
* by verifying the presence of common delegate methods.
|
|
@@ -4525,6 +4951,20 @@ declare class RuntimeModuleLoader {
|
|
|
4525
4951
|
static load<T = unknown>(filePath: string): Promise<T>;
|
|
4526
4952
|
}
|
|
4527
4953
|
//#endregion
|
|
4954
|
+
//#region src/PivotModel.d.ts
|
|
4955
|
+
/**
|
|
4956
|
+
* Base pivot class that all pivot models should extend.
|
|
4957
|
+
*
|
|
4958
|
+
* @template TModel The type of the model extending this base class.
|
|
4959
|
+
*
|
|
4960
|
+
* @author Legacy (3m1n3nc3)
|
|
4961
|
+
* @since 2.0.0-next.18
|
|
4962
|
+
*/
|
|
4963
|
+
declare class PivotModel extends Model {
|
|
4964
|
+
protected readonly attributes: Record<string, unknown>;
|
|
4965
|
+
constructor(attributes?: Record<string, unknown>);
|
|
4966
|
+
}
|
|
4967
|
+
//#endregion
|
|
4528
4968
|
//#region src/URLDriver.d.ts
|
|
4529
4969
|
/**
|
|
4530
4970
|
* URLDriver builds pagination URLs from paginator options.
|
|
@@ -4543,4 +4983,4 @@ declare class URLDriver {
|
|
|
4543
4983
|
url(page: number): string;
|
|
4544
4984
|
}
|
|
4545
4985
|
//#endregion
|
|
4546
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormErrorContext, ArkormException, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributes, FactoryDefinition, FactoryModelConstructor, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelStatic, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySelectColumn, QueryTarget, RelatedModelClass, RelationAggregateSpec, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationTableLookupSpec, RelationshipModelStatic, RuntimeModuleLoader, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToPrismaSchema, applyMigrationToPrismaSchema, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getRuntimeAdapter, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, removeAppliedMigration, resetArkormRuntimeForTests, resolveCast, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, toMigrationFileSlug, toModelName, writeAppliedMigrationsState };
|
|
4986
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, CastDefinition, CastHandler, CastMap, CastType, CliApp, ClientResolver, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EagerLoadConstraint, EagerLoadMap, EnumBuilder, FactoryAttributes, FactoryDefinition, FactoryModelConstructor, FactoryState, ForeignKeyBuilder, GenerateMigrationOptions, GeneratedMigrationFile, GetUserConfig, GlobalScope, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InitCommand, InlineFactory, InsertManySpec, InsertSpec, KyselyDatabaseAdapter, LengthAwarePaginator, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelUpdateData, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PersistedColumnMappingsState, PersistedMetadataFeatures, PersistedPrimaryKeyGeneration, PersistedTableMetadata, PersistedTimestampColumn, PivotModel, PivotModelStatic, PrimaryKeyGeneration, PrimaryKeyGenerationPlanner, PrismaClientLike, PrismaDatabaseAdapter, PrismaDelegateLike, PrismaDelegateMap, PrismaDelegateNameMapping, PrismaFindManyArgsLike, PrismaLikeInclude, PrismaLikeOrderBy, PrismaLikeScalarFilter, PrismaLikeSelect, PrismaLikeSortOrder, PrismaLikeWhereInput, PrismaMigrationWorkflowOptions, PrismaSchemaSyncOptions, PrismaTransactionCallback, PrismaTransactionCapableClient, PrismaTransactionOptions, QueryBuilder, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryExecutionException, QueryExecutionExceptionContext, QueryGroupCondition, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QuerySelectColumn, QueryTarget, RelatedModelClass, RelationAggregateSpec, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationTableLookupSpec, RelationshipModelStatic, RuntimeModuleLoader, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildRelationLine, computeMigrationChecksum, configureArkormRuntime, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, findAppliedMigration, findEnumBlock, findModelBlock, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, generateMigrationFile, getActiveTransactionClient, getDefaultStubsPath, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRuntimeAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isTransactionCapableClient, loadArkormConfig, markMigrationApplied, markMigrationRun, pad, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, validatePersistedMetadataFeaturesForMigrations, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|