arkormx 2.12.10 → 2.12.12
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-BYL9S6st.d.mts → index-BSJFuytO.d.cts} +59 -7
- package/dist/{index-CDSTYl6q.d.cts → index-DJe32yxM.d.mts} +59 -7
- package/dist/index.cjs +121 -18
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +121 -18
- package/dist/relationship/index.d.cts +1 -1
- package/dist/relationship/index.d.mts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Collection } from "@h3ravel/collect.js";
|
|
2
1
|
import { Kysely, Transaction } from "kysely";
|
|
3
|
-
import { Application, Command, Musket } from "@h3ravel/musket";
|
|
4
2
|
import { PrismaClient } from "@prisma/client";
|
|
3
|
+
import { Collection } from "@h3ravel/collect.js";
|
|
4
|
+
import { Application, Command, Musket } from "@h3ravel/musket";
|
|
5
5
|
//#region src/types/migrations.d.ts
|
|
6
6
|
type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'decimal' | 'boolean' | 'json' | 'date' | 'dateTime' | 'timestamp';
|
|
7
7
|
interface PrimaryKeyGeneration {
|
|
@@ -4023,18 +4023,41 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
4023
4023
|
/**
|
|
4024
4024
|
* Appends a pre-built structured condition, first flushing any Prisma-like
|
|
4025
4025
|
* legacy where into the structured representation so the two combine correctly.
|
|
4026
|
+
*
|
|
4027
|
+
* @param boolean
|
|
4028
|
+
* @param condition
|
|
4029
|
+
* @returns
|
|
4026
4030
|
*/
|
|
4027
4031
|
private appendStructuredWhere;
|
|
4028
4032
|
/**
|
|
4029
4033
|
* Appends a boolean {@link Expression} as a where predicate. When the query is
|
|
4030
4034
|
* using the Prisma-like legacy where representation, the expression is merged in
|
|
4031
4035
|
* as a structured condition alongside it.
|
|
4036
|
+
*
|
|
4037
|
+
* @param boolean
|
|
4038
|
+
* @param expression
|
|
4039
|
+
* @returns
|
|
4032
4040
|
*/
|
|
4033
4041
|
private appendExpressionCondition;
|
|
4034
4042
|
/**
|
|
4035
4043
|
* Resolve a callback into a parenthesized group condition and append it.
|
|
4044
|
+
*
|
|
4045
|
+
* @param boolean
|
|
4046
|
+
* @param callback
|
|
4047
|
+
* @returns
|
|
4036
4048
|
*/
|
|
4037
4049
|
private appendNestedWhere;
|
|
4050
|
+
/**
|
|
4051
|
+
* Fold this builder's relation filters into `condition`, in the order and
|
|
4052
|
+
* with the and/or they were added with, so they can be carried inside a
|
|
4053
|
+
* where group or another relation's constraint.
|
|
4054
|
+
*
|
|
4055
|
+
* @param condition
|
|
4056
|
+
* @param operation Names the caller in the exception raised when a filter
|
|
4057
|
+
* cannot be expressed as a condition.
|
|
4058
|
+
* @returns
|
|
4059
|
+
*/
|
|
4060
|
+
private withRelationConditions;
|
|
4038
4061
|
/**
|
|
4039
4062
|
* Returns the user-authored where condition for nesting, excluding any
|
|
4040
4063
|
* soft-delete predicate (the parent query owns that).
|
|
@@ -5336,15 +5359,16 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
5336
5359
|
*/
|
|
5337
5360
|
insertOrIgnoreUsing(columns: string[], query: unknown): Promise<number>;
|
|
5338
5361
|
/**
|
|
5339
|
-
* Updates
|
|
5340
|
-
*
|
|
5362
|
+
* Updates the first record matching the current query constraints and
|
|
5363
|
+
* returns it as a model. Use {@link updateFrom} to update every match.
|
|
5341
5364
|
*
|
|
5342
5365
|
* @param data
|
|
5343
5366
|
* @returns
|
|
5344
5367
|
*/
|
|
5345
5368
|
update(data: ModelUpdateData<TModel, TDelegate>): Promise<TModel>;
|
|
5346
5369
|
/**
|
|
5347
|
-
* Update
|
|
5370
|
+
* Update every record matching the current query constraints and return
|
|
5371
|
+
* the number of affected rows.
|
|
5348
5372
|
*
|
|
5349
5373
|
* @param data
|
|
5350
5374
|
* @returns
|
|
@@ -6109,6 +6133,14 @@ interface QueryExistsCondition {
|
|
|
6109
6133
|
type: 'exists';
|
|
6110
6134
|
query: SelectSpec;
|
|
6111
6135
|
}
|
|
6136
|
+
/**
|
|
6137
|
+
* A relation filter (`whereHas` and friends) placed inside a where tree, so it
|
|
6138
|
+
* can sit in a group or inside another relation's constraint.
|
|
6139
|
+
*/
|
|
6140
|
+
interface QueryRelationCondition {
|
|
6141
|
+
type: 'relation';
|
|
6142
|
+
filter: RelationFilterSpec;
|
|
6143
|
+
}
|
|
6112
6144
|
interface QueryFullTextCondition {
|
|
6113
6145
|
type: 'full-text';
|
|
6114
6146
|
columns: string[];
|
|
@@ -6138,7 +6170,7 @@ interface QueryExpressionCondition {
|
|
|
6138
6170
|
type: 'expression';
|
|
6139
6171
|
expression: ExpressionNode;
|
|
6140
6172
|
}
|
|
6141
|
-
type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryFullTextCondition | QueryJsonCondition | QueryExpressionCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
|
|
6173
|
+
type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryRelationCondition | QueryFullTextCondition | QueryJsonCondition | QueryExpressionCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
|
|
6142
6174
|
interface AggregateSelection {
|
|
6143
6175
|
type: AggregateOperation;
|
|
6144
6176
|
column?: string;
|
|
@@ -6544,10 +6576,30 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
|
|
|
6544
6576
|
private buildWhereClause;
|
|
6545
6577
|
private buildPaginationClause;
|
|
6546
6578
|
private buildColumnReference;
|
|
6579
|
+
/**
|
|
6580
|
+
* Renders the relation's source table, aliasing it when a self-referential
|
|
6581
|
+
* relation would otherwise put the same name on both sides of a correlated
|
|
6582
|
+
* subquery.
|
|
6583
|
+
*
|
|
6584
|
+
* @param sourceTable
|
|
6585
|
+
* @param table
|
|
6586
|
+
* @returns
|
|
6587
|
+
*/
|
|
6588
|
+
private buildTableSource;
|
|
6547
6589
|
private buildRelatedTargetFromRelation;
|
|
6548
6590
|
private resolveMappedTable;
|
|
6549
6591
|
private buildBelongsToManyJoinSource;
|
|
6550
6592
|
private buildThroughJoinSource;
|
|
6593
|
+
/**
|
|
6594
|
+
* The value a polymorphic child stores in its type column for this parent: the
|
|
6595
|
+
* parent model's class name, matching what the relationship writes on create
|
|
6596
|
+
* and what the set-based eager loader groups parents by.
|
|
6597
|
+
*
|
|
6598
|
+
* @param target
|
|
6599
|
+
* @param relation
|
|
6600
|
+
* @returns
|
|
6601
|
+
*/
|
|
6602
|
+
private resolveMorphType;
|
|
6551
6603
|
private buildRelatedJoinCondition;
|
|
6552
6604
|
private combineConditions;
|
|
6553
6605
|
private buildRelationFilterExpression;
|
|
@@ -9067,4 +9119,4 @@ declare class URLDriver {
|
|
|
9067
9119
|
url(page: number): string;
|
|
9068
9120
|
}
|
|
9069
9121
|
//#endregion
|
|
9070
|
-
export { buildPrimaryKeyLine as $, ModelStatic as $a, SchemaTableDropOperation as $c, DelegateFindManyArgs as $i, getModel as $n, fromExpressionNode as $o, InsertSpec as $r, FactoryRelationshipResolver as $s, createEmptyPersistedColumnMappingsState as $t, isQuerySchemaLike as A, PrismaTransactionCapableClient as Aa, MorphedByManyRelationMetadata as Ac, RawQuerySpec as Ai, EnumBuilder as An, ModelRelationshipKey as Ao, createPrismaDatabaseAdapter as Ar, RelationDefaultResolver as As, computeMigrationChecksum as At, applyCreateTableOperation as B, QuerySchemaUniqueWhere as Ba, MigrationInstanceLike as Bc, UpsertSpec as Bi, MigrateCommand as Bn, Model as Bo, AdapterQueryOperation as Br, RelatedModelForRelationship as Bs, readAppliedMigrationsState as Bt, getRuntimeClient as C, PrismaLikeInclude as Ca, HasOneRelationMetadata as Cc, QueryNotCondition as Ci, MissingDelegateException as Cn, ModelEventDispatcher as Co, Seeder as Cr, Relation as Cs, supportsDatabaseCreation as Ct, getRuntimePrismaClient as D, PrismaLikeSortOrder as Da, MorphOneRelationMetadata as Dc, QuerySelectColumn as Di, MIGRATION_BRAND as Dn, ModelEventName as Do, PrismaDatabaseAdapter as Dr, RelationAggregateType as Ds, toModelName as Dt, getRuntimePaginationURLDriverFactory as E, PrismaLikeSelect as Ea, MorphManyRelationMetadata as Ec, QueryScalarComparisonOperator as Ei, DB as En, ModelEventListener as Eo, SeederInput as Er, RelationAggregateInput as Es, toMigrationFileSlug as Et, PrimaryKeyGenerationPlanner as F, QuerySchemaInclude as Fa, AppliedMigrationRun as Fc, SelectSpec as Fi, SeedCommand as Fn, QuerySchemaForModelInstance as Fo, AdapterDatabaseCreationResult as Fr, RelationTableLookupSpec as Fs, getLastMigrationRun as Ft, applyMigrationToPrismaSchema as G, RuntimeClientLike as Ga, SchemaColumnType as Gc, ArkormDebugEvent as Gi, InitCommand as Gn, JsonExpression as Go, DatabaseAdapter as Gr, Paginator as Gs, writeAppliedMigrationsState as Gt, applyMigrationRollbackToDatabase as H, QuerySchemaUpdateData as Ha, PrismaMigrationWorkflowOptions as Hc, AdapterQueryInspection as Hi, MakeModelCommand as Hn, CaseExpression as Ho, AggregateOperation as Hr, WhereCallback as Hs, removeAppliedMigration as Ht, PRISMA_ENUM_MEMBER_REGEX as I, QuerySchemaOrderBy as Ia, AppliedMigrationsState as Ic, SoftDeleteQueryMode as Ii, ModelsSyncCommand as In, RegisteredModelClass as Io, AdapterInspectionRequest as Ir, EagerLoadQueryForRelationship as Is, getLatestAppliedMigrations as It, buildFieldLine as J, SoftDeleteConfig as Ja, SchemaIndex as Jc, CastHandler as Ji, resolveCast as Jn, coalesce as Jo, DatabaseRows as Jr, FactoryAttributes as Js, PersistedMetadataFeatures as Jt, applyOperationsToPrismaSchema as K, Serializable as Ka, SchemaForeignKey as Kc, ArkormDebugHandler as Ki, DbCommand as Kn, avg as Ko, DatabasePrimitive as Kr, ArkormCollection as Ks, writeAppliedMigrationsStateToStore as Kt, PRISMA_ENUM_REGEX as L, QuerySchemaRow as La, GenerateMigrationOptions as Lc, SortDirection as Li, MigrationHistoryCommand as Ln, RegisteredModelInstance as Lo, AdapterModelFieldStructure as Lr, EagerLoadRelations as Ls, isMigrationApplied as Lt, loadArkormConfig as M, PrismaTransactionOptions as Ma, RelationMetadata as Mc, RelationFilterSpec as Mi, GeneratedColumnExpression as Mn, ModelUpdateData as Mo, createKyselyAdapter as Mr, RelationMetadataProvider as Ms, deleteAppliedMigrationsStateFromStore as Mt, resetArkormRuntimeForTests as N, QuerySchemaCreateData as Na, RelationMetadataType as Nc, RelationLoadPlan as Ni, resolveGeneratedExpression as Nn, ModelWhereInput as No, AdapterCapabilities as Nr, RelationResult as Ns, findAppliedMigration as Nt, getUserConfig as O, PrismaLikeWhereInput as Oa, MorphToManyRelationMetadata as Oc, QueryTarget as Oi, Migration as On, ModelLifecycleState as Oo, PrismaDelegateNameMapping as Or, RelationColumnLookupSpec as Os, buildMigrationIdentity as Ot, runArkormTransaction as P, QuerySchemaFindManyArgs as Pa, AppliedMigrationEntry as Pc, RelationLoadSpec as Pi, ForeignKeyBuilder as Pn, QuerySchemaForModel as Po, AdapterCapability as Pr, RelationResultCache as Ps, getLastBatchMigrations as Pt, buildModelBlock as Q, TransactionOptions as Qa, SchemaTableCreateOperation as Qc, DelegateCreateData as Qi, Arkormx as Qn, fn as Qo, InsertManySpec as Qr, FactoryModelConstructor as Qs, applyOperationsToPersistedColumnMappingsState as Qt, PRISMA_MODEL_REGEX as R, QuerySchemaRows as Ra, GeneratedMigrationFile as Rc, UpdateManySpec as Ri, MigrateRollbackCommand as Rn, RegisteredModelName as Ro, AdapterModelIntrospectionOptions as Rr, JoinOn as Rs, markMigrationApplied as Rt, getRuntimeAdapter as S, PrismaFindManyArgsLike as Sa, HasManyThroughRelationMetadata as Sc, QueryLogicalOperator as Si, ModelNotFoundException as Sn, ModelDeclaredAttributeKey as So, SEEDER_BRAND as Sr, BelongsToManyRelation as Ss, stripPrismaSchemaModelsAndEnums as St, getRuntimePaginationCurrentPageResolver as T, PrismaLikeScalarFilter as Ta, ModelMetadata as Tc, QueryRawCondition as Ti, ArkormException as Tn, ModelEventHandlerConstructor as To, SeederConstructor as Tr, RelationAggregateConstraint as Ts, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, QuerySchemaWhere as Ua, PrismaSchemaSyncOptions as Uc, ArkormBootContext as Ui, MakeMigrationCommand as Un, Expression as Uo, AggregateSelection as Ur, JoinClause as Us, resolveMigrationStateFilePath as Ut, applyDropTableOperation as V, QuerySchemaUpdateArgs as Va, PrimaryKeyGeneration as Vc, AdapterBindableModel as Vi, MakeSeederCommand as Vn, AggregateExpression as Vo, AdapterTransactionContext as Vr, RelatedModelFromResult as Vs, readAppliedMigrationsStateFromStore as Vt, applyMigrationToDatabase as W, RawSelectInput as Wa, SchemaColumn as Wc, ArkormConfig as Wi, MakeFactoryCommand as Wn, ExpressionBuilder as Wo, AggregateSpec as Wr, LengthAwarePaginator as Ws, supportsDatabaseMigrationState as Wt, buildInverseRelationLine as X, TransactionCapableClient as Xa, SchemaPrimaryKey as Xc, CastType as Xi, AttributeOptions as Xn, count as Xo, DeleteManySpec as Xr, FactoryDefinition as Xs, PersistedTableMetadata as Xt, buildIndexLine as Y, TransactionCallback as Ya, SchemaOperation as Yc, CastMap as Yi, Attribute as Yn, col as Yo, DatabaseValue as Yr, FactoryCallback as Ys, PersistedPrimaryKeyGeneration as Yt, buildMigrationSource as Z, TransactionContext as Za, SchemaTableAlterOperation as Zc, ClientResolver as Zi, Arkorm as Zn, expressionBuilder as Zo, DeleteSpec as Zr, FactoryDefinitionAttributes as Zs, PersistedTimestampColumn as Zt, emitRuntimeDebugEvent as _, PaginationOptions as _a, DatabaseTablePersistedMetadataOptions as _c, QueryJoinRawConstraint as _i, ScopeNotDefinedException as _n, GlobalScope as _o, registerModels as _r, HasOneRelation as _s, resolveEnumName as _t, getRuntimeCompatibilityAdapter as a, DelegateUniqueWhere as aa, CaseExpressionNode as ac, QueryDayCondition as ai, getPersistedTableMetadata as an, GroupByAggregateSpec as ao, RuntimePathMap as ar, val as as, deriveRelationAlias as at, getActiveTransactionClient as b, PrismaClientLike as ba, ColumnMap as bc, QueryJsonCondition as bi, QueryExecutionExceptionContext as bn, ModelAttributesOf as bo, resetRuntimeRegistryForTests as br, BelongsToRelation as bs, runMigrationWithPrisma as bt, PrismaDelegateMap as c, DelegateWhere as ca, ExpressionJsonCast as cc, QueryFullTextCondition as ci, rebuildPersistedColumnMappingsState as cn, ArkormModelRegistry as co, getRegisteredModels as cr, ModelFactory as cs, escapeRegex as ct, inferDelegateName as d, GetUserConfig as da, InExpressionNode as dc, QueryJoin as di, resolvePersistedMetadataFeatures as dn, AttributeQuerySchema as do, loadFactoriesFrom as dr, MorphToRelation as ds, formatDefaultValue as dt, DelegateInclude as ea, FactoryState as ec, PartitionedSelectSpec as ei, SchemaUniqueConstraint as el, deletePersistedColumnMappingsState as en, RelationshipModelStatic as eo, RegisteredFactory as er, json as es, buildRelationLine as et, awaitConfiguredModelsRegistration as f, ModelQuerySchemaLike as fa, JsonExpressionNode as fc, QueryJoinBoolean as fi, syncPersistedColumnMappingsFromState as fn, AttributeSchemaDelegate as fo, loadMigrationsFrom as fr, MorphedByManyRelation as fs, formatEnumDefaultValue as ft, disposeArkormRuntime as g, PaginationMeta as ga, DatabaseTableOptions as gc, QueryJoinNullConstraint as gi, UniqueConstraintResolutionException as gn, DelegateForModelSchema as go, registerMigrations as gr, HasOneThroughRelation as gs, pad as gt, defineConfig as h, PaginationCurrentPageResolver as ha, ValueExpressionNode as hc, QueryJoinNestedConstraint as hi, UnsupportedAdapterFeatureException as hn, AttributeWhereInput as ho, registerFactories as hr, MorphManyRelation as hs, getMigrationPlan as ht, RuntimeModuleLoader as i, DelegateSelect as ia, CaseExpressionBranch as ic, QueryCondition as ii, getPersistedPrimaryKeyGeneration as in, GroupByAggregateRow as io, RuntimePathKey as ir, sum as is, deriveInverseRelationAlias as it, isTransactionCapableClient as j, PrismaTransactionContext as ja, PivotModelStatic as jc, RelationAggregateSpec as ji, TableBuilder as jn, ModelRelationshipResult as jo, KyselyDatabaseAdapter as jr, RelationDefaultValue as js, createEmptyAppliedMigrationsState as jt, isDelegateLike as k, PrismaTransactionCallback as ka, MorphToRelationMetadata as kc, QueryTimeCondition as ki, SchemaBuilder as kn, ModelOrderByInput as ko, createPrismaCompatibilityAdapter as kr, RelationConstraint as ks, buildMigrationRunId as kt, createPrismaAdapter as l, EagerLoadConstraint as la, ExpressionNode as lc, QueryGroupByItem as li, resetPersistedColumnMappingsCache as ln, AttributeCreateInput as lo, getRegisteredPaths as lr, defineFactory as ls, findEnumBlock as lt, configureArkormRuntime as m, NamingCase as ma, RawExpressionNode as mc, QueryJoinConstraint as mi, writePersistedColumnMappingsState as mn, AttributeUpdateInput as mo, loadSeedersFrom as mr, MorphOneRelation as ms, generateMigrationFile as mt, PivotModel as n, DelegateRow as na, AggregateExpressionNode as nc, QueryComparisonCondition as ni, TimestampNames as nl, getPersistedEnumMap as nn, EachCallback as no, RuntimeConstructor as nr, min as ns, createMigrationTimestamp as nt, resolveRuntimeCompatibilityQuerySchema as o, DelegateUpdateArgs as oa, ColumnExpressionNode as oc, QueryExistsCondition as oi, getPersistedTimestampColumns as on, QueryBuilder as oo, getRegisteredFactories as or, where as os, deriveRelationFieldName as ot, bindAdapterToModels as p, ModelTableCase as pa, NullCheckExpressionNode as pc, QueryJoinColumnConstraint as pi, validatePersistedMetadataFeaturesForMigrations as pn, AttributeSelect as po, loadModelsFrom as pr, MorphToManyRelation as ps, formatRelationAction as pt, buildEnumBlock as q, SimplePaginationMeta as qa, SchemaForeignKeyAction as qc, CastDefinition as qi, CliApp as qn, caseWhen as qo, DatabaseRow as qr, FactoryAttributeResolver as qs, PersistedColumnMappingsState as qt, LoadedRuntimeModule as r, DelegateRows as ra, BinaryExpressionNode as rc, QueryComparisonOperator as ri, TimestampNaming as rl, getPersistedEnumTsType as rn, ExpressionSelectMap as ro, RuntimePathInput as rr, raw as rs, deriveCollectionFieldName as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, DelegateUpdateData as sa, ExpressionBinaryOperator as sc, QueryExpressionCondition as si, readPersistedColumnMappingsState as sn, ArkormModelNameRegistry as so, getRegisteredMigrations as sr, InlineFactory as ss, deriveSingularFieldName as st, URLDriver as t, DelegateOrderBy as ta, MaybePromise as tc, QueryColumnComparisonCondition as ti, TimestampColumnBehavior as tl, getPersistedColumnMap as tn, ChunkCallback as to, RegisteredModel as tr, max as ts, buildUniqueConstraintLine as tt, createPrismaDelegateMap as u, EagerLoadMap as ua, FunctionExpressionNode as uc, QueryGroupCondition as ui, resolveColumnMappingsFilePath as un, AttributeOrderBy as uo, getRegisteredSeeders as ur, SetBasedEagerLoader as us, findModelBlock as ut, ensureArkormConfigLoading as v, PaginationURLDriver as va, BelongsToManyRelationMetadata as vc, QueryJoinType as vi, RelationResolutionException as vn, ModelAttributeValue as vo, registerPaths as vr, HasManyThroughRelation as vs, resolveMigrationClassName as vt, getRuntimeDebugHandler as w, PrismaLikeOrderBy as wa, HasOneThroughRelationMetadata as wc, QueryOrderBy as wi, ArkormErrorContext as wn, ModelEventHandler as wo, SeederCallArgument as wr, RelationTableLoader as ws, supportsDatabaseMigrationExecution as wt, getDefaultStubsPath as x, PrismaDelegateLike as xa, HasManyRelationMetadata as xc, QueryJsonConditionKind as xi, QueryConstraintException as xn, ModelCreateData as xo, resolveRegisteredModel as xr, SingleResultRelation as xs, runPrismaCommand as xt, getActiveTransactionAdapter as y, PaginationURLDriverFactory as ya, BelongsToRelationMetadata as yc, QueryJoinValueConstraint as yi, QueryExecutionException as yn, ModelAttributes as yo, registerSeeders as yr, HasManyRelation as ys, resolvePrismaType as yt, applyAlterTableOperation as z, QuerySchemaSelect as za, MigrationClass as zc, UpdateSpec as zi, MigrateFreshCommand as zn, RelatedModelClass as zo, AdapterModelStructure as zr, JoinSource as zs, markMigrationRun as zt };
|
|
9122
|
+
export { buildPrimaryKeyLine as $, TransactionOptions as $a, SchemaTableCreateOperation as $c, DelegateCreateData as $i, getModel as $n, fn as $o, InsertSpec as $r, FactoryModelConstructor as $s, createEmptyPersistedColumnMappingsState as $t, isQuerySchemaLike as A, PrismaTransactionCallback as Aa, MorphToRelationMetadata as Ac, QueryTimeCondition as Ai, EnumBuilder as An, ModelOrderByInput as Ao, createPrismaDatabaseAdapter as Ar, RelationConstraint as As, computeMigrationChecksum as At, applyCreateTableOperation as B, QuerySchemaSelect as Ba, MigrationClass as Bc, UpdateSpec as Bi, MigrateCommand as Bn, RelatedModelClass as Bo, AdapterQueryOperation as Br, JoinSource as Bs, readAppliedMigrationsState as Bt, getRuntimeClient as C, PrismaFindManyArgsLike as Ca, HasManyThroughRelationMetadata as Cc, QueryNotCondition as Ci, MissingDelegateException as Cn, ModelDeclaredAttributeKey as Co, Seeder as Cr, BelongsToManyRelation as Cs, supportsDatabaseCreation as Ct, getRuntimePrismaClient as D, PrismaLikeSelect as Da, MorphManyRelationMetadata as Dc, QueryScalarComparisonOperator as Di, MIGRATION_BRAND as Dn, ModelEventListener as Do, PrismaDatabaseAdapter as Dr, RelationAggregateInput as Ds, toModelName as Dt, getRuntimePaginationURLDriverFactory as E, PrismaLikeScalarFilter as Ea, ModelMetadata as Ec, QueryRelationCondition as Ei, DB as En, ModelEventHandlerConstructor as Eo, SeederInput as Er, RelationAggregateConstraint as Es, toMigrationFileSlug as Et, PrimaryKeyGenerationPlanner as F, QuerySchemaFindManyArgs as Fa, AppliedMigrationEntry as Fc, RelationLoadSpec as Fi, SeedCommand as Fn, QuerySchemaForModel as Fo, AdapterDatabaseCreationResult as Fr, RelationResultCache as Fs, getLastMigrationRun as Ft, applyMigrationToPrismaSchema as G, RawSelectInput as Ga, SchemaColumn as Gc, ArkormConfig as Gi, InitCommand as Gn, ExpressionBuilder as Go, DatabaseAdapter as Gr, LengthAwarePaginator as Gs, writeAppliedMigrationsState as Gt, applyMigrationRollbackToDatabase as H, QuerySchemaUpdateArgs as Ha, PrimaryKeyGeneration as Hc, AdapterBindableModel as Hi, MakeModelCommand as Hn, AggregateExpression as Ho, AggregateOperation as Hr, RelatedModelFromResult as Hs, removeAppliedMigration as Ht, PRISMA_ENUM_MEMBER_REGEX as I, QuerySchemaInclude as Ia, AppliedMigrationRun as Ic, SelectSpec as Ii, ModelsSyncCommand as In, QuerySchemaForModelInstance as Io, AdapterInspectionRequest as Ir, RelationTableLookupSpec as Is, getLatestAppliedMigrations as It, buildFieldLine as J, SimplePaginationMeta as Ja, SchemaForeignKeyAction as Jc, CastDefinition as Ji, resolveCast as Jn, caseWhen as Jo, DatabaseRows as Jr, FactoryAttributeResolver as Js, PersistedMetadataFeatures as Jt, applyOperationsToPrismaSchema as K, RuntimeClientLike as Ka, SchemaColumnType as Kc, ArkormDebugEvent as Ki, DbCommand as Kn, JsonExpression as Ko, DatabasePrimitive as Kr, Paginator as Ks, writeAppliedMigrationsStateToStore as Kt, PRISMA_ENUM_REGEX as L, QuerySchemaOrderBy as La, AppliedMigrationsState as Lc, SoftDeleteQueryMode as Li, MigrationHistoryCommand as Ln, RegisteredModelClass as Lo, AdapterModelFieldStructure as Lr, EagerLoadQueryForRelationship as Ls, isMigrationApplied as Lt, loadArkormConfig as M, PrismaTransactionContext as Ma, PivotModelStatic as Mc, RelationAggregateSpec as Mi, GeneratedColumnExpression as Mn, ModelRelationshipResult as Mo, createKyselyAdapter as Mr, RelationDefaultValue as Ms, deleteAppliedMigrationsStateFromStore as Mt, resetArkormRuntimeForTests as N, PrismaTransactionOptions as Na, RelationMetadata as Nc, RelationFilterSpec as Ni, resolveGeneratedExpression as Nn, ModelUpdateData as No, AdapterCapabilities as Nr, RelationMetadataProvider as Ns, findAppliedMigration as Nt, getUserConfig as O, PrismaLikeSortOrder as Oa, MorphOneRelationMetadata as Oc, QuerySelectColumn as Oi, Migration as On, ModelEventName as Oo, PrismaDelegateNameMapping as Or, RelationAggregateType as Os, buildMigrationIdentity as Ot, runArkormTransaction as P, QuerySchemaCreateData as Pa, RelationMetadataType as Pc, RelationLoadPlan as Pi, ForeignKeyBuilder as Pn, ModelWhereInput as Po, AdapterCapability as Pr, RelationResult as Ps, getLastBatchMigrations as Pt, buildModelBlock as Q, TransactionContext as Qa, SchemaTableAlterOperation as Qc, ClientResolver as Qi, Arkormx as Qn, expressionBuilder as Qo, InsertManySpec as Qr, FactoryDefinitionAttributes as Qs, applyOperationsToPersistedColumnMappingsState as Qt, PRISMA_MODEL_REGEX as R, QuerySchemaRow as Ra, GenerateMigrationOptions as Rc, SortDirection as Ri, MigrateRollbackCommand as Rn, RegisteredModelInstance as Ro, AdapterModelIntrospectionOptions as Rr, EagerLoadRelations as Rs, markMigrationApplied as Rt, getRuntimeAdapter as S, PrismaDelegateLike as Sa, HasManyRelationMetadata as Sc, QueryLogicalOperator as Si, ModelNotFoundException as Sn, ModelCreateData as So, SEEDER_BRAND as Sr, SingleResultRelation as Ss, stripPrismaSchemaModelsAndEnums as St, getRuntimePaginationCurrentPageResolver as T, PrismaLikeOrderBy as Ta, HasOneThroughRelationMetadata as Tc, QueryRawCondition as Ti, ArkormException as Tn, ModelEventHandler as To, SeederConstructor as Tr, RelationTableLoader as Ts, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, QuerySchemaUpdateData as Ua, PrismaMigrationWorkflowOptions as Uc, AdapterQueryInspection as Ui, MakeMigrationCommand as Un, CaseExpression as Uo, AggregateSelection as Ur, WhereCallback as Us, resolveMigrationStateFilePath as Ut, applyDropTableOperation as V, QuerySchemaUniqueWhere as Va, MigrationInstanceLike as Vc, UpsertSpec as Vi, MakeSeederCommand as Vn, Model as Vo, AdapterTransactionContext as Vr, RelatedModelForRelationship as Vs, readAppliedMigrationsStateFromStore as Vt, applyMigrationToDatabase as W, QuerySchemaWhere as Wa, PrismaSchemaSyncOptions as Wc, ArkormBootContext as Wi, MakeFactoryCommand as Wn, Expression as Wo, AggregateSpec as Wr, JoinClause as Ws, supportsDatabaseMigrationState as Wt, buildInverseRelationLine as X, TransactionCallback as Xa, SchemaOperation as Xc, CastMap as Xi, AttributeOptions as Xn, col as Xo, DeleteManySpec as Xr, FactoryCallback as Xs, PersistedTableMetadata as Xt, buildIndexLine as Y, SoftDeleteConfig as Ya, SchemaIndex as Yc, CastHandler as Yi, Attribute as Yn, coalesce as Yo, DatabaseValue as Yr, FactoryAttributes as Ys, PersistedPrimaryKeyGeneration as Yt, buildMigrationSource as Z, TransactionCapableClient as Za, SchemaPrimaryKey as Zc, CastType as Zi, Arkorm as Zn, count as Zo, DeleteSpec as Zr, FactoryDefinition as Zs, PersistedTimestampColumn as Zt, emitRuntimeDebugEvent as _, PaginationMeta as _a, DatabaseTableOptions as _c, QueryJoinRawConstraint as _i, ScopeNotDefinedException as _n, DelegateForModelSchema as _o, registerModels as _r, HasOneThroughRelation as _s, resolveEnumName as _t, getRuntimeCompatibilityAdapter as a, DelegateSelect as aa, CaseExpressionBranch as ac, QueryDayCondition as ai, getPersistedTableMetadata as an, GroupByAggregateRow as ao, RuntimePathMap as ar, sum as as, deriveRelationAlias as at, getActiveTransactionClient as b, PaginationURLDriverFactory as ba, BelongsToRelationMetadata as bc, QueryJsonCondition as bi, QueryExecutionExceptionContext as bn, ModelAttributes as bo, resetRuntimeRegistryForTests as br, HasManyRelation as bs, runMigrationWithPrisma as bt, PrismaDelegateMap as c, DelegateUpdateData as ca, ExpressionBinaryOperator as cc, QueryFullTextCondition as ci, rebuildPersistedColumnMappingsState as cn, ArkormModelNameRegistry as co, getRegisteredModels as cr, InlineFactory as cs, escapeRegex as ct, inferDelegateName as d, EagerLoadMap as da, FunctionExpressionNode as dc, QueryJoin as di, resolvePersistedMetadataFeatures as dn, AttributeOrderBy as do, loadFactoriesFrom as dr, SetBasedEagerLoader as ds, formatDefaultValue as dt, DelegateFindManyArgs as ea, FactoryRelationshipResolver as ec, PartitionedSelectSpec as ei, SchemaTableDropOperation as el, deletePersistedColumnMappingsState as en, ModelStatic as eo, RegisteredFactory as er, fromExpressionNode as es, buildRelationLine as et, awaitConfiguredModelsRegistration as f, GetUserConfig as fa, InExpressionNode as fc, QueryJoinBoolean as fi, syncPersistedColumnMappingsFromState as fn, AttributeQuerySchema as fo, loadMigrationsFrom as fr, MorphToRelation as fs, formatEnumDefaultValue as ft, disposeArkormRuntime as g, PaginationCurrentPageResolver as ga, ValueExpressionNode as gc, QueryJoinNullConstraint as gi, UniqueConstraintResolutionException as gn, AttributeWhereInput as go, registerMigrations as gr, MorphManyRelation as gs, pad as gt, defineConfig as h, NamingCase as ha, RawExpressionNode as hc, QueryJoinNestedConstraint as hi, UnsupportedAdapterFeatureException as hn, AttributeUpdateInput as ho, registerFactories as hr, MorphOneRelation as hs, getMigrationPlan as ht, RuntimeModuleLoader as i, DelegateRows as ia, BinaryExpressionNode as ic, QueryCondition as ii, TimestampNaming as il, getPersistedPrimaryKeyGeneration as in, ExpressionSelectMap as io, RuntimePathKey as ir, raw as is, deriveInverseRelationAlias as it, isTransactionCapableClient as j, PrismaTransactionCapableClient as ja, MorphedByManyRelationMetadata as jc, RawQuerySpec as ji, TableBuilder as jn, ModelRelationshipKey as jo, KyselyDatabaseAdapter as jr, RelationDefaultResolver as js, createEmptyAppliedMigrationsState as jt, isDelegateLike as k, PrismaLikeWhereInput as ka, MorphToManyRelationMetadata as kc, QueryTarget as ki, SchemaBuilder as kn, ModelLifecycleState as ko, createPrismaCompatibilityAdapter as kr, RelationColumnLookupSpec as ks, buildMigrationRunId as kt, createPrismaAdapter as l, DelegateWhere as la, ExpressionJsonCast as lc, QueryGroupByItem as li, resetPersistedColumnMappingsCache as ln, ArkormModelRegistry as lo, getRegisteredPaths as lr, ModelFactory as ls, findEnumBlock as lt, configureArkormRuntime as m, ModelTableCase as ma, NullCheckExpressionNode as mc, QueryJoinConstraint as mi, writePersistedColumnMappingsState as mn, AttributeSelect as mo, loadSeedersFrom as mr, MorphToManyRelation as ms, generateMigrationFile as mt, PivotModel as n, DelegateOrderBy as na, MaybePromise as nc, QueryComparisonCondition as ni, TimestampColumnBehavior as nl, getPersistedEnumMap as nn, ChunkCallback as no, RuntimeConstructor as nr, max as ns, createMigrationTimestamp as nt, resolveRuntimeCompatibilityQuerySchema as o, DelegateUniqueWhere as oa, CaseExpressionNode as oc, QueryExistsCondition as oi, getPersistedTimestampColumns as on, GroupByAggregateSpec as oo, getRegisteredFactories as or, val as os, deriveRelationFieldName as ot, bindAdapterToModels as p, ModelQuerySchemaLike as pa, JsonExpressionNode as pc, QueryJoinColumnConstraint as pi, validatePersistedMetadataFeaturesForMigrations as pn, AttributeSchemaDelegate as po, loadModelsFrom as pr, MorphedByManyRelation as ps, formatRelationAction as pt, buildEnumBlock as q, Serializable as qa, SchemaForeignKey as qc, ArkormDebugHandler as qi, CliApp as qn, avg as qo, DatabaseRow as qr, ArkormCollection as qs, PersistedColumnMappingsState as qt, LoadedRuntimeModule as r, DelegateRow as ra, AggregateExpressionNode as rc, QueryComparisonOperator as ri, TimestampNames as rl, getPersistedEnumTsType as rn, EachCallback as ro, RuntimePathInput as rr, min as rs, deriveCollectionFieldName as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, DelegateUpdateArgs as sa, ColumnExpressionNode as sc, QueryExpressionCondition as si, readPersistedColumnMappingsState as sn, QueryBuilder as so, getRegisteredMigrations as sr, where as ss, deriveSingularFieldName as st, URLDriver as t, DelegateInclude as ta, FactoryState as tc, QueryColumnComparisonCondition as ti, SchemaUniqueConstraint as tl, getPersistedColumnMap as tn, RelationshipModelStatic as to, RegisteredModel as tr, json as ts, buildUniqueConstraintLine as tt, createPrismaDelegateMap as u, EagerLoadConstraint as ua, ExpressionNode as uc, QueryGroupCondition as ui, resolveColumnMappingsFilePath as un, AttributeCreateInput as uo, getRegisteredSeeders as ur, defineFactory as us, findModelBlock as ut, ensureArkormConfigLoading as v, PaginationOptions as va, DatabaseTablePersistedMetadataOptions as vc, QueryJoinType as vi, RelationResolutionException as vn, GlobalScope as vo, registerPaths as vr, HasOneRelation as vs, resolveMigrationClassName as vt, getRuntimeDebugHandler as w, PrismaLikeInclude as wa, HasOneRelationMetadata as wc, QueryOrderBy as wi, ArkormErrorContext as wn, ModelEventDispatcher as wo, SeederCallArgument as wr, Relation as ws, supportsDatabaseMigrationExecution as wt, getDefaultStubsPath as x, PrismaClientLike as xa, ColumnMap as xc, QueryJsonConditionKind as xi, QueryConstraintException as xn, ModelAttributesOf as xo, resolveRegisteredModel as xr, BelongsToRelation as xs, runPrismaCommand as xt, getActiveTransactionAdapter as y, PaginationURLDriver as ya, BelongsToManyRelationMetadata as yc, QueryJoinValueConstraint as yi, QueryExecutionException as yn, ModelAttributeValue as yo, registerSeeders as yr, HasManyThroughRelation as ys, resolvePrismaType as yt, applyAlterTableOperation as z, QuerySchemaRows as za, GeneratedMigrationFile as zc, UpdateManySpec as zi, MigrateFreshCommand as zn, RegisteredModelName as zo, AdapterModelStructure as zr, JoinOn as zs, markMigrationRun as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Kysely, Transaction } from "kysely";
|
|
2
|
-
import { PrismaClient } from "@prisma/client";
|
|
3
1
|
import { Collection } from "@h3ravel/collect.js";
|
|
2
|
+
import { Kysely, Transaction } from "kysely";
|
|
4
3
|
import { Application, Command, Musket } from "@h3ravel/musket";
|
|
4
|
+
import { PrismaClient } from "@prisma/client";
|
|
5
5
|
//#region src/types/migrations.d.ts
|
|
6
6
|
type SchemaColumnType = 'id' | 'uuid' | 'enum' | 'string' | 'text' | 'integer' | 'bigInteger' | 'float' | 'decimal' | 'boolean' | 'json' | 'date' | 'dateTime' | 'timestamp';
|
|
7
7
|
interface PrimaryKeyGeneration {
|
|
@@ -4023,18 +4023,41 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
4023
4023
|
/**
|
|
4024
4024
|
* Appends a pre-built structured condition, first flushing any Prisma-like
|
|
4025
4025
|
* legacy where into the structured representation so the two combine correctly.
|
|
4026
|
+
*
|
|
4027
|
+
* @param boolean
|
|
4028
|
+
* @param condition
|
|
4029
|
+
* @returns
|
|
4026
4030
|
*/
|
|
4027
4031
|
private appendStructuredWhere;
|
|
4028
4032
|
/**
|
|
4029
4033
|
* Appends a boolean {@link Expression} as a where predicate. When the query is
|
|
4030
4034
|
* using the Prisma-like legacy where representation, the expression is merged in
|
|
4031
4035
|
* as a structured condition alongside it.
|
|
4036
|
+
*
|
|
4037
|
+
* @param boolean
|
|
4038
|
+
* @param expression
|
|
4039
|
+
* @returns
|
|
4032
4040
|
*/
|
|
4033
4041
|
private appendExpressionCondition;
|
|
4034
4042
|
/**
|
|
4035
4043
|
* Resolve a callback into a parenthesized group condition and append it.
|
|
4044
|
+
*
|
|
4045
|
+
* @param boolean
|
|
4046
|
+
* @param callback
|
|
4047
|
+
* @returns
|
|
4036
4048
|
*/
|
|
4037
4049
|
private appendNestedWhere;
|
|
4050
|
+
/**
|
|
4051
|
+
* Fold this builder's relation filters into `condition`, in the order and
|
|
4052
|
+
* with the and/or they were added with, so they can be carried inside a
|
|
4053
|
+
* where group or another relation's constraint.
|
|
4054
|
+
*
|
|
4055
|
+
* @param condition
|
|
4056
|
+
* @param operation Names the caller in the exception raised when a filter
|
|
4057
|
+
* cannot be expressed as a condition.
|
|
4058
|
+
* @returns
|
|
4059
|
+
*/
|
|
4060
|
+
private withRelationConditions;
|
|
4038
4061
|
/**
|
|
4039
4062
|
* Returns the user-authored where condition for nesting, excluding any
|
|
4040
4063
|
* soft-delete predicate (the parent query owns that).
|
|
@@ -5336,15 +5359,16 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
|
|
|
5336
5359
|
*/
|
|
5337
5360
|
insertOrIgnoreUsing(columns: string[], query: unknown): Promise<number>;
|
|
5338
5361
|
/**
|
|
5339
|
-
* Updates
|
|
5340
|
-
*
|
|
5362
|
+
* Updates the first record matching the current query constraints and
|
|
5363
|
+
* returns it as a model. Use {@link updateFrom} to update every match.
|
|
5341
5364
|
*
|
|
5342
5365
|
* @param data
|
|
5343
5366
|
* @returns
|
|
5344
5367
|
*/
|
|
5345
5368
|
update(data: ModelUpdateData<TModel, TDelegate>): Promise<TModel>;
|
|
5346
5369
|
/**
|
|
5347
|
-
* Update
|
|
5370
|
+
* Update every record matching the current query constraints and return
|
|
5371
|
+
* the number of affected rows.
|
|
5348
5372
|
*
|
|
5349
5373
|
* @param data
|
|
5350
5374
|
* @returns
|
|
@@ -6109,6 +6133,14 @@ interface QueryExistsCondition {
|
|
|
6109
6133
|
type: 'exists';
|
|
6110
6134
|
query: SelectSpec;
|
|
6111
6135
|
}
|
|
6136
|
+
/**
|
|
6137
|
+
* A relation filter (`whereHas` and friends) placed inside a where tree, so it
|
|
6138
|
+
* can sit in a group or inside another relation's constraint.
|
|
6139
|
+
*/
|
|
6140
|
+
interface QueryRelationCondition {
|
|
6141
|
+
type: 'relation';
|
|
6142
|
+
filter: RelationFilterSpec;
|
|
6143
|
+
}
|
|
6112
6144
|
interface QueryFullTextCondition {
|
|
6113
6145
|
type: 'full-text';
|
|
6114
6146
|
columns: string[];
|
|
@@ -6138,7 +6170,7 @@ interface QueryExpressionCondition {
|
|
|
6138
6170
|
type: 'expression';
|
|
6139
6171
|
expression: ExpressionNode;
|
|
6140
6172
|
}
|
|
6141
|
-
type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryFullTextCondition | QueryJsonCondition | QueryExpressionCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
|
|
6173
|
+
type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryRelationCondition | QueryFullTextCondition | QueryJsonCondition | QueryExpressionCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
|
|
6142
6174
|
interface AggregateSelection {
|
|
6143
6175
|
type: AggregateOperation;
|
|
6144
6176
|
column?: string;
|
|
@@ -6544,10 +6576,30 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
|
|
|
6544
6576
|
private buildWhereClause;
|
|
6545
6577
|
private buildPaginationClause;
|
|
6546
6578
|
private buildColumnReference;
|
|
6579
|
+
/**
|
|
6580
|
+
* Renders the relation's source table, aliasing it when a self-referential
|
|
6581
|
+
* relation would otherwise put the same name on both sides of a correlated
|
|
6582
|
+
* subquery.
|
|
6583
|
+
*
|
|
6584
|
+
* @param sourceTable
|
|
6585
|
+
* @param table
|
|
6586
|
+
* @returns
|
|
6587
|
+
*/
|
|
6588
|
+
private buildTableSource;
|
|
6547
6589
|
private buildRelatedTargetFromRelation;
|
|
6548
6590
|
private resolveMappedTable;
|
|
6549
6591
|
private buildBelongsToManyJoinSource;
|
|
6550
6592
|
private buildThroughJoinSource;
|
|
6593
|
+
/**
|
|
6594
|
+
* The value a polymorphic child stores in its type column for this parent: the
|
|
6595
|
+
* parent model's class name, matching what the relationship writes on create
|
|
6596
|
+
* and what the set-based eager loader groups parents by.
|
|
6597
|
+
*
|
|
6598
|
+
* @param target
|
|
6599
|
+
* @param relation
|
|
6600
|
+
* @returns
|
|
6601
|
+
*/
|
|
6602
|
+
private resolveMorphType;
|
|
6551
6603
|
private buildRelatedJoinCondition;
|
|
6552
6604
|
private combineConditions;
|
|
6553
6605
|
private buildRelationFilterExpression;
|
|
@@ -9067,4 +9119,4 @@ declare class URLDriver {
|
|
|
9067
9119
|
url(page: number): string;
|
|
9068
9120
|
}
|
|
9069
9121
|
//#endregion
|
|
9070
|
-
export { buildPrimaryKeyLine as $, ModelStatic as $a, SchemaTableDropOperation as $c, DelegateFindManyArgs as $i, getModel as $n, fromExpressionNode as $o, InsertSpec as $r, FactoryRelationshipResolver as $s, createEmptyPersistedColumnMappingsState as $t, isQuerySchemaLike as A, PrismaTransactionCapableClient as Aa, MorphedByManyRelationMetadata as Ac, RawQuerySpec as Ai, EnumBuilder as An, ModelRelationshipKey as Ao, createPrismaDatabaseAdapter as Ar, RelationDefaultResolver as As, computeMigrationChecksum as At, applyCreateTableOperation as B, QuerySchemaUniqueWhere as Ba, MigrationInstanceLike as Bc, UpsertSpec as Bi, MigrateCommand as Bn, Model as Bo, AdapterQueryOperation as Br, RelatedModelForRelationship as Bs, readAppliedMigrationsState as Bt, getRuntimeClient as C, PrismaLikeInclude as Ca, HasOneRelationMetadata as Cc, QueryNotCondition as Ci, MissingDelegateException as Cn, ModelEventDispatcher as Co, Seeder as Cr, Relation as Cs, supportsDatabaseCreation as Ct, getRuntimePrismaClient as D, PrismaLikeSortOrder as Da, MorphOneRelationMetadata as Dc, QuerySelectColumn as Di, MIGRATION_BRAND as Dn, ModelEventName as Do, PrismaDatabaseAdapter as Dr, RelationAggregateType as Ds, toModelName as Dt, getRuntimePaginationURLDriverFactory as E, PrismaLikeSelect as Ea, MorphManyRelationMetadata as Ec, QueryScalarComparisonOperator as Ei, DB as En, ModelEventListener as Eo, SeederInput as Er, RelationAggregateInput as Es, toMigrationFileSlug as Et, PrimaryKeyGenerationPlanner as F, QuerySchemaInclude as Fa, AppliedMigrationRun as Fc, SelectSpec as Fi, SeedCommand as Fn, QuerySchemaForModelInstance as Fo, AdapterDatabaseCreationResult as Fr, RelationTableLookupSpec as Fs, getLastMigrationRun as Ft, applyMigrationToPrismaSchema as G, RuntimeClientLike as Ga, SchemaColumnType as Gc, ArkormDebugEvent as Gi, InitCommand as Gn, JsonExpression as Go, DatabaseAdapter as Gr, Paginator as Gs, writeAppliedMigrationsState as Gt, applyMigrationRollbackToDatabase as H, QuerySchemaUpdateData as Ha, PrismaMigrationWorkflowOptions as Hc, AdapterQueryInspection as Hi, MakeModelCommand as Hn, CaseExpression as Ho, AggregateOperation as Hr, WhereCallback as Hs, removeAppliedMigration as Ht, PRISMA_ENUM_MEMBER_REGEX as I, QuerySchemaOrderBy as Ia, AppliedMigrationsState as Ic, SoftDeleteQueryMode as Ii, ModelsSyncCommand as In, RegisteredModelClass as Io, AdapterInspectionRequest as Ir, EagerLoadQueryForRelationship as Is, getLatestAppliedMigrations as It, buildFieldLine as J, SoftDeleteConfig as Ja, SchemaIndex as Jc, CastHandler as Ji, resolveCast as Jn, coalesce as Jo, DatabaseRows as Jr, FactoryAttributes as Js, PersistedMetadataFeatures as Jt, applyOperationsToPrismaSchema as K, Serializable as Ka, SchemaForeignKey as Kc, ArkormDebugHandler as Ki, DbCommand as Kn, avg as Ko, DatabasePrimitive as Kr, ArkormCollection as Ks, writeAppliedMigrationsStateToStore as Kt, PRISMA_ENUM_REGEX as L, QuerySchemaRow as La, GenerateMigrationOptions as Lc, SortDirection as Li, MigrationHistoryCommand as Ln, RegisteredModelInstance as Lo, AdapterModelFieldStructure as Lr, EagerLoadRelations as Ls, isMigrationApplied as Lt, loadArkormConfig as M, PrismaTransactionOptions as Ma, RelationMetadata as Mc, RelationFilterSpec as Mi, GeneratedColumnExpression as Mn, ModelUpdateData as Mo, createKyselyAdapter as Mr, RelationMetadataProvider as Ms, deleteAppliedMigrationsStateFromStore as Mt, resetArkormRuntimeForTests as N, QuerySchemaCreateData as Na, RelationMetadataType as Nc, RelationLoadPlan as Ni, resolveGeneratedExpression as Nn, ModelWhereInput as No, AdapterCapabilities as Nr, RelationResult as Ns, findAppliedMigration as Nt, getUserConfig as O, PrismaLikeWhereInput as Oa, MorphToManyRelationMetadata as Oc, QueryTarget as Oi, Migration as On, ModelLifecycleState as Oo, PrismaDelegateNameMapping as Or, RelationColumnLookupSpec as Os, buildMigrationIdentity as Ot, runArkormTransaction as P, QuerySchemaFindManyArgs as Pa, AppliedMigrationEntry as Pc, RelationLoadSpec as Pi, ForeignKeyBuilder as Pn, QuerySchemaForModel as Po, AdapterCapability as Pr, RelationResultCache as Ps, getLastBatchMigrations as Pt, buildModelBlock as Q, TransactionOptions as Qa, SchemaTableCreateOperation as Qc, DelegateCreateData as Qi, Arkormx as Qn, fn as Qo, InsertManySpec as Qr, FactoryModelConstructor as Qs, applyOperationsToPersistedColumnMappingsState as Qt, PRISMA_MODEL_REGEX as R, QuerySchemaRows as Ra, GeneratedMigrationFile as Rc, UpdateManySpec as Ri, MigrateRollbackCommand as Rn, RegisteredModelName as Ro, AdapterModelIntrospectionOptions as Rr, JoinOn as Rs, markMigrationApplied as Rt, getRuntimeAdapter as S, PrismaFindManyArgsLike as Sa, HasManyThroughRelationMetadata as Sc, QueryLogicalOperator as Si, ModelNotFoundException as Sn, ModelDeclaredAttributeKey as So, SEEDER_BRAND as Sr, BelongsToManyRelation as Ss, stripPrismaSchemaModelsAndEnums as St, getRuntimePaginationCurrentPageResolver as T, PrismaLikeScalarFilter as Ta, ModelMetadata as Tc, QueryRawCondition as Ti, ArkormException as Tn, ModelEventHandlerConstructor as To, SeederConstructor as Tr, RelationAggregateConstraint as Ts, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, QuerySchemaWhere as Ua, PrismaSchemaSyncOptions as Uc, ArkormBootContext as Ui, MakeMigrationCommand as Un, Expression as Uo, AggregateSelection as Ur, JoinClause as Us, resolveMigrationStateFilePath as Ut, applyDropTableOperation as V, QuerySchemaUpdateArgs as Va, PrimaryKeyGeneration as Vc, AdapterBindableModel as Vi, MakeSeederCommand as Vn, AggregateExpression as Vo, AdapterTransactionContext as Vr, RelatedModelFromResult as Vs, readAppliedMigrationsStateFromStore as Vt, applyMigrationToDatabase as W, RawSelectInput as Wa, SchemaColumn as Wc, ArkormConfig as Wi, MakeFactoryCommand as Wn, ExpressionBuilder as Wo, AggregateSpec as Wr, LengthAwarePaginator as Ws, supportsDatabaseMigrationState as Wt, buildInverseRelationLine as X, TransactionCapableClient as Xa, SchemaPrimaryKey as Xc, CastType as Xi, AttributeOptions as Xn, count as Xo, DeleteManySpec as Xr, FactoryDefinition as Xs, PersistedTableMetadata as Xt, buildIndexLine as Y, TransactionCallback as Ya, SchemaOperation as Yc, CastMap as Yi, Attribute as Yn, col as Yo, DatabaseValue as Yr, FactoryCallback as Ys, PersistedPrimaryKeyGeneration as Yt, buildMigrationSource as Z, TransactionContext as Za, SchemaTableAlterOperation as Zc, ClientResolver as Zi, Arkorm as Zn, expressionBuilder as Zo, DeleteSpec as Zr, FactoryDefinitionAttributes as Zs, PersistedTimestampColumn as Zt, emitRuntimeDebugEvent as _, PaginationOptions as _a, DatabaseTablePersistedMetadataOptions as _c, QueryJoinRawConstraint as _i, ScopeNotDefinedException as _n, GlobalScope as _o, registerModels as _r, HasOneRelation as _s, resolveEnumName as _t, getRuntimeCompatibilityAdapter as a, DelegateUniqueWhere as aa, CaseExpressionNode as ac, QueryDayCondition as ai, getPersistedTableMetadata as an, GroupByAggregateSpec as ao, RuntimePathMap as ar, val as as, deriveRelationAlias as at, getActiveTransactionClient as b, PrismaClientLike as ba, ColumnMap as bc, QueryJsonCondition as bi, QueryExecutionExceptionContext as bn, ModelAttributesOf as bo, resetRuntimeRegistryForTests as br, BelongsToRelation as bs, runMigrationWithPrisma as bt, PrismaDelegateMap as c, DelegateWhere as ca, ExpressionJsonCast as cc, QueryFullTextCondition as ci, rebuildPersistedColumnMappingsState as cn, ArkormModelRegistry as co, getRegisteredModels as cr, ModelFactory as cs, escapeRegex as ct, inferDelegateName as d, GetUserConfig as da, InExpressionNode as dc, QueryJoin as di, resolvePersistedMetadataFeatures as dn, AttributeQuerySchema as do, loadFactoriesFrom as dr, MorphToRelation as ds, formatDefaultValue as dt, DelegateInclude as ea, FactoryState as ec, PartitionedSelectSpec as ei, SchemaUniqueConstraint as el, deletePersistedColumnMappingsState as en, RelationshipModelStatic as eo, RegisteredFactory as er, json as es, buildRelationLine as et, awaitConfiguredModelsRegistration as f, ModelQuerySchemaLike as fa, JsonExpressionNode as fc, QueryJoinBoolean as fi, syncPersistedColumnMappingsFromState as fn, AttributeSchemaDelegate as fo, loadMigrationsFrom as fr, MorphedByManyRelation as fs, formatEnumDefaultValue as ft, disposeArkormRuntime as g, PaginationMeta as ga, DatabaseTableOptions as gc, QueryJoinNullConstraint as gi, UniqueConstraintResolutionException as gn, DelegateForModelSchema as go, registerMigrations as gr, HasOneThroughRelation as gs, pad as gt, defineConfig as h, PaginationCurrentPageResolver as ha, ValueExpressionNode as hc, QueryJoinNestedConstraint as hi, UnsupportedAdapterFeatureException as hn, AttributeWhereInput as ho, registerFactories as hr, MorphManyRelation as hs, getMigrationPlan as ht, RuntimeModuleLoader as i, DelegateSelect as ia, CaseExpressionBranch as ic, QueryCondition as ii, getPersistedPrimaryKeyGeneration as in, GroupByAggregateRow as io, RuntimePathKey as ir, sum as is, deriveInverseRelationAlias as it, isTransactionCapableClient as j, PrismaTransactionContext as ja, PivotModelStatic as jc, RelationAggregateSpec as ji, TableBuilder as jn, ModelRelationshipResult as jo, KyselyDatabaseAdapter as jr, RelationDefaultValue as js, createEmptyAppliedMigrationsState as jt, isDelegateLike as k, PrismaTransactionCallback as ka, MorphToRelationMetadata as kc, QueryTimeCondition as ki, SchemaBuilder as kn, ModelOrderByInput as ko, createPrismaCompatibilityAdapter as kr, RelationConstraint as ks, buildMigrationRunId as kt, createPrismaAdapter as l, EagerLoadConstraint as la, ExpressionNode as lc, QueryGroupByItem as li, resetPersistedColumnMappingsCache as ln, AttributeCreateInput as lo, getRegisteredPaths as lr, defineFactory as ls, findEnumBlock as lt, configureArkormRuntime as m, NamingCase as ma, RawExpressionNode as mc, QueryJoinConstraint as mi, writePersistedColumnMappingsState as mn, AttributeUpdateInput as mo, loadSeedersFrom as mr, MorphOneRelation as ms, generateMigrationFile as mt, PivotModel as n, DelegateRow as na, AggregateExpressionNode as nc, QueryComparisonCondition as ni, TimestampNames as nl, getPersistedEnumMap as nn, EachCallback as no, RuntimeConstructor as nr, min as ns, createMigrationTimestamp as nt, resolveRuntimeCompatibilityQuerySchema as o, DelegateUpdateArgs as oa, ColumnExpressionNode as oc, QueryExistsCondition as oi, getPersistedTimestampColumns as on, QueryBuilder as oo, getRegisteredFactories as or, where as os, deriveRelationFieldName as ot, bindAdapterToModels as p, ModelTableCase as pa, NullCheckExpressionNode as pc, QueryJoinColumnConstraint as pi, validatePersistedMetadataFeaturesForMigrations as pn, AttributeSelect as po, loadModelsFrom as pr, MorphToManyRelation as ps, formatRelationAction as pt, buildEnumBlock as q, SimplePaginationMeta as qa, SchemaForeignKeyAction as qc, CastDefinition as qi, CliApp as qn, caseWhen as qo, DatabaseRow as qr, FactoryAttributeResolver as qs, PersistedColumnMappingsState as qt, LoadedRuntimeModule as r, DelegateRows as ra, BinaryExpressionNode as rc, QueryComparisonOperator as ri, TimestampNaming as rl, getPersistedEnumTsType as rn, ExpressionSelectMap as ro, RuntimePathInput as rr, raw as rs, deriveCollectionFieldName as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, DelegateUpdateData as sa, ExpressionBinaryOperator as sc, QueryExpressionCondition as si, readPersistedColumnMappingsState as sn, ArkormModelNameRegistry as so, getRegisteredMigrations as sr, InlineFactory as ss, deriveSingularFieldName as st, URLDriver as t, DelegateOrderBy as ta, MaybePromise as tc, QueryColumnComparisonCondition as ti, TimestampColumnBehavior as tl, getPersistedColumnMap as tn, ChunkCallback as to, RegisteredModel as tr, max as ts, buildUniqueConstraintLine as tt, createPrismaDelegateMap as u, EagerLoadMap as ua, FunctionExpressionNode as uc, QueryGroupCondition as ui, resolveColumnMappingsFilePath as un, AttributeOrderBy as uo, getRegisteredSeeders as ur, SetBasedEagerLoader as us, findModelBlock as ut, ensureArkormConfigLoading as v, PaginationURLDriver as va, BelongsToManyRelationMetadata as vc, QueryJoinType as vi, RelationResolutionException as vn, ModelAttributeValue as vo, registerPaths as vr, HasManyThroughRelation as vs, resolveMigrationClassName as vt, getRuntimeDebugHandler as w, PrismaLikeOrderBy as wa, HasOneThroughRelationMetadata as wc, QueryOrderBy as wi, ArkormErrorContext as wn, ModelEventHandler as wo, SeederCallArgument as wr, RelationTableLoader as ws, supportsDatabaseMigrationExecution as wt, getDefaultStubsPath as x, PrismaDelegateLike as xa, HasManyRelationMetadata as xc, QueryJsonConditionKind as xi, QueryConstraintException as xn, ModelCreateData as xo, resolveRegisteredModel as xr, SingleResultRelation as xs, runPrismaCommand as xt, getActiveTransactionAdapter as y, PaginationURLDriverFactory as ya, BelongsToRelationMetadata as yc, QueryJoinValueConstraint as yi, QueryExecutionException as yn, ModelAttributes as yo, registerSeeders as yr, HasManyRelation as ys, resolvePrismaType as yt, applyAlterTableOperation as z, QuerySchemaSelect as za, MigrationClass as zc, UpdateSpec as zi, MigrateFreshCommand as zn, RelatedModelClass as zo, AdapterModelStructure as zr, JoinSource as zs, markMigrationRun as zt };
|
|
9122
|
+
export { buildPrimaryKeyLine as $, TransactionOptions as $a, SchemaTableCreateOperation as $c, DelegateCreateData as $i, getModel as $n, fn as $o, InsertSpec as $r, FactoryModelConstructor as $s, createEmptyPersistedColumnMappingsState as $t, isQuerySchemaLike as A, PrismaTransactionCallback as Aa, MorphToRelationMetadata as Ac, QueryTimeCondition as Ai, EnumBuilder as An, ModelOrderByInput as Ao, createPrismaDatabaseAdapter as Ar, RelationConstraint as As, computeMigrationChecksum as At, applyCreateTableOperation as B, QuerySchemaSelect as Ba, MigrationClass as Bc, UpdateSpec as Bi, MigrateCommand as Bn, RelatedModelClass as Bo, AdapterQueryOperation as Br, JoinSource as Bs, readAppliedMigrationsState as Bt, getRuntimeClient as C, PrismaFindManyArgsLike as Ca, HasManyThroughRelationMetadata as Cc, QueryNotCondition as Ci, MissingDelegateException as Cn, ModelDeclaredAttributeKey as Co, Seeder as Cr, BelongsToManyRelation as Cs, supportsDatabaseCreation as Ct, getRuntimePrismaClient as D, PrismaLikeSelect as Da, MorphManyRelationMetadata as Dc, QueryScalarComparisonOperator as Di, MIGRATION_BRAND as Dn, ModelEventListener as Do, PrismaDatabaseAdapter as Dr, RelationAggregateInput as Ds, toModelName as Dt, getRuntimePaginationURLDriverFactory as E, PrismaLikeScalarFilter as Ea, ModelMetadata as Ec, QueryRelationCondition as Ei, DB as En, ModelEventHandlerConstructor as Eo, SeederInput as Er, RelationAggregateConstraint as Es, toMigrationFileSlug as Et, PrimaryKeyGenerationPlanner as F, QuerySchemaFindManyArgs as Fa, AppliedMigrationEntry as Fc, RelationLoadSpec as Fi, SeedCommand as Fn, QuerySchemaForModel as Fo, AdapterDatabaseCreationResult as Fr, RelationResultCache as Fs, getLastMigrationRun as Ft, applyMigrationToPrismaSchema as G, RawSelectInput as Ga, SchemaColumn as Gc, ArkormConfig as Gi, InitCommand as Gn, ExpressionBuilder as Go, DatabaseAdapter as Gr, LengthAwarePaginator as Gs, writeAppliedMigrationsState as Gt, applyMigrationRollbackToDatabase as H, QuerySchemaUpdateArgs as Ha, PrimaryKeyGeneration as Hc, AdapterBindableModel as Hi, MakeModelCommand as Hn, AggregateExpression as Ho, AggregateOperation as Hr, RelatedModelFromResult as Hs, removeAppliedMigration as Ht, PRISMA_ENUM_MEMBER_REGEX as I, QuerySchemaInclude as Ia, AppliedMigrationRun as Ic, SelectSpec as Ii, ModelsSyncCommand as In, QuerySchemaForModelInstance as Io, AdapterInspectionRequest as Ir, RelationTableLookupSpec as Is, getLatestAppliedMigrations as It, buildFieldLine as J, SimplePaginationMeta as Ja, SchemaForeignKeyAction as Jc, CastDefinition as Ji, resolveCast as Jn, caseWhen as Jo, DatabaseRows as Jr, FactoryAttributeResolver as Js, PersistedMetadataFeatures as Jt, applyOperationsToPrismaSchema as K, RuntimeClientLike as Ka, SchemaColumnType as Kc, ArkormDebugEvent as Ki, DbCommand as Kn, JsonExpression as Ko, DatabasePrimitive as Kr, Paginator as Ks, writeAppliedMigrationsStateToStore as Kt, PRISMA_ENUM_REGEX as L, QuerySchemaOrderBy as La, AppliedMigrationsState as Lc, SoftDeleteQueryMode as Li, MigrationHistoryCommand as Ln, RegisteredModelClass as Lo, AdapterModelFieldStructure as Lr, EagerLoadQueryForRelationship as Ls, isMigrationApplied as Lt, loadArkormConfig as M, PrismaTransactionContext as Ma, PivotModelStatic as Mc, RelationAggregateSpec as Mi, GeneratedColumnExpression as Mn, ModelRelationshipResult as Mo, createKyselyAdapter as Mr, RelationDefaultValue as Ms, deleteAppliedMigrationsStateFromStore as Mt, resetArkormRuntimeForTests as N, PrismaTransactionOptions as Na, RelationMetadata as Nc, RelationFilterSpec as Ni, resolveGeneratedExpression as Nn, ModelUpdateData as No, AdapterCapabilities as Nr, RelationMetadataProvider as Ns, findAppliedMigration as Nt, getUserConfig as O, PrismaLikeSortOrder as Oa, MorphOneRelationMetadata as Oc, QuerySelectColumn as Oi, Migration as On, ModelEventName as Oo, PrismaDelegateNameMapping as Or, RelationAggregateType as Os, buildMigrationIdentity as Ot, runArkormTransaction as P, QuerySchemaCreateData as Pa, RelationMetadataType as Pc, RelationLoadPlan as Pi, ForeignKeyBuilder as Pn, ModelWhereInput as Po, AdapterCapability as Pr, RelationResult as Ps, getLastBatchMigrations as Pt, buildModelBlock as Q, TransactionContext as Qa, SchemaTableAlterOperation as Qc, ClientResolver as Qi, Arkormx as Qn, expressionBuilder as Qo, InsertManySpec as Qr, FactoryDefinitionAttributes as Qs, applyOperationsToPersistedColumnMappingsState as Qt, PRISMA_MODEL_REGEX as R, QuerySchemaRow as Ra, GenerateMigrationOptions as Rc, SortDirection as Ri, MigrateRollbackCommand as Rn, RegisteredModelInstance as Ro, AdapterModelIntrospectionOptions as Rr, EagerLoadRelations as Rs, markMigrationApplied as Rt, getRuntimeAdapter as S, PrismaDelegateLike as Sa, HasManyRelationMetadata as Sc, QueryLogicalOperator as Si, ModelNotFoundException as Sn, ModelCreateData as So, SEEDER_BRAND as Sr, SingleResultRelation as Ss, stripPrismaSchemaModelsAndEnums as St, getRuntimePaginationCurrentPageResolver as T, PrismaLikeOrderBy as Ta, HasOneThroughRelationMetadata as Tc, QueryRawCondition as Ti, ArkormException as Tn, ModelEventHandler as To, SeederConstructor as Tr, RelationTableLoader as Ts, supportsDatabaseReset as Tt, applyMigrationRollbackToPrismaSchema as U, QuerySchemaUpdateData as Ua, PrismaMigrationWorkflowOptions as Uc, AdapterQueryInspection as Ui, MakeMigrationCommand as Un, CaseExpression as Uo, AggregateSelection as Ur, WhereCallback as Us, resolveMigrationStateFilePath as Ut, applyDropTableOperation as V, QuerySchemaUniqueWhere as Va, MigrationInstanceLike as Vc, UpsertSpec as Vi, MakeSeederCommand as Vn, Model as Vo, AdapterTransactionContext as Vr, RelatedModelForRelationship as Vs, readAppliedMigrationsStateFromStore as Vt, applyMigrationToDatabase as W, QuerySchemaWhere as Wa, PrismaSchemaSyncOptions as Wc, ArkormBootContext as Wi, MakeFactoryCommand as Wn, Expression as Wo, AggregateSpec as Wr, JoinClause as Ws, supportsDatabaseMigrationState as Wt, buildInverseRelationLine as X, TransactionCallback as Xa, SchemaOperation as Xc, CastMap as Xi, AttributeOptions as Xn, col as Xo, DeleteManySpec as Xr, FactoryCallback as Xs, PersistedTableMetadata as Xt, buildIndexLine as Y, SoftDeleteConfig as Ya, SchemaIndex as Yc, CastHandler as Yi, Attribute as Yn, coalesce as Yo, DatabaseValue as Yr, FactoryAttributes as Ys, PersistedPrimaryKeyGeneration as Yt, buildMigrationSource as Z, TransactionCapableClient as Za, SchemaPrimaryKey as Zc, CastType as Zi, Arkorm as Zn, count as Zo, DeleteSpec as Zr, FactoryDefinition as Zs, PersistedTimestampColumn as Zt, emitRuntimeDebugEvent as _, PaginationMeta as _a, DatabaseTableOptions as _c, QueryJoinRawConstraint as _i, ScopeNotDefinedException as _n, DelegateForModelSchema as _o, registerModels as _r, HasOneThroughRelation as _s, resolveEnumName as _t, getRuntimeCompatibilityAdapter as a, DelegateSelect as aa, CaseExpressionBranch as ac, QueryDayCondition as ai, getPersistedTableMetadata as an, GroupByAggregateRow as ao, RuntimePathMap as ar, sum as as, deriveRelationAlias as at, getActiveTransactionClient as b, PaginationURLDriverFactory as ba, BelongsToRelationMetadata as bc, QueryJsonCondition as bi, QueryExecutionExceptionContext as bn, ModelAttributes as bo, resetRuntimeRegistryForTests as br, HasManyRelation as bs, runMigrationWithPrisma as bt, PrismaDelegateMap as c, DelegateUpdateData as ca, ExpressionBinaryOperator as cc, QueryFullTextCondition as ci, rebuildPersistedColumnMappingsState as cn, ArkormModelNameRegistry as co, getRegisteredModels as cr, InlineFactory as cs, escapeRegex as ct, inferDelegateName as d, EagerLoadMap as da, FunctionExpressionNode as dc, QueryJoin as di, resolvePersistedMetadataFeatures as dn, AttributeOrderBy as do, loadFactoriesFrom as dr, SetBasedEagerLoader as ds, formatDefaultValue as dt, DelegateFindManyArgs as ea, FactoryRelationshipResolver as ec, PartitionedSelectSpec as ei, SchemaTableDropOperation as el, deletePersistedColumnMappingsState as en, ModelStatic as eo, RegisteredFactory as er, fromExpressionNode as es, buildRelationLine as et, awaitConfiguredModelsRegistration as f, GetUserConfig as fa, InExpressionNode as fc, QueryJoinBoolean as fi, syncPersistedColumnMappingsFromState as fn, AttributeQuerySchema as fo, loadMigrationsFrom as fr, MorphToRelation as fs, formatEnumDefaultValue as ft, disposeArkormRuntime as g, PaginationCurrentPageResolver as ga, ValueExpressionNode as gc, QueryJoinNullConstraint as gi, UniqueConstraintResolutionException as gn, AttributeWhereInput as go, registerMigrations as gr, MorphManyRelation as gs, pad as gt, defineConfig as h, NamingCase as ha, RawExpressionNode as hc, QueryJoinNestedConstraint as hi, UnsupportedAdapterFeatureException as hn, AttributeUpdateInput as ho, registerFactories as hr, MorphOneRelation as hs, getMigrationPlan as ht, RuntimeModuleLoader as i, DelegateRows as ia, BinaryExpressionNode as ic, QueryCondition as ii, TimestampNaming as il, getPersistedPrimaryKeyGeneration as in, ExpressionSelectMap as io, RuntimePathKey as ir, raw as is, deriveInverseRelationAlias as it, isTransactionCapableClient as j, PrismaTransactionCapableClient as ja, MorphedByManyRelationMetadata as jc, RawQuerySpec as ji, TableBuilder as jn, ModelRelationshipKey as jo, KyselyDatabaseAdapter as jr, RelationDefaultResolver as js, createEmptyAppliedMigrationsState as jt, isDelegateLike as k, PrismaLikeWhereInput as ka, MorphToManyRelationMetadata as kc, QueryTarget as ki, SchemaBuilder as kn, ModelLifecycleState as ko, createPrismaCompatibilityAdapter as kr, RelationColumnLookupSpec as ks, buildMigrationRunId as kt, createPrismaAdapter as l, DelegateWhere as la, ExpressionJsonCast as lc, QueryGroupByItem as li, resetPersistedColumnMappingsCache as ln, ArkormModelRegistry as lo, getRegisteredPaths as lr, ModelFactory as ls, findEnumBlock as lt, configureArkormRuntime as m, ModelTableCase as ma, NullCheckExpressionNode as mc, QueryJoinConstraint as mi, writePersistedColumnMappingsState as mn, AttributeSelect as mo, loadSeedersFrom as mr, MorphToManyRelation as ms, generateMigrationFile as mt, PivotModel as n, DelegateOrderBy as na, MaybePromise as nc, QueryComparisonCondition as ni, TimestampColumnBehavior as nl, getPersistedEnumMap as nn, ChunkCallback as no, RuntimeConstructor as nr, max as ns, createMigrationTimestamp as nt, resolveRuntimeCompatibilityQuerySchema as o, DelegateUniqueWhere as oa, CaseExpressionNode as oc, QueryExistsCondition as oi, getPersistedTimestampColumns as on, GroupByAggregateSpec as oo, getRegisteredFactories as or, val as os, deriveRelationFieldName as ot, bindAdapterToModels as p, ModelQuerySchemaLike as pa, JsonExpressionNode as pc, QueryJoinColumnConstraint as pi, validatePersistedMetadataFeaturesForMigrations as pn, AttributeSchemaDelegate as po, loadModelsFrom as pr, MorphedByManyRelation as ps, formatRelationAction as pt, buildEnumBlock as q, Serializable as qa, SchemaForeignKey as qc, ArkormDebugHandler as qi, CliApp as qn, avg as qo, DatabaseRow as qr, ArkormCollection as qs, PersistedColumnMappingsState as qt, LoadedRuntimeModule as r, DelegateRow as ra, AggregateExpressionNode as rc, QueryComparisonOperator as ri, TimestampNames as rl, getPersistedEnumTsType as rn, EachCallback as ro, RuntimePathInput as rr, min as rs, deriveCollectionFieldName as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, DelegateUpdateArgs as sa, ColumnExpressionNode as sc, QueryExpressionCondition as si, readPersistedColumnMappingsState as sn, QueryBuilder as so, getRegisteredMigrations as sr, where as ss, deriveSingularFieldName as st, URLDriver as t, DelegateInclude as ta, FactoryState as tc, QueryColumnComparisonCondition as ti, SchemaUniqueConstraint as tl, getPersistedColumnMap as tn, RelationshipModelStatic as to, RegisteredModel as tr, json as ts, buildUniqueConstraintLine as tt, createPrismaDelegateMap as u, EagerLoadConstraint as ua, ExpressionNode as uc, QueryGroupCondition as ui, resolveColumnMappingsFilePath as un, AttributeCreateInput as uo, getRegisteredSeeders as ur, defineFactory as us, findModelBlock as ut, ensureArkormConfigLoading as v, PaginationOptions as va, DatabaseTablePersistedMetadataOptions as vc, QueryJoinType as vi, RelationResolutionException as vn, GlobalScope as vo, registerPaths as vr, HasOneRelation as vs, resolveMigrationClassName as vt, getRuntimeDebugHandler as w, PrismaLikeInclude as wa, HasOneRelationMetadata as wc, QueryOrderBy as wi, ArkormErrorContext as wn, ModelEventDispatcher as wo, SeederCallArgument as wr, Relation as ws, supportsDatabaseMigrationExecution as wt, getDefaultStubsPath as x, PrismaClientLike as xa, ColumnMap as xc, QueryJsonConditionKind as xi, QueryConstraintException as xn, ModelAttributesOf as xo, resolveRegisteredModel as xr, BelongsToRelation as xs, runPrismaCommand as xt, getActiveTransactionAdapter as y, PaginationURLDriver as ya, BelongsToManyRelationMetadata as yc, QueryJoinValueConstraint as yi, QueryExecutionException as yn, ModelAttributeValue as yo, registerSeeders as yr, HasManyThroughRelation as ys, resolvePrismaType as yt, applyAlterTableOperation as z, QuerySchemaRows as za, GeneratedMigrationFile as zc, UpdateManySpec as zi, MigrateFreshCommand as zn, RegisteredModelName as zo, AdapterModelStructure as zr, JoinOn as zs, markMigrationRun as zt };
|
package/dist/index.cjs
CHANGED
|
@@ -987,6 +987,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
987
987
|
if (condition.type === "time") return this.buildTimeCondition(target, condition);
|
|
988
988
|
if (condition.type === "day") return this.buildDayCondition(target, condition);
|
|
989
989
|
if (condition.type === "exists") return this.buildExistsCondition(condition);
|
|
990
|
+
if (condition.type === "relation") return this.buildRelationFilterExpression(target, condition.filter);
|
|
990
991
|
if (condition.type === "full-text") return this.buildFullTextCondition(target, condition);
|
|
991
992
|
if (condition.type === "json") return this.buildJsonCondition(target, condition);
|
|
992
993
|
if (condition.type === "expression") return kysely.sql`${this.buildExpression(target, condition.expression)}`;
|
|
@@ -1019,6 +1020,19 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1019
1020
|
buildColumnReference(table, column) {
|
|
1020
1021
|
return kysely.sql`${kysely.sql.table(table)}.${kysely.sql.id(column)}`;
|
|
1021
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Renders the relation's source table, aliasing it when a self-referential
|
|
1025
|
+
* relation would otherwise put the same name on both sides of a correlated
|
|
1026
|
+
* subquery.
|
|
1027
|
+
*
|
|
1028
|
+
* @param sourceTable
|
|
1029
|
+
* @param table
|
|
1030
|
+
* @returns
|
|
1031
|
+
*/
|
|
1032
|
+
buildTableSource(sourceTable, table) {
|
|
1033
|
+
if (sourceTable === table) return kysely.sql`${kysely.sql.table(table)}`;
|
|
1034
|
+
return kysely.sql`${kysely.sql.table(sourceTable)} as ${kysely.sql.table(table)}`;
|
|
1035
|
+
}
|
|
1022
1036
|
buildRelatedTargetFromRelation(target, relation) {
|
|
1023
1037
|
const metadata = target.model?.getRelationMetadata(relation);
|
|
1024
1038
|
if (!metadata) throw new require_relationship.UnsupportedAdapterFeatureException(`Relation [${relation}] could not be resolved for SQL-backed relation execution.`, {
|
|
@@ -1026,7 +1040,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1026
1040
|
model: target.modelName,
|
|
1027
1041
|
relation
|
|
1028
1042
|
});
|
|
1029
|
-
if (metadata.type !== "hasMany" && metadata.type !== "hasOne" && metadata.type !== "belongsTo" && metadata.type !== "belongsToMany" && metadata.type !== "hasOneThrough" && metadata.type !== "hasManyThrough") throw new require_relationship.UnsupportedAdapterFeatureException(`Relation [${relation}] is not supported for SQL-backed relation execution by the Kysely adapter yet.`, {
|
|
1043
|
+
if (metadata.type !== "hasMany" && metadata.type !== "hasOne" && metadata.type !== "belongsTo" && metadata.type !== "belongsToMany" && metadata.type !== "hasOneThrough" && metadata.type !== "hasManyThrough" && metadata.type !== "morphOne" && metadata.type !== "morphMany") throw new require_relationship.UnsupportedAdapterFeatureException(`Relation [${relation}] is not supported for SQL-backed relation execution by the Kysely adapter yet.`, {
|
|
1030
1044
|
operation: "adapter.relation.metadata",
|
|
1031
1045
|
model: target.modelName,
|
|
1032
1046
|
relation,
|
|
@@ -1036,12 +1050,15 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1036
1050
|
}
|
|
1037
1051
|
});
|
|
1038
1052
|
const relatedMetadata = metadata.relatedModel.getModelMetadata();
|
|
1053
|
+
const sourceTable = this.resolveMappedTable(relatedMetadata.table);
|
|
1054
|
+
const table = sourceTable === this.resolveTable(target) ? `${sourceTable}_arkorm_self` : relatedMetadata.table;
|
|
1039
1055
|
return {
|
|
1040
1056
|
metadata,
|
|
1057
|
+
sourceTable,
|
|
1041
1058
|
relatedTarget: {
|
|
1042
1059
|
model: metadata.relatedModel,
|
|
1043
1060
|
modelName: metadata.relatedModel.name,
|
|
1044
|
-
table
|
|
1061
|
+
table,
|
|
1045
1062
|
primaryKey: relatedMetadata.primaryKey,
|
|
1046
1063
|
columns: relatedMetadata.columns,
|
|
1047
1064
|
softDelete: relatedMetadata.softDelete
|
|
@@ -1051,12 +1068,12 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1051
1068
|
resolveMappedTable(table) {
|
|
1052
1069
|
return this.mapping[table] ?? table;
|
|
1053
1070
|
}
|
|
1054
|
-
buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata) {
|
|
1071
|
+
buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata, sourceTable) {
|
|
1055
1072
|
const outerTable = this.resolveTable(outerTarget);
|
|
1056
1073
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1057
1074
|
const pivotTable = this.resolveMappedTable(metadata.throughTable);
|
|
1058
1075
|
return {
|
|
1059
|
-
from: kysely.sql`${
|
|
1076
|
+
from: kysely.sql`${this.buildTableSource(sourceTable, relatedTable)} inner join ${kysely.sql.table(pivotTable)} on ${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.relatedKey))} = ${this.buildColumnReference(pivotTable, metadata.relatedPivotKey)}`,
|
|
1060
1077
|
condition: kysely.sql`
|
|
1061
1078
|
${this.buildColumnReference(pivotTable, metadata.foreignPivotKey)}
|
|
1062
1079
|
=
|
|
@@ -1064,12 +1081,12 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1064
1081
|
`
|
|
1065
1082
|
};
|
|
1066
1083
|
}
|
|
1067
|
-
buildThroughJoinSource(outerTarget, relatedTarget, metadata) {
|
|
1084
|
+
buildThroughJoinSource(outerTarget, relatedTarget, metadata, sourceTable) {
|
|
1068
1085
|
const outerTable = this.resolveTable(outerTarget);
|
|
1069
1086
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1070
1087
|
const throughTable = this.resolveMappedTable(metadata.throughTable);
|
|
1071
1088
|
return {
|
|
1072
|
-
from: kysely.sql`${
|
|
1089
|
+
from: kysely.sql`${this.buildTableSource(sourceTable, relatedTable)} inner join ${kysely.sql.table(throughTable)} on ${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.secondKey))} = ${this.buildColumnReference(throughTable, metadata.secondLocalKey)}`,
|
|
1073
1090
|
condition: kysely.sql`
|
|
1074
1091
|
${this.buildColumnReference(throughTable, metadata.firstKey)}
|
|
1075
1092
|
=
|
|
@@ -1077,12 +1094,35 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1077
1094
|
`
|
|
1078
1095
|
};
|
|
1079
1096
|
}
|
|
1097
|
+
/**
|
|
1098
|
+
* The value a polymorphic child stores in its type column for this parent: the
|
|
1099
|
+
* parent model's class name, matching what the relationship writes on create
|
|
1100
|
+
* and what the set-based eager loader groups parents by.
|
|
1101
|
+
*
|
|
1102
|
+
* @param target
|
|
1103
|
+
* @param relation
|
|
1104
|
+
* @returns
|
|
1105
|
+
*/
|
|
1106
|
+
resolveMorphType(target, relation) {
|
|
1107
|
+
const morphType = target.modelName ?? target.model?.name;
|
|
1108
|
+
if (!morphType) throw new require_relationship.UnsupportedAdapterFeatureException(`Relation [${relation}] needs a named parent model to resolve its polymorphic type.`, {
|
|
1109
|
+
operation: "adapter.relation.metadata",
|
|
1110
|
+
model: target.modelName,
|
|
1111
|
+
relation,
|
|
1112
|
+
meta: {
|
|
1113
|
+
feature: "relationFilters",
|
|
1114
|
+
relationType: "morph"
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
return morphType;
|
|
1118
|
+
}
|
|
1080
1119
|
buildRelatedJoinCondition(outerTarget, relation) {
|
|
1081
|
-
const { metadata, relatedTarget } = this.buildRelatedTargetFromRelation(outerTarget, relation);
|
|
1120
|
+
const { metadata, relatedTarget, sourceTable } = this.buildRelatedTargetFromRelation(outerTarget, relation);
|
|
1082
1121
|
const outerTable = this.resolveTable(outerTarget);
|
|
1083
1122
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1123
|
+
const relatedFrom = this.buildTableSource(sourceTable, relatedTable);
|
|
1084
1124
|
if (metadata.type === "belongsToMany") {
|
|
1085
|
-
const joinSource = this.buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata);
|
|
1125
|
+
const joinSource = this.buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata, sourceTable);
|
|
1086
1126
|
return {
|
|
1087
1127
|
relatedTarget,
|
|
1088
1128
|
from: joinSource.from,
|
|
@@ -1090,7 +1130,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1090
1130
|
};
|
|
1091
1131
|
}
|
|
1092
1132
|
if (metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough") {
|
|
1093
|
-
const joinSource = this.buildThroughJoinSource(outerTarget, relatedTarget, metadata);
|
|
1133
|
+
const joinSource = this.buildThroughJoinSource(outerTarget, relatedTarget, metadata, sourceTable);
|
|
1094
1134
|
return {
|
|
1095
1135
|
relatedTarget,
|
|
1096
1136
|
from: joinSource.from,
|
|
@@ -1099,16 +1139,29 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1099
1139
|
}
|
|
1100
1140
|
if (metadata.type === "hasMany" || metadata.type === "hasOne") return {
|
|
1101
1141
|
relatedTarget,
|
|
1102
|
-
from:
|
|
1142
|
+
from: relatedFrom,
|
|
1103
1143
|
condition: kysely.sql`
|
|
1104
1144
|
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.foreignKey))}
|
|
1105
1145
|
=
|
|
1106
1146
|
${this.buildColumnReference(outerTable, this.mapColumn(outerTarget, metadata.localKey))}
|
|
1107
1147
|
`
|
|
1108
1148
|
};
|
|
1149
|
+
if (metadata.type === "morphOne" || metadata.type === "morphMany") return {
|
|
1150
|
+
relatedTarget,
|
|
1151
|
+
from: relatedFrom,
|
|
1152
|
+
condition: kysely.sql`
|
|
1153
|
+
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.morphIdColumn))}
|
|
1154
|
+
=
|
|
1155
|
+
${this.buildColumnReference(outerTable, this.mapColumn(outerTarget, metadata.localKey))}
|
|
1156
|
+
and
|
|
1157
|
+
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.morphTypeColumn))}
|
|
1158
|
+
=
|
|
1159
|
+
${this.resolveMorphType(outerTarget, relation)}
|
|
1160
|
+
`
|
|
1161
|
+
};
|
|
1109
1162
|
return {
|
|
1110
1163
|
relatedTarget,
|
|
1111
|
-
from:
|
|
1164
|
+
from: relatedFrom,
|
|
1112
1165
|
condition: kysely.sql`
|
|
1113
1166
|
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.ownerKey))}
|
|
1114
1167
|
=
|
|
@@ -5135,6 +5188,10 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5135
5188
|
/**
|
|
5136
5189
|
* Appends a pre-built structured condition, first flushing any Prisma-like
|
|
5137
5190
|
* legacy where into the structured representation so the two combine correctly.
|
|
5191
|
+
*
|
|
5192
|
+
* @param boolean
|
|
5193
|
+
* @param condition
|
|
5194
|
+
* @returns
|
|
5138
5195
|
*/
|
|
5139
5196
|
appendStructuredWhere(boolean, condition) {
|
|
5140
5197
|
if (this.legacyWhere) {
|
|
@@ -5149,6 +5206,10 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5149
5206
|
* Appends a boolean {@link Expression} as a where predicate. When the query is
|
|
5150
5207
|
* using the Prisma-like legacy where representation, the expression is merged in
|
|
5151
5208
|
* as a structured condition alongside it.
|
|
5209
|
+
*
|
|
5210
|
+
* @param boolean
|
|
5211
|
+
* @param expression
|
|
5212
|
+
* @returns
|
|
5152
5213
|
*/
|
|
5153
5214
|
appendExpressionCondition(boolean, expression) {
|
|
5154
5215
|
const condition = {
|
|
@@ -5159,11 +5220,15 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5159
5220
|
}
|
|
5160
5221
|
/**
|
|
5161
5222
|
* Resolve a callback into a parenthesized group condition and append it.
|
|
5223
|
+
*
|
|
5224
|
+
* @param boolean
|
|
5225
|
+
* @param callback
|
|
5226
|
+
* @returns
|
|
5162
5227
|
*/
|
|
5163
5228
|
appendNestedWhere(boolean, callback) {
|
|
5164
5229
|
const nested = new QueryBuilder(this.model, this.adapter);
|
|
5165
5230
|
callback(nested);
|
|
5166
|
-
const condition = nested.getNestedWhereCondition();
|
|
5231
|
+
const condition = nested.withRelationConditions(nested.getNestedWhereCondition(), "query.where");
|
|
5167
5232
|
if (!condition) return this;
|
|
5168
5233
|
const grouped = condition.type === "group" ? condition : {
|
|
5169
5234
|
type: "group",
|
|
@@ -5174,6 +5239,40 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5174
5239
|
return this;
|
|
5175
5240
|
}
|
|
5176
5241
|
/**
|
|
5242
|
+
* Fold this builder's relation filters into `condition`, in the order and
|
|
5243
|
+
* with the and/or they were added with, so they can be carried inside a
|
|
5244
|
+
* where group or another relation's constraint.
|
|
5245
|
+
*
|
|
5246
|
+
* @param condition
|
|
5247
|
+
* @param operation Names the caller in the exception raised when a filter
|
|
5248
|
+
* cannot be expressed as a condition.
|
|
5249
|
+
* @returns
|
|
5250
|
+
*/
|
|
5251
|
+
withRelationConditions(condition, operation) {
|
|
5252
|
+
if (!this.hasRelationFilters()) return condition;
|
|
5253
|
+
const specs = this.tryBuildRelationFilterSpecs();
|
|
5254
|
+
if (!specs) throw new require_relationship.UnsupportedAdapterFeatureException("Relation filters inside a where group or relation constraint could not be compiled into conditions.", {
|
|
5255
|
+
operation,
|
|
5256
|
+
model: this.model.name,
|
|
5257
|
+
meta: { feature: "relationFilters" }
|
|
5258
|
+
});
|
|
5259
|
+
return specs.reduce((combined, spec) => {
|
|
5260
|
+
const relation = {
|
|
5261
|
+
type: "relation",
|
|
5262
|
+
filter: {
|
|
5263
|
+
...spec,
|
|
5264
|
+
boolean: void 0
|
|
5265
|
+
}
|
|
5266
|
+
};
|
|
5267
|
+
if (!combined) return relation;
|
|
5268
|
+
return {
|
|
5269
|
+
type: "group",
|
|
5270
|
+
operator: spec.boolean === "OR" ? "or" : "and",
|
|
5271
|
+
conditions: [combined, relation]
|
|
5272
|
+
};
|
|
5273
|
+
}, condition);
|
|
5274
|
+
}
|
|
5275
|
+
/**
|
|
5177
5276
|
* Returns the user-authored where condition for nesting, excluding any
|
|
5178
5277
|
* soft-delete predicate (the parent query owns that).
|
|
5179
5278
|
*/
|
|
@@ -7296,8 +7395,8 @@ var QueryBuilder = class QueryBuilder {
|
|
|
7296
7395
|
return this.insertOrIgnore(rows);
|
|
7297
7396
|
}
|
|
7298
7397
|
/**
|
|
7299
|
-
* Updates
|
|
7300
|
-
*
|
|
7398
|
+
* Updates the first record matching the current query constraints and
|
|
7399
|
+
* returns it as a model. Use {@link updateFrom} to update every match.
|
|
7301
7400
|
*
|
|
7302
7401
|
* @param data
|
|
7303
7402
|
* @returns
|
|
@@ -7320,7 +7419,8 @@ var QueryBuilder = class QueryBuilder {
|
|
|
7320
7419
|
return this.model.hydrate(updated);
|
|
7321
7420
|
}
|
|
7322
7421
|
/**
|
|
7323
|
-
* Update
|
|
7422
|
+
* Update every record matching the current query constraints and return
|
|
7423
|
+
* the number of affected rows.
|
|
7324
7424
|
*
|
|
7325
7425
|
* @param data
|
|
7326
7426
|
* @returns
|
|
@@ -8801,12 +8901,15 @@ var QueryBuilder = class QueryBuilder {
|
|
|
8801
8901
|
return this.tryBuildRelationQueryConstraintWhere(relatedQuery);
|
|
8802
8902
|
}
|
|
8803
8903
|
tryBuildRelationQueryConstraintWhere(relatedQuery) {
|
|
8804
|
-
if (relatedQuery.
|
|
8805
|
-
|
|
8904
|
+
if (relatedQuery.hasRelationAggregates() || relatedQuery.queryRelationLoads || relatedQuery.querySelect || relatedQuery.queryOrderBy || relatedQuery.queryDistinct || relatedQuery.queryGroupBy || relatedQuery.offsetValue !== void 0 || relatedQuery.limitValue !== void 0 || relatedQuery.randomOrderEnabled) return null;
|
|
8905
|
+
const where = relatedQuery.buildQueryWhereCondition(false);
|
|
8906
|
+
if (where === null || !relatedQuery.hasRelationFilters()) return where;
|
|
8907
|
+
if (!relatedQuery.tryBuildRelationFilterSpecs()) return null;
|
|
8908
|
+
return relatedQuery.withRelationConditions(where, "query.relations");
|
|
8806
8909
|
}
|
|
8807
8910
|
isSqlRelationFeatureMetadata(metadata) {
|
|
8808
8911
|
if (!metadata) return false;
|
|
8809
|
-
return metadata.type === "hasMany" || metadata.type === "hasOne" || metadata.type === "belongsTo" || metadata.type === "belongsToMany" || metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough";
|
|
8912
|
+
return metadata.type === "hasMany" || metadata.type === "hasOne" || metadata.type === "belongsTo" || metadata.type === "belongsToMany" || metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough" || metadata.type === "morphOne" || metadata.type === "morphMany";
|
|
8810
8913
|
}
|
|
8811
8914
|
async filterModelsByRelationConstraints(models, relationCache, baseIds) {
|
|
8812
8915
|
return (await Promise.all(models.map(async (model) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildPrimaryKeyLine, $a as ModelStatic, $c as SchemaTableDropOperation, $i as DelegateFindManyArgs, $n as getModel, $o as fromExpressionNode, $r as InsertSpec, $s as FactoryRelationshipResolver, $t as createEmptyPersistedColumnMappingsState, A as isQuerySchemaLike, Aa as PrismaTransactionCapableClient, Ac as MorphedByManyRelationMetadata, Ai as RawQuerySpec, An as EnumBuilder, Ao as ModelRelationshipKey, Ar as createPrismaDatabaseAdapter, As as RelationDefaultResolver, At as computeMigrationChecksum, B as applyCreateTableOperation, Ba as QuerySchemaUniqueWhere, Bc as MigrationInstanceLike, Bi as UpsertSpec, Bn as MigrateCommand, Bo as Model, Br as AdapterQueryOperation, Bs as RelatedModelForRelationship, Bt as readAppliedMigrationsState, C as getRuntimeClient, Ca as PrismaLikeInclude, Cc as HasOneRelationMetadata, Ci as QueryNotCondition, Cn as MissingDelegateException, Co as ModelEventDispatcher, Cr as Seeder, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeSortOrder, Dc as MorphOneRelationMetadata, Di as QuerySelectColumn, Dn as MIGRATION_BRAND, Do as ModelEventName, Dr as PrismaDatabaseAdapter, Ds as RelationAggregateType, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeSelect, Ec as MorphManyRelationMetadata, Ei as QueryScalarComparisonOperator, En as DB, Eo as ModelEventListener, Er as SeederInput, Es as RelationAggregateInput, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaInclude, Fc as AppliedMigrationRun, Fi as SelectSpec, Fn as SeedCommand, Fo as QuerySchemaForModelInstance, Fr as AdapterDatabaseCreationResult, Fs as RelationTableLookupSpec, Ft as getLastMigrationRun, G as applyMigrationToPrismaSchema, Ga as RuntimeClientLike, Gc as SchemaColumnType, Gi as ArkormDebugEvent, Gn as InitCommand, Go as JsonExpression, Gr as DatabaseAdapter, Gs as Paginator, Gt as writeAppliedMigrationsState, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUpdateData, Hc as PrismaMigrationWorkflowOptions, Hi as AdapterQueryInspection, Hn as MakeModelCommand, Ho as CaseExpression, Hr as AggregateOperation, Hs as WhereCallback, Ht as removeAppliedMigration, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaOrderBy, Ic as AppliedMigrationsState, Ii as SoftDeleteQueryMode, In as ModelsSyncCommand, Io as RegisteredModelClass, Ir as AdapterInspectionRequest, Is as EagerLoadQueryForRelationship, It as getLatestAppliedMigrations, J as buildFieldLine, Ja as SoftDeleteConfig, Jc as SchemaIndex, Ji as CastHandler, Jn as resolveCast, Jo as coalesce, Jr as DatabaseRows, Js as FactoryAttributes, Jt as PersistedMetadataFeatures, K as applyOperationsToPrismaSchema, Ka as Serializable, Kc as SchemaForeignKey, Ki as ArkormDebugHandler, Kn as DbCommand, Ko as avg, Kr as DatabasePrimitive, Ks as ArkormCollection, Kt as writeAppliedMigrationsStateToStore, L as PRISMA_ENUM_REGEX, La as QuerySchemaRow, Lc as GenerateMigrationOptions, Li as SortDirection, Ln as MigrationHistoryCommand, Lo as RegisteredModelInstance, Lr as AdapterModelFieldStructure, Ls as EagerLoadRelations, Lt as isMigrationApplied, M as loadArkormConfig, Ma as PrismaTransactionOptions, Mc as RelationMetadata, Mi as RelationFilterSpec, Mn as GeneratedColumnExpression, Mo as ModelUpdateData, Mr as createKyselyAdapter, Ms as RelationMetadataProvider, Mt as deleteAppliedMigrationsStateFromStore, N as resetArkormRuntimeForTests, Na as QuerySchemaCreateData, Nc as RelationMetadataType, Ni as RelationLoadPlan, Nn as resolveGeneratedExpression, No as ModelWhereInput, Nr as AdapterCapabilities, Ns as RelationResult, Nt as findAppliedMigration, O as getUserConfig, Oa as PrismaLikeWhereInput, Oc as MorphToManyRelationMetadata, Oi as QueryTarget, On as Migration, Oo as ModelLifecycleState, Or as PrismaDelegateNameMapping, Os as RelationColumnLookupSpec, Ot as buildMigrationIdentity, P as runArkormTransaction, Pa as QuerySchemaFindManyArgs, Pc as AppliedMigrationEntry, Pi as RelationLoadSpec, Pn as ForeignKeyBuilder, Po as QuerySchemaForModel, Pr as AdapterCapability, Ps as RelationResultCache, Pt as getLastBatchMigrations, Q as buildModelBlock, Qa as TransactionOptions, Qc as SchemaTableCreateOperation, Qi as DelegateCreateData, Qn as Arkormx, Qo as fn, Qr as InsertManySpec, Qs as FactoryModelConstructor, Qt as applyOperationsToPersistedColumnMappingsState, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaRows, Rc as GeneratedMigrationFile, Ri as UpdateManySpec, Rn as MigrateRollbackCommand, Ro as RegisteredModelName, Rr as AdapterModelIntrospectionOptions, Rs as JoinOn, Rt as markMigrationApplied, S as getRuntimeAdapter, Sa as PrismaFindManyArgsLike, Sc as HasManyThroughRelationMetadata, Si as QueryLogicalOperator, Sn as ModelNotFoundException, So as ModelDeclaredAttributeKey, Sr as SEEDER_BRAND, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeScalarFilter, Tc as ModelMetadata, Ti as QueryRawCondition, Tn as ArkormException, To as ModelEventHandlerConstructor, Tr as SeederConstructor, Ts as RelationAggregateConstraint, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaWhere, Uc as PrismaSchemaSyncOptions, Ui as ArkormBootContext, Un as MakeMigrationCommand, Uo as Expression, Ur as AggregateSelection, Us as JoinClause, Ut as resolveMigrationStateFilePath, V as applyDropTableOperation, Va as QuerySchemaUpdateArgs, Vc as PrimaryKeyGeneration, Vi as AdapterBindableModel, Vn as MakeSeederCommand, Vo as AggregateExpression, Vr as AdapterTransactionContext, Vs as RelatedModelFromResult, Vt as readAppliedMigrationsStateFromStore, W as applyMigrationToDatabase, Wa as RawSelectInput, Wc as SchemaColumn, Wi as ArkormConfig, Wn as MakeFactoryCommand, Wo as ExpressionBuilder, Wr as AggregateSpec, Ws as LengthAwarePaginator, Wt as supportsDatabaseMigrationState, X as buildInverseRelationLine, Xa as TransactionCapableClient, Xc as SchemaPrimaryKey, Xi as CastType, Xn as AttributeOptions, Xo as count, Xr as DeleteManySpec, Xs as FactoryDefinition, Xt as PersistedTableMetadata, Y as buildIndexLine, Ya as TransactionCallback, Yc as SchemaOperation, Yi as CastMap, Yn as Attribute, Yo as col, Yr as DatabaseValue, Ys as FactoryCallback, Yt as PersistedPrimaryKeyGeneration, Z as buildMigrationSource, Za as TransactionContext, Zc as SchemaTableAlterOperation, Zi as ClientResolver, Zn as Arkorm, Zo as expressionBuilder, Zr as DeleteSpec, Zs as FactoryDefinitionAttributes, Zt as PersistedTimestampColumn, _ as emitRuntimeDebugEvent, _a as PaginationOptions, _c as DatabaseTablePersistedMetadataOptions, _i as QueryJoinRawConstraint, _n as ScopeNotDefinedException, _o as GlobalScope, _r as registerModels, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateUniqueWhere, ac as CaseExpressionNode, ai as QueryDayCondition, an as getPersistedTableMetadata, ao as GroupByAggregateSpec, ar as RuntimePathMap, as as val, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PrismaClientLike, bc as ColumnMap, bi as QueryJsonCondition, bn as QueryExecutionExceptionContext, bo as ModelAttributesOf, br as resetRuntimeRegistryForTests, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateWhere, cc as ExpressionJsonCast, ci as QueryFullTextCondition, cn as rebuildPersistedColumnMappingsState, co as ArkormModelRegistry, cr as getRegisteredModels, cs as ModelFactory, ct as escapeRegex, d as inferDelegateName, da as GetUserConfig, dc as InExpressionNode, di as QueryJoin, dn as resolvePersistedMetadataFeatures, do as AttributeQuerySchema, dr as loadFactoriesFrom, dt as formatDefaultValue, ea as DelegateInclude, ec as FactoryState, ei as PartitionedSelectSpec, el as SchemaUniqueConstraint, en as deletePersistedColumnMappingsState, eo as RelationshipModelStatic, er as RegisteredFactory, es as json, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as ModelQuerySchemaLike, fc as JsonExpressionNode, fi as QueryJoinBoolean, fn as syncPersistedColumnMappingsFromState, fo as AttributeSchemaDelegate, fr as loadMigrationsFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationMeta, gc as DatabaseTableOptions, gi as QueryJoinNullConstraint, gn as UniqueConstraintResolutionException, go as DelegateForModelSchema, gr as registerMigrations, gt as pad, h as defineConfig, ha as PaginationCurrentPageResolver, hc as ValueExpressionNode, hi as QueryJoinNestedConstraint, hn as UnsupportedAdapterFeatureException, ho as AttributeWhereInput, hr as registerFactories, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateSelect, ic as CaseExpressionBranch, ii as QueryCondition, in as getPersistedPrimaryKeyGeneration, io as GroupByAggregateRow, ir as RuntimePathKey, is as sum, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionContext, jc as PivotModelStatic, ji as RelationAggregateSpec, jn as TableBuilder, jo as ModelRelationshipResult, jr as KyselyDatabaseAdapter, js as RelationDefaultValue, jt as createEmptyAppliedMigrationsState, k as isDelegateLike, ka as PrismaTransactionCallback, kc as MorphToRelationMetadata, ki as QueryTimeCondition, kn as SchemaBuilder, ko as ModelOrderByInput, kr as createPrismaCompatibilityAdapter, ks as RelationConstraint, kt as buildMigrationRunId, l as createPrismaAdapter, la as EagerLoadConstraint, lc as ExpressionNode, li as QueryGroupByItem, ln as resetPersistedColumnMappingsCache, lo as AttributeCreateInput, lr as getRegisteredPaths, ls as defineFactory, lt as findEnumBlock, m as configureArkormRuntime, ma as NamingCase, mc as RawExpressionNode, mi as QueryJoinConstraint, mn as writePersistedColumnMappingsState, mo as AttributeUpdateInput, mr as loadSeedersFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateRow, nc as AggregateExpressionNode, ni as QueryComparisonCondition, nl as TimestampNames, nn as getPersistedEnumMap, no as EachCallback, nr as RuntimeConstructor, ns as min, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateUpdateArgs, oc as ColumnExpressionNode, oi as QueryExistsCondition, on as getPersistedTimestampColumns, oo as QueryBuilder, or as getRegisteredFactories, os as where, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as ModelTableCase, pc as NullCheckExpressionNode, pi as QueryJoinColumnConstraint, pn as validatePersistedMetadataFeaturesForMigrations, po as AttributeSelect, pr as loadModelsFrom, pt as formatRelationAction, q as buildEnumBlock, qa as SimplePaginationMeta, qc as SchemaForeignKeyAction, qi as CastDefinition, qn as CliApp, qo as caseWhen, qr as DatabaseRow, qs as FactoryAttributeResolver, qt as PersistedColumnMappingsState, r as LoadedRuntimeModule, ra as DelegateRows, rc as BinaryExpressionNode, ri as QueryComparisonOperator, rl as TimestampNaming, rn as getPersistedEnumTsType, ro as ExpressionSelectMap, rr as RuntimePathInput, rs as raw, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUpdateData, sc as ExpressionBinaryOperator, si as QueryExpressionCondition, sn as readPersistedColumnMappingsState, so as ArkormModelNameRegistry, sr as getRegisteredMigrations, ss as InlineFactory, st as deriveSingularFieldName, t as URLDriver, ta as DelegateOrderBy, tc as MaybePromise, ti as QueryColumnComparisonCondition, tl as TimestampColumnBehavior, tn as getPersistedColumnMap, to as ChunkCallback, tr as RegisteredModel, ts as max, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as EagerLoadMap, uc as FunctionExpressionNode, ui as QueryGroupCondition, un as resolveColumnMappingsFilePath, uo as AttributeOrderBy, ur as getRegisteredSeeders, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationURLDriver, vc as BelongsToManyRelationMetadata, vi as QueryJoinType, vn as RelationResolutionException, vo as ModelAttributeValue, vr as registerPaths, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeOrderBy, wc as HasOneThroughRelationMetadata, wi as QueryOrderBy, wn as ArkormErrorContext, wo as ModelEventHandler, wr as SeederCallArgument, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaDelegateLike, xc as HasManyRelationMetadata, xi as QueryJsonConditionKind, xn as QueryConstraintException, xo as ModelCreateData, xr as resolveRegisteredModel, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationURLDriverFactory, yc as BelongsToRelationMetadata, yi as QueryJoinValueConstraint, yn as QueryExecutionException, yo as ModelAttributes, yr as registerSeeders, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaSelect, zc as MigrationClass, zi as UpdateSpec, zn as MigrateFreshCommand, zo as RelatedModelClass, zr as AdapterModelStructure, zs as JoinSource, zt as markMigrationRun } from "./index-CDSTYl6q.cjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, ArkormModelNameRegistry, ArkormModelRegistry, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, 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, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RegisteredModelClass, RegisteredModelInstance, RegisteredModelName, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getModel, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRegisteredModel, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
|
1
|
+
import { $ as buildPrimaryKeyLine, $a as TransactionOptions, $c as SchemaTableCreateOperation, $i as DelegateCreateData, $n as getModel, $o as fn, $r as InsertSpec, $s as FactoryModelConstructor, $t as createEmptyPersistedColumnMappingsState, A as isQuerySchemaLike, Aa as PrismaTransactionCallback, Ac as MorphToRelationMetadata, Ai as QueryTimeCondition, An as EnumBuilder, Ao as ModelOrderByInput, Ar as createPrismaDatabaseAdapter, As as RelationConstraint, At as computeMigrationChecksum, B as applyCreateTableOperation, Ba as QuerySchemaSelect, Bc as MigrationClass, Bi as UpdateSpec, Bn as MigrateCommand, Bo as RelatedModelClass, Br as AdapterQueryOperation, Bs as JoinSource, Bt as readAppliedMigrationsState, C as getRuntimeClient, Ca as PrismaFindManyArgsLike, Cc as HasManyThroughRelationMetadata, Ci as QueryNotCondition, Cn as MissingDelegateException, Co as ModelDeclaredAttributeKey, Cr as Seeder, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeSelect, Dc as MorphManyRelationMetadata, Di as QueryScalarComparisonOperator, Dn as MIGRATION_BRAND, Do as ModelEventListener, Dr as PrismaDatabaseAdapter, Ds as RelationAggregateInput, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeScalarFilter, Ec as ModelMetadata, Ei as QueryRelationCondition, En as DB, Eo as ModelEventHandlerConstructor, Er as SeederInput, Es as RelationAggregateConstraint, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaFindManyArgs, Fc as AppliedMigrationEntry, Fi as RelationLoadSpec, Fn as SeedCommand, Fo as QuerySchemaForModel, Fr as AdapterDatabaseCreationResult, Fs as RelationResultCache, Ft as getLastMigrationRun, G as applyMigrationToPrismaSchema, Ga as RawSelectInput, Gc as SchemaColumn, Gi as ArkormConfig, Gn as InitCommand, Go as ExpressionBuilder, Gr as DatabaseAdapter, Gs as LengthAwarePaginator, Gt as writeAppliedMigrationsState, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUpdateArgs, Hc as PrimaryKeyGeneration, Hi as AdapterBindableModel, Hn as MakeModelCommand, Ho as AggregateExpression, Hr as AggregateOperation, Hs as RelatedModelFromResult, Ht as removeAppliedMigration, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaInclude, Ic as AppliedMigrationRun, Ii as SelectSpec, In as ModelsSyncCommand, Io as QuerySchemaForModelInstance, Ir as AdapterInspectionRequest, Is as RelationTableLookupSpec, It as getLatestAppliedMigrations, J as buildFieldLine, Ja as SimplePaginationMeta, Jc as SchemaForeignKeyAction, Ji as CastDefinition, Jn as resolveCast, Jo as caseWhen, Jr as DatabaseRows, Js as FactoryAttributeResolver, Jt as PersistedMetadataFeatures, K as applyOperationsToPrismaSchema, Ka as RuntimeClientLike, Kc as SchemaColumnType, Ki as ArkormDebugEvent, Kn as DbCommand, Ko as JsonExpression, Kr as DatabasePrimitive, Ks as Paginator, Kt as writeAppliedMigrationsStateToStore, L as PRISMA_ENUM_REGEX, La as QuerySchemaOrderBy, Lc as AppliedMigrationsState, Li as SoftDeleteQueryMode, Ln as MigrationHistoryCommand, Lo as RegisteredModelClass, Lr as AdapterModelFieldStructure, Ls as EagerLoadQueryForRelationship, Lt as isMigrationApplied, M as loadArkormConfig, Ma as PrismaTransactionContext, Mc as PivotModelStatic, Mi as RelationAggregateSpec, Mn as GeneratedColumnExpression, Mo as ModelRelationshipResult, Mr as createKyselyAdapter, Ms as RelationDefaultValue, Mt as deleteAppliedMigrationsStateFromStore, N as resetArkormRuntimeForTests, Na as PrismaTransactionOptions, Nc as RelationMetadata, Ni as RelationFilterSpec, Nn as resolveGeneratedExpression, No as ModelUpdateData, Nr as AdapterCapabilities, Ns as RelationMetadataProvider, Nt as findAppliedMigration, O as getUserConfig, Oa as PrismaLikeSortOrder, Oc as MorphOneRelationMetadata, Oi as QuerySelectColumn, On as Migration, Oo as ModelEventName, Or as PrismaDelegateNameMapping, Os as RelationAggregateType, Ot as buildMigrationIdentity, P as runArkormTransaction, Pa as QuerySchemaCreateData, Pc as RelationMetadataType, Pi as RelationLoadPlan, Pn as ForeignKeyBuilder, Po as ModelWhereInput, Pr as AdapterCapability, Ps as RelationResult, Pt as getLastBatchMigrations, Q as buildModelBlock, Qa as TransactionContext, Qc as SchemaTableAlterOperation, Qi as ClientResolver, Qn as Arkormx, Qo as expressionBuilder, Qr as InsertManySpec, Qs as FactoryDefinitionAttributes, Qt as applyOperationsToPersistedColumnMappingsState, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaRow, Rc as GenerateMigrationOptions, Ri as SortDirection, Rn as MigrateRollbackCommand, Ro as RegisteredModelInstance, Rr as AdapterModelIntrospectionOptions, Rs as EagerLoadRelations, Rt as markMigrationApplied, S as getRuntimeAdapter, Sa as PrismaDelegateLike, Sc as HasManyRelationMetadata, Si as QueryLogicalOperator, Sn as ModelNotFoundException, So as ModelCreateData, Sr as SEEDER_BRAND, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeOrderBy, Tc as HasOneThroughRelationMetadata, Ti as QueryRawCondition, Tn as ArkormException, To as ModelEventHandler, Tr as SeederConstructor, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaUpdateData, Uc as PrismaMigrationWorkflowOptions, Ui as AdapterQueryInspection, Un as MakeMigrationCommand, Uo as CaseExpression, Ur as AggregateSelection, Us as WhereCallback, Ut as resolveMigrationStateFilePath, V as applyDropTableOperation, Va as QuerySchemaUniqueWhere, Vc as MigrationInstanceLike, Vi as UpsertSpec, Vn as MakeSeederCommand, Vo as Model, Vr as AdapterTransactionContext, Vs as RelatedModelForRelationship, Vt as readAppliedMigrationsStateFromStore, W as applyMigrationToDatabase, Wa as QuerySchemaWhere, Wc as PrismaSchemaSyncOptions, Wi as ArkormBootContext, Wn as MakeFactoryCommand, Wo as Expression, Wr as AggregateSpec, Ws as JoinClause, Wt as supportsDatabaseMigrationState, X as buildInverseRelationLine, Xa as TransactionCallback, Xc as SchemaOperation, Xi as CastMap, Xn as AttributeOptions, Xo as col, Xr as DeleteManySpec, Xs as FactoryCallback, Xt as PersistedTableMetadata, Y as buildIndexLine, Ya as SoftDeleteConfig, Yc as SchemaIndex, Yi as CastHandler, Yn as Attribute, Yo as coalesce, Yr as DatabaseValue, Ys as FactoryAttributes, Yt as PersistedPrimaryKeyGeneration, Z as buildMigrationSource, Za as TransactionCapableClient, Zc as SchemaPrimaryKey, Zi as CastType, Zn as Arkorm, Zo as count, Zr as DeleteSpec, Zs as FactoryDefinition, Zt as PersistedTimestampColumn, _ as emitRuntimeDebugEvent, _a as PaginationMeta, _c as DatabaseTableOptions, _i as QueryJoinRawConstraint, _n as ScopeNotDefinedException, _o as DelegateForModelSchema, _r as registerModels, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateSelect, ac as CaseExpressionBranch, ai as QueryDayCondition, an as getPersistedTableMetadata, ao as GroupByAggregateRow, ar as RuntimePathMap, as as sum, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PaginationURLDriverFactory, bc as BelongsToRelationMetadata, bi as QueryJsonCondition, bn as QueryExecutionExceptionContext, bo as ModelAttributes, br as resetRuntimeRegistryForTests, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateUpdateData, cc as ExpressionBinaryOperator, ci as QueryFullTextCondition, cn as rebuildPersistedColumnMappingsState, co as ArkormModelNameRegistry, cr as getRegisteredModels, cs as InlineFactory, ct as escapeRegex, d as inferDelegateName, da as EagerLoadMap, dc as FunctionExpressionNode, di as QueryJoin, dn as resolvePersistedMetadataFeatures, do as AttributeOrderBy, dr as loadFactoriesFrom, dt as formatDefaultValue, ea as DelegateFindManyArgs, ec as FactoryRelationshipResolver, ei as PartitionedSelectSpec, el as SchemaTableDropOperation, en as deletePersistedColumnMappingsState, eo as ModelStatic, er as RegisteredFactory, es as fromExpressionNode, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as GetUserConfig, fc as InExpressionNode, fi as QueryJoinBoolean, fn as syncPersistedColumnMappingsFromState, fo as AttributeQuerySchema, fr as loadMigrationsFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationCurrentPageResolver, gc as ValueExpressionNode, gi as QueryJoinNullConstraint, gn as UniqueConstraintResolutionException, go as AttributeWhereInput, gr as registerMigrations, gt as pad, h as defineConfig, ha as NamingCase, hc as RawExpressionNode, hi as QueryJoinNestedConstraint, hn as UnsupportedAdapterFeatureException, ho as AttributeUpdateInput, hr as registerFactories, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateRows, ic as BinaryExpressionNode, ii as QueryCondition, il as TimestampNaming, in as getPersistedPrimaryKeyGeneration, io as ExpressionSelectMap, ir as RuntimePathKey, is as raw, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionCapableClient, jc as MorphedByManyRelationMetadata, ji as RawQuerySpec, jn as TableBuilder, jo as ModelRelationshipKey, jr as KyselyDatabaseAdapter, js as RelationDefaultResolver, jt as createEmptyAppliedMigrationsState, k as isDelegateLike, ka as PrismaLikeWhereInput, kc as MorphToManyRelationMetadata, ki as QueryTarget, kn as SchemaBuilder, ko as ModelLifecycleState, kr as createPrismaCompatibilityAdapter, ks as RelationColumnLookupSpec, kt as buildMigrationRunId, l as createPrismaAdapter, la as DelegateWhere, lc as ExpressionJsonCast, li as QueryGroupByItem, ln as resetPersistedColumnMappingsCache, lo as ArkormModelRegistry, lr as getRegisteredPaths, ls as ModelFactory, lt as findEnumBlock, m as configureArkormRuntime, ma as ModelTableCase, mc as NullCheckExpressionNode, mi as QueryJoinConstraint, mn as writePersistedColumnMappingsState, mo as AttributeSelect, mr as loadSeedersFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateOrderBy, nc as MaybePromise, ni as QueryComparisonCondition, nl as TimestampColumnBehavior, nn as getPersistedEnumMap, no as ChunkCallback, nr as RuntimeConstructor, ns as max, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateUniqueWhere, oc as CaseExpressionNode, oi as QueryExistsCondition, on as getPersistedTimestampColumns, oo as GroupByAggregateSpec, or as getRegisteredFactories, os as val, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as ModelQuerySchemaLike, pc as JsonExpressionNode, pi as QueryJoinColumnConstraint, pn as validatePersistedMetadataFeaturesForMigrations, po as AttributeSchemaDelegate, pr as loadModelsFrom, pt as formatRelationAction, q as buildEnumBlock, qa as Serializable, qc as SchemaForeignKey, qi as ArkormDebugHandler, qn as CliApp, qo as avg, qr as DatabaseRow, qs as ArkormCollection, qt as PersistedColumnMappingsState, r as LoadedRuntimeModule, ra as DelegateRow, rc as AggregateExpressionNode, ri as QueryComparisonOperator, rl as TimestampNames, rn as getPersistedEnumTsType, ro as EachCallback, rr as RuntimePathInput, rs as min, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUpdateArgs, sc as ColumnExpressionNode, si as QueryExpressionCondition, sn as readPersistedColumnMappingsState, so as QueryBuilder, sr as getRegisteredMigrations, ss as where, st as deriveSingularFieldName, t as URLDriver, ta as DelegateInclude, tc as FactoryState, ti as QueryColumnComparisonCondition, tl as SchemaUniqueConstraint, tn as getPersistedColumnMap, to as RelationshipModelStatic, tr as RegisteredModel, ts as json, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as EagerLoadConstraint, uc as ExpressionNode, ui as QueryGroupCondition, un as resolveColumnMappingsFilePath, uo as AttributeCreateInput, ur as getRegisteredSeeders, us as defineFactory, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationOptions, vc as DatabaseTablePersistedMetadataOptions, vi as QueryJoinType, vn as RelationResolutionException, vo as GlobalScope, vr as registerPaths, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeInclude, wc as HasOneRelationMetadata, wi as QueryOrderBy, wn as ArkormErrorContext, wo as ModelEventDispatcher, wr as SeederCallArgument, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaClientLike, xc as ColumnMap, xi as QueryJsonConditionKind, xn as QueryConstraintException, xo as ModelAttributesOf, xr as resolveRegisteredModel, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationURLDriver, yc as BelongsToManyRelationMetadata, yi as QueryJoinValueConstraint, yn as QueryExecutionException, yo as ModelAttributeValue, yr as registerSeeders, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaRows, zc as GeneratedMigrationFile, zi as UpdateManySpec, zn as MigrateFreshCommand, zo as RegisteredModelName, zr as AdapterModelStructure, zs as JoinOn, zt as markMigrationRun } from "./index-BSJFuytO.cjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, ArkormModelNameRegistry, ArkormModelRegistry, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, 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, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryRelationCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RegisteredModelClass, RegisteredModelInstance, RegisteredModelName, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getModel, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRegisteredModel, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildPrimaryKeyLine, $a as ModelStatic, $c as SchemaTableDropOperation, $i as DelegateFindManyArgs, $n as getModel, $o as fromExpressionNode, $r as InsertSpec, $s as FactoryRelationshipResolver, $t as createEmptyPersistedColumnMappingsState, A as isQuerySchemaLike, Aa as PrismaTransactionCapableClient, Ac as MorphedByManyRelationMetadata, Ai as RawQuerySpec, An as EnumBuilder, Ao as ModelRelationshipKey, Ar as createPrismaDatabaseAdapter, As as RelationDefaultResolver, At as computeMigrationChecksum, B as applyCreateTableOperation, Ba as QuerySchemaUniqueWhere, Bc as MigrationInstanceLike, Bi as UpsertSpec, Bn as MigrateCommand, Bo as Model, Br as AdapterQueryOperation, Bs as RelatedModelForRelationship, Bt as readAppliedMigrationsState, C as getRuntimeClient, Ca as PrismaLikeInclude, Cc as HasOneRelationMetadata, Ci as QueryNotCondition, Cn as MissingDelegateException, Co as ModelEventDispatcher, Cr as Seeder, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeSortOrder, Dc as MorphOneRelationMetadata, Di as QuerySelectColumn, Dn as MIGRATION_BRAND, Do as ModelEventName, Dr as PrismaDatabaseAdapter, Ds as RelationAggregateType, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeSelect, Ec as MorphManyRelationMetadata, Ei as QueryScalarComparisonOperator, En as DB, Eo as ModelEventListener, Er as SeederInput, Es as RelationAggregateInput, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaInclude, Fc as AppliedMigrationRun, Fi as SelectSpec, Fn as SeedCommand, Fo as QuerySchemaForModelInstance, Fr as AdapterDatabaseCreationResult, Fs as RelationTableLookupSpec, Ft as getLastMigrationRun, G as applyMigrationToPrismaSchema, Ga as RuntimeClientLike, Gc as SchemaColumnType, Gi as ArkormDebugEvent, Gn as InitCommand, Go as JsonExpression, Gr as DatabaseAdapter, Gs as Paginator, Gt as writeAppliedMigrationsState, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUpdateData, Hc as PrismaMigrationWorkflowOptions, Hi as AdapterQueryInspection, Hn as MakeModelCommand, Ho as CaseExpression, Hr as AggregateOperation, Hs as WhereCallback, Ht as removeAppliedMigration, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaOrderBy, Ic as AppliedMigrationsState, Ii as SoftDeleteQueryMode, In as ModelsSyncCommand, Io as RegisteredModelClass, Ir as AdapterInspectionRequest, Is as EagerLoadQueryForRelationship, It as getLatestAppliedMigrations, J as buildFieldLine, Ja as SoftDeleteConfig, Jc as SchemaIndex, Ji as CastHandler, Jn as resolveCast, Jo as coalesce, Jr as DatabaseRows, Js as FactoryAttributes, Jt as PersistedMetadataFeatures, K as applyOperationsToPrismaSchema, Ka as Serializable, Kc as SchemaForeignKey, Ki as ArkormDebugHandler, Kn as DbCommand, Ko as avg, Kr as DatabasePrimitive, Ks as ArkormCollection, Kt as writeAppliedMigrationsStateToStore, L as PRISMA_ENUM_REGEX, La as QuerySchemaRow, Lc as GenerateMigrationOptions, Li as SortDirection, Ln as MigrationHistoryCommand, Lo as RegisteredModelInstance, Lr as AdapterModelFieldStructure, Ls as EagerLoadRelations, Lt as isMigrationApplied, M as loadArkormConfig, Ma as PrismaTransactionOptions, Mc as RelationMetadata, Mi as RelationFilterSpec, Mn as GeneratedColumnExpression, Mo as ModelUpdateData, Mr as createKyselyAdapter, Ms as RelationMetadataProvider, Mt as deleteAppliedMigrationsStateFromStore, N as resetArkormRuntimeForTests, Na as QuerySchemaCreateData, Nc as RelationMetadataType, Ni as RelationLoadPlan, Nn as resolveGeneratedExpression, No as ModelWhereInput, Nr as AdapterCapabilities, Ns as RelationResult, Nt as findAppliedMigration, O as getUserConfig, Oa as PrismaLikeWhereInput, Oc as MorphToManyRelationMetadata, Oi as QueryTarget, On as Migration, Oo as ModelLifecycleState, Or as PrismaDelegateNameMapping, Os as RelationColumnLookupSpec, Ot as buildMigrationIdentity, P as runArkormTransaction, Pa as QuerySchemaFindManyArgs, Pc as AppliedMigrationEntry, Pi as RelationLoadSpec, Pn as ForeignKeyBuilder, Po as QuerySchemaForModel, Pr as AdapterCapability, Ps as RelationResultCache, Pt as getLastBatchMigrations, Q as buildModelBlock, Qa as TransactionOptions, Qc as SchemaTableCreateOperation, Qi as DelegateCreateData, Qn as Arkormx, Qo as fn, Qr as InsertManySpec, Qs as FactoryModelConstructor, Qt as applyOperationsToPersistedColumnMappingsState, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaRows, Rc as GeneratedMigrationFile, Ri as UpdateManySpec, Rn as MigrateRollbackCommand, Ro as RegisteredModelName, Rr as AdapterModelIntrospectionOptions, Rs as JoinOn, Rt as markMigrationApplied, S as getRuntimeAdapter, Sa as PrismaFindManyArgsLike, Sc as HasManyThroughRelationMetadata, Si as QueryLogicalOperator, Sn as ModelNotFoundException, So as ModelDeclaredAttributeKey, Sr as SEEDER_BRAND, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeScalarFilter, Tc as ModelMetadata, Ti as QueryRawCondition, Tn as ArkormException, To as ModelEventHandlerConstructor, Tr as SeederConstructor, Ts as RelationAggregateConstraint, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaWhere, Uc as PrismaSchemaSyncOptions, Ui as ArkormBootContext, Un as MakeMigrationCommand, Uo as Expression, Ur as AggregateSelection, Us as JoinClause, Ut as resolveMigrationStateFilePath, V as applyDropTableOperation, Va as QuerySchemaUpdateArgs, Vc as PrimaryKeyGeneration, Vi as AdapterBindableModel, Vn as MakeSeederCommand, Vo as AggregateExpression, Vr as AdapterTransactionContext, Vs as RelatedModelFromResult, Vt as readAppliedMigrationsStateFromStore, W as applyMigrationToDatabase, Wa as RawSelectInput, Wc as SchemaColumn, Wi as ArkormConfig, Wn as MakeFactoryCommand, Wo as ExpressionBuilder, Wr as AggregateSpec, Ws as LengthAwarePaginator, Wt as supportsDatabaseMigrationState, X as buildInverseRelationLine, Xa as TransactionCapableClient, Xc as SchemaPrimaryKey, Xi as CastType, Xn as AttributeOptions, Xo as count, Xr as DeleteManySpec, Xs as FactoryDefinition, Xt as PersistedTableMetadata, Y as buildIndexLine, Ya as TransactionCallback, Yc as SchemaOperation, Yi as CastMap, Yn as Attribute, Yo as col, Yr as DatabaseValue, Ys as FactoryCallback, Yt as PersistedPrimaryKeyGeneration, Z as buildMigrationSource, Za as TransactionContext, Zc as SchemaTableAlterOperation, Zi as ClientResolver, Zn as Arkorm, Zo as expressionBuilder, Zr as DeleteSpec, Zs as FactoryDefinitionAttributes, Zt as PersistedTimestampColumn, _ as emitRuntimeDebugEvent, _a as PaginationOptions, _c as DatabaseTablePersistedMetadataOptions, _i as QueryJoinRawConstraint, _n as ScopeNotDefinedException, _o as GlobalScope, _r as registerModels, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateUniqueWhere, ac as CaseExpressionNode, ai as QueryDayCondition, an as getPersistedTableMetadata, ao as GroupByAggregateSpec, ar as RuntimePathMap, as as val, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PrismaClientLike, bc as ColumnMap, bi as QueryJsonCondition, bn as QueryExecutionExceptionContext, bo as ModelAttributesOf, br as resetRuntimeRegistryForTests, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateWhere, cc as ExpressionJsonCast, ci as QueryFullTextCondition, cn as rebuildPersistedColumnMappingsState, co as ArkormModelRegistry, cr as getRegisteredModels, cs as ModelFactory, ct as escapeRegex, d as inferDelegateName, da as GetUserConfig, dc as InExpressionNode, di as QueryJoin, dn as resolvePersistedMetadataFeatures, do as AttributeQuerySchema, dr as loadFactoriesFrom, dt as formatDefaultValue, ea as DelegateInclude, ec as FactoryState, ei as PartitionedSelectSpec, el as SchemaUniqueConstraint, en as deletePersistedColumnMappingsState, eo as RelationshipModelStatic, er as RegisteredFactory, es as json, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as ModelQuerySchemaLike, fc as JsonExpressionNode, fi as QueryJoinBoolean, fn as syncPersistedColumnMappingsFromState, fo as AttributeSchemaDelegate, fr as loadMigrationsFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationMeta, gc as DatabaseTableOptions, gi as QueryJoinNullConstraint, gn as UniqueConstraintResolutionException, go as DelegateForModelSchema, gr as registerMigrations, gt as pad, h as defineConfig, ha as PaginationCurrentPageResolver, hc as ValueExpressionNode, hi as QueryJoinNestedConstraint, hn as UnsupportedAdapterFeatureException, ho as AttributeWhereInput, hr as registerFactories, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateSelect, ic as CaseExpressionBranch, ii as QueryCondition, in as getPersistedPrimaryKeyGeneration, io as GroupByAggregateRow, ir as RuntimePathKey, is as sum, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionContext, jc as PivotModelStatic, ji as RelationAggregateSpec, jn as TableBuilder, jo as ModelRelationshipResult, jr as KyselyDatabaseAdapter, js as RelationDefaultValue, jt as createEmptyAppliedMigrationsState, k as isDelegateLike, ka as PrismaTransactionCallback, kc as MorphToRelationMetadata, ki as QueryTimeCondition, kn as SchemaBuilder, ko as ModelOrderByInput, kr as createPrismaCompatibilityAdapter, ks as RelationConstraint, kt as buildMigrationRunId, l as createPrismaAdapter, la as EagerLoadConstraint, lc as ExpressionNode, li as QueryGroupByItem, ln as resetPersistedColumnMappingsCache, lo as AttributeCreateInput, lr as getRegisteredPaths, ls as defineFactory, lt as findEnumBlock, m as configureArkormRuntime, ma as NamingCase, mc as RawExpressionNode, mi as QueryJoinConstraint, mn as writePersistedColumnMappingsState, mo as AttributeUpdateInput, mr as loadSeedersFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateRow, nc as AggregateExpressionNode, ni as QueryComparisonCondition, nl as TimestampNames, nn as getPersistedEnumMap, no as EachCallback, nr as RuntimeConstructor, ns as min, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateUpdateArgs, oc as ColumnExpressionNode, oi as QueryExistsCondition, on as getPersistedTimestampColumns, oo as QueryBuilder, or as getRegisteredFactories, os as where, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as ModelTableCase, pc as NullCheckExpressionNode, pi as QueryJoinColumnConstraint, pn as validatePersistedMetadataFeaturesForMigrations, po as AttributeSelect, pr as loadModelsFrom, pt as formatRelationAction, q as buildEnumBlock, qa as SimplePaginationMeta, qc as SchemaForeignKeyAction, qi as CastDefinition, qn as CliApp, qo as caseWhen, qr as DatabaseRow, qs as FactoryAttributeResolver, qt as PersistedColumnMappingsState, r as LoadedRuntimeModule, ra as DelegateRows, rc as BinaryExpressionNode, ri as QueryComparisonOperator, rl as TimestampNaming, rn as getPersistedEnumTsType, ro as ExpressionSelectMap, rr as RuntimePathInput, rs as raw, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUpdateData, sc as ExpressionBinaryOperator, si as QueryExpressionCondition, sn as readPersistedColumnMappingsState, so as ArkormModelNameRegistry, sr as getRegisteredMigrations, ss as InlineFactory, st as deriveSingularFieldName, t as URLDriver, ta as DelegateOrderBy, tc as MaybePromise, ti as QueryColumnComparisonCondition, tl as TimestampColumnBehavior, tn as getPersistedColumnMap, to as ChunkCallback, tr as RegisteredModel, ts as max, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as EagerLoadMap, uc as FunctionExpressionNode, ui as QueryGroupCondition, un as resolveColumnMappingsFilePath, uo as AttributeOrderBy, ur as getRegisteredSeeders, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationURLDriver, vc as BelongsToManyRelationMetadata, vi as QueryJoinType, vn as RelationResolutionException, vo as ModelAttributeValue, vr as registerPaths, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeOrderBy, wc as HasOneThroughRelationMetadata, wi as QueryOrderBy, wn as ArkormErrorContext, wo as ModelEventHandler, wr as SeederCallArgument, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaDelegateLike, xc as HasManyRelationMetadata, xi as QueryJsonConditionKind, xn as QueryConstraintException, xo as ModelCreateData, xr as resolveRegisteredModel, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationURLDriverFactory, yc as BelongsToRelationMetadata, yi as QueryJoinValueConstraint, yn as QueryExecutionException, yo as ModelAttributes, yr as registerSeeders, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaSelect, zc as MigrationClass, zi as UpdateSpec, zn as MigrateFreshCommand, zo as RelatedModelClass, zr as AdapterModelStructure, zs as JoinSource, zt as markMigrationRun } from "./index-BYL9S6st.mjs";
|
|
2
|
-
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, ArkormModelNameRegistry, ArkormModelRegistry, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, 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, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RegisteredModelClass, RegisteredModelInstance, RegisteredModelName, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getModel, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRegisteredModel, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
|
1
|
+
import { $ as buildPrimaryKeyLine, $a as TransactionOptions, $c as SchemaTableCreateOperation, $i as DelegateCreateData, $n as getModel, $o as fn, $r as InsertSpec, $s as FactoryModelConstructor, $t as createEmptyPersistedColumnMappingsState, A as isQuerySchemaLike, Aa as PrismaTransactionCallback, Ac as MorphToRelationMetadata, Ai as QueryTimeCondition, An as EnumBuilder, Ao as ModelOrderByInput, Ar as createPrismaDatabaseAdapter, As as RelationConstraint, At as computeMigrationChecksum, B as applyCreateTableOperation, Ba as QuerySchemaSelect, Bc as MigrationClass, Bi as UpdateSpec, Bn as MigrateCommand, Bo as RelatedModelClass, Br as AdapterQueryOperation, Bs as JoinSource, Bt as readAppliedMigrationsState, C as getRuntimeClient, Ca as PrismaFindManyArgsLike, Cc as HasManyThroughRelationMetadata, Ci as QueryNotCondition, Cn as MissingDelegateException, Co as ModelDeclaredAttributeKey, Cr as Seeder, Ct as supportsDatabaseCreation, D as getRuntimePrismaClient, Da as PrismaLikeSelect, Dc as MorphManyRelationMetadata, Di as QueryScalarComparisonOperator, Dn as MIGRATION_BRAND, Do as ModelEventListener, Dr as PrismaDatabaseAdapter, Ds as RelationAggregateInput, Dt as toModelName, E as getRuntimePaginationURLDriverFactory, Ea as PrismaLikeScalarFilter, Ec as ModelMetadata, Ei as QueryRelationCondition, En as DB, Eo as ModelEventHandlerConstructor, Er as SeederInput, Es as RelationAggregateConstraint, Et as toMigrationFileSlug, F as PrimaryKeyGenerationPlanner, Fa as QuerySchemaFindManyArgs, Fc as AppliedMigrationEntry, Fi as RelationLoadSpec, Fn as SeedCommand, Fo as QuerySchemaForModel, Fr as AdapterDatabaseCreationResult, Fs as RelationResultCache, Ft as getLastMigrationRun, G as applyMigrationToPrismaSchema, Ga as RawSelectInput, Gc as SchemaColumn, Gi as ArkormConfig, Gn as InitCommand, Go as ExpressionBuilder, Gr as DatabaseAdapter, Gs as LengthAwarePaginator, Gt as writeAppliedMigrationsState, H as applyMigrationRollbackToDatabase, Ha as QuerySchemaUpdateArgs, Hc as PrimaryKeyGeneration, Hi as AdapterBindableModel, Hn as MakeModelCommand, Ho as AggregateExpression, Hr as AggregateOperation, Hs as RelatedModelFromResult, Ht as removeAppliedMigration, I as PRISMA_ENUM_MEMBER_REGEX, Ia as QuerySchemaInclude, Ic as AppliedMigrationRun, Ii as SelectSpec, In as ModelsSyncCommand, Io as QuerySchemaForModelInstance, Ir as AdapterInspectionRequest, Is as RelationTableLookupSpec, It as getLatestAppliedMigrations, J as buildFieldLine, Ja as SimplePaginationMeta, Jc as SchemaForeignKeyAction, Ji as CastDefinition, Jn as resolveCast, Jo as caseWhen, Jr as DatabaseRows, Js as FactoryAttributeResolver, Jt as PersistedMetadataFeatures, K as applyOperationsToPrismaSchema, Ka as RuntimeClientLike, Kc as SchemaColumnType, Ki as ArkormDebugEvent, Kn as DbCommand, Ko as JsonExpression, Kr as DatabasePrimitive, Ks as Paginator, Kt as writeAppliedMigrationsStateToStore, L as PRISMA_ENUM_REGEX, La as QuerySchemaOrderBy, Lc as AppliedMigrationsState, Li as SoftDeleteQueryMode, Ln as MigrationHistoryCommand, Lo as RegisteredModelClass, Lr as AdapterModelFieldStructure, Ls as EagerLoadQueryForRelationship, Lt as isMigrationApplied, M as loadArkormConfig, Ma as PrismaTransactionContext, Mc as PivotModelStatic, Mi as RelationAggregateSpec, Mn as GeneratedColumnExpression, Mo as ModelRelationshipResult, Mr as createKyselyAdapter, Ms as RelationDefaultValue, Mt as deleteAppliedMigrationsStateFromStore, N as resetArkormRuntimeForTests, Na as PrismaTransactionOptions, Nc as RelationMetadata, Ni as RelationFilterSpec, Nn as resolveGeneratedExpression, No as ModelUpdateData, Nr as AdapterCapabilities, Ns as RelationMetadataProvider, Nt as findAppliedMigration, O as getUserConfig, Oa as PrismaLikeSortOrder, Oc as MorphOneRelationMetadata, Oi as QuerySelectColumn, On as Migration, Oo as ModelEventName, Or as PrismaDelegateNameMapping, Os as RelationAggregateType, Ot as buildMigrationIdentity, P as runArkormTransaction, Pa as QuerySchemaCreateData, Pc as RelationMetadataType, Pi as RelationLoadPlan, Pn as ForeignKeyBuilder, Po as ModelWhereInput, Pr as AdapterCapability, Ps as RelationResult, Pt as getLastBatchMigrations, Q as buildModelBlock, Qa as TransactionContext, Qc as SchemaTableAlterOperation, Qi as ClientResolver, Qn as Arkormx, Qo as expressionBuilder, Qr as InsertManySpec, Qs as FactoryDefinitionAttributes, Qt as applyOperationsToPersistedColumnMappingsState, R as PRISMA_MODEL_REGEX, Ra as QuerySchemaRow, Rc as GenerateMigrationOptions, Ri as SortDirection, Rn as MigrateRollbackCommand, Ro as RegisteredModelInstance, Rr as AdapterModelIntrospectionOptions, Rs as EagerLoadRelations, Rt as markMigrationApplied, S as getRuntimeAdapter, Sa as PrismaDelegateLike, Sc as HasManyRelationMetadata, Si as QueryLogicalOperator, Sn as ModelNotFoundException, So as ModelCreateData, Sr as SEEDER_BRAND, St as stripPrismaSchemaModelsAndEnums, T as getRuntimePaginationCurrentPageResolver, Ta as PrismaLikeOrderBy, Tc as HasOneThroughRelationMetadata, Ti as QueryRawCondition, Tn as ArkormException, To as ModelEventHandler, Tr as SeederConstructor, Tt as supportsDatabaseReset, U as applyMigrationRollbackToPrismaSchema, Ua as QuerySchemaUpdateData, Uc as PrismaMigrationWorkflowOptions, Ui as AdapterQueryInspection, Un as MakeMigrationCommand, Uo as CaseExpression, Ur as AggregateSelection, Us as WhereCallback, Ut as resolveMigrationStateFilePath, V as applyDropTableOperation, Va as QuerySchemaUniqueWhere, Vc as MigrationInstanceLike, Vi as UpsertSpec, Vn as MakeSeederCommand, Vo as Model, Vr as AdapterTransactionContext, Vs as RelatedModelForRelationship, Vt as readAppliedMigrationsStateFromStore, W as applyMigrationToDatabase, Wa as QuerySchemaWhere, Wc as PrismaSchemaSyncOptions, Wi as ArkormBootContext, Wn as MakeFactoryCommand, Wo as Expression, Wr as AggregateSpec, Ws as JoinClause, Wt as supportsDatabaseMigrationState, X as buildInverseRelationLine, Xa as TransactionCallback, Xc as SchemaOperation, Xi as CastMap, Xn as AttributeOptions, Xo as col, Xr as DeleteManySpec, Xs as FactoryCallback, Xt as PersistedTableMetadata, Y as buildIndexLine, Ya as SoftDeleteConfig, Yc as SchemaIndex, Yi as CastHandler, Yn as Attribute, Yo as coalesce, Yr as DatabaseValue, Ys as FactoryAttributes, Yt as PersistedPrimaryKeyGeneration, Z as buildMigrationSource, Za as TransactionCapableClient, Zc as SchemaPrimaryKey, Zi as CastType, Zn as Arkorm, Zo as count, Zr as DeleteSpec, Zs as FactoryDefinition, Zt as PersistedTimestampColumn, _ as emitRuntimeDebugEvent, _a as PaginationMeta, _c as DatabaseTableOptions, _i as QueryJoinRawConstraint, _n as ScopeNotDefinedException, _o as DelegateForModelSchema, _r as registerModels, _t as resolveEnumName, a as getRuntimeCompatibilityAdapter, aa as DelegateSelect, ac as CaseExpressionBranch, ai as QueryDayCondition, an as getPersistedTableMetadata, ao as GroupByAggregateRow, ar as RuntimePathMap, as as sum, at as deriveRelationAlias, b as getActiveTransactionClient, ba as PaginationURLDriverFactory, bc as BelongsToRelationMetadata, bi as QueryJsonCondition, bn as QueryExecutionExceptionContext, bo as ModelAttributes, br as resetRuntimeRegistryForTests, bt as runMigrationWithPrisma, c as PrismaDelegateMap, ca as DelegateUpdateData, cc as ExpressionBinaryOperator, ci as QueryFullTextCondition, cn as rebuildPersistedColumnMappingsState, co as ArkormModelNameRegistry, cr as getRegisteredModels, cs as InlineFactory, ct as escapeRegex, d as inferDelegateName, da as EagerLoadMap, dc as FunctionExpressionNode, di as QueryJoin, dn as resolvePersistedMetadataFeatures, do as AttributeOrderBy, dr as loadFactoriesFrom, dt as formatDefaultValue, ea as DelegateFindManyArgs, ec as FactoryRelationshipResolver, ei as PartitionedSelectSpec, el as SchemaTableDropOperation, en as deletePersistedColumnMappingsState, eo as ModelStatic, er as RegisteredFactory, es as fromExpressionNode, et as buildRelationLine, f as awaitConfiguredModelsRegistration, fa as GetUserConfig, fc as InExpressionNode, fi as QueryJoinBoolean, fn as syncPersistedColumnMappingsFromState, fo as AttributeQuerySchema, fr as loadMigrationsFrom, ft as formatEnumDefaultValue, g as disposeArkormRuntime, ga as PaginationCurrentPageResolver, gc as ValueExpressionNode, gi as QueryJoinNullConstraint, gn as UniqueConstraintResolutionException, go as AttributeWhereInput, gr as registerMigrations, gt as pad, h as defineConfig, ha as NamingCase, hc as RawExpressionNode, hi as QueryJoinNestedConstraint, hn as UnsupportedAdapterFeatureException, ho as AttributeUpdateInput, hr as registerFactories, ht as getMigrationPlan, i as RuntimeModuleLoader, ia as DelegateRows, ic as BinaryExpressionNode, ii as QueryCondition, il as TimestampNaming, in as getPersistedPrimaryKeyGeneration, io as ExpressionSelectMap, ir as RuntimePathKey, is as raw, it as deriveInverseRelationAlias, j as isTransactionCapableClient, ja as PrismaTransactionCapableClient, jc as MorphedByManyRelationMetadata, ji as RawQuerySpec, jn as TableBuilder, jo as ModelRelationshipKey, jr as KyselyDatabaseAdapter, js as RelationDefaultResolver, jt as createEmptyAppliedMigrationsState, k as isDelegateLike, ka as PrismaLikeWhereInput, kc as MorphToManyRelationMetadata, ki as QueryTarget, kn as SchemaBuilder, ko as ModelLifecycleState, kr as createPrismaCompatibilityAdapter, ks as RelationColumnLookupSpec, kt as buildMigrationRunId, l as createPrismaAdapter, la as DelegateWhere, lc as ExpressionJsonCast, li as QueryGroupByItem, ln as resetPersistedColumnMappingsCache, lo as ArkormModelRegistry, lr as getRegisteredPaths, ls as ModelFactory, lt as findEnumBlock, m as configureArkormRuntime, ma as ModelTableCase, mc as NullCheckExpressionNode, mi as QueryJoinConstraint, mn as writePersistedColumnMappingsState, mo as AttributeSelect, mr as loadSeedersFrom, mt as generateMigrationFile, n as PivotModel, na as DelegateOrderBy, nc as MaybePromise, ni as QueryComparisonCondition, nl as TimestampColumnBehavior, nn as getPersistedEnumMap, no as ChunkCallback, nr as RuntimeConstructor, ns as max, nt as createMigrationTimestamp, o as resolveRuntimeCompatibilityQuerySchema, oa as DelegateUniqueWhere, oc as CaseExpressionNode, oi as QueryExistsCondition, on as getPersistedTimestampColumns, oo as GroupByAggregateSpec, or as getRegisteredFactories, os as val, ot as deriveRelationFieldName, p as bindAdapterToModels, pa as ModelQuerySchemaLike, pc as JsonExpressionNode, pi as QueryJoinColumnConstraint, pn as validatePersistedMetadataFeaturesForMigrations, po as AttributeSchemaDelegate, pr as loadModelsFrom, pt as formatRelationAction, q as buildEnumBlock, qa as Serializable, qc as SchemaForeignKey, qi as ArkormDebugHandler, qn as CliApp, qo as avg, qr as DatabaseRow, qs as ArkormCollection, qt as PersistedColumnMappingsState, r as LoadedRuntimeModule, ra as DelegateRow, rc as AggregateExpressionNode, ri as QueryComparisonOperator, rl as TimestampNames, rn as getPersistedEnumTsType, ro as EachCallback, rr as RuntimePathInput, rs as min, rt as deriveCollectionFieldName, s as resolveRuntimeCompatibilityQuerySchemaOrThrow, sa as DelegateUpdateArgs, sc as ColumnExpressionNode, si as QueryExpressionCondition, sn as readPersistedColumnMappingsState, so as QueryBuilder, sr as getRegisteredMigrations, ss as where, st as deriveSingularFieldName, t as URLDriver, ta as DelegateInclude, tc as FactoryState, ti as QueryColumnComparisonCondition, tl as SchemaUniqueConstraint, tn as getPersistedColumnMap, to as RelationshipModelStatic, tr as RegisteredModel, ts as json, tt as buildUniqueConstraintLine, u as createPrismaDelegateMap, ua as EagerLoadConstraint, uc as ExpressionNode, ui as QueryGroupCondition, un as resolveColumnMappingsFilePath, uo as AttributeCreateInput, ur as getRegisteredSeeders, us as defineFactory, ut as findModelBlock, v as ensureArkormConfigLoading, va as PaginationOptions, vc as DatabaseTablePersistedMetadataOptions, vi as QueryJoinType, vn as RelationResolutionException, vo as GlobalScope, vr as registerPaths, vt as resolveMigrationClassName, w as getRuntimeDebugHandler, wa as PrismaLikeInclude, wc as HasOneRelationMetadata, wi as QueryOrderBy, wn as ArkormErrorContext, wo as ModelEventDispatcher, wr as SeederCallArgument, wt as supportsDatabaseMigrationExecution, x as getDefaultStubsPath, xa as PrismaClientLike, xc as ColumnMap, xi as QueryJsonConditionKind, xn as QueryConstraintException, xo as ModelAttributesOf, xr as resolveRegisteredModel, xt as runPrismaCommand, y as getActiveTransactionAdapter, ya as PaginationURLDriver, yc as BelongsToManyRelationMetadata, yi as QueryJoinValueConstraint, yn as QueryExecutionException, yo as ModelAttributeValue, yr as registerSeeders, yt as resolvePrismaType, z as applyAlterTableOperation, za as QuerySchemaRows, zc as GeneratedMigrationFile, zi as UpdateManySpec, zn as MigrateFreshCommand, zo as RegisteredModelName, zr as AdapterModelStructure, zs as JoinOn, zt as markMigrationRun } from "./index-DJe32yxM.mjs";
|
|
2
|
+
export { AdapterBindableModel, AdapterCapabilities, AdapterCapability, AdapterDatabaseCreationResult, AdapterInspectionRequest, AdapterModelFieldStructure, AdapterModelIntrospectionOptions, AdapterModelStructure, AdapterQueryInspection, AdapterQueryOperation, AdapterTransactionContext, AggregateExpression, AggregateExpressionNode, AggregateOperation, AggregateSelection, AggregateSpec, AppliedMigrationEntry, AppliedMigrationRun, AppliedMigrationsState, Arkorm, ArkormBootContext, ArkormCollection, ArkormConfig, ArkormDebugEvent, ArkormDebugHandler, ArkormErrorContext, ArkormException, ArkormModelNameRegistry, ArkormModelRegistry, Arkormx, Attribute, AttributeCreateInput, AttributeOptions, AttributeOrderBy, AttributeQuerySchema, AttributeSchemaDelegate, AttributeSelect, AttributeUpdateInput, AttributeWhereInput, BelongsToManyRelationMetadata, BelongsToRelationMetadata, BinaryExpressionNode, CaseExpression, CaseExpressionBranch, CaseExpressionNode, CastDefinition, CastHandler, CastMap, CastType, ChunkCallback, CliApp, ClientResolver, ColumnExpressionNode, ColumnMap, DB, DatabaseAdapter, DatabasePrimitive, DatabaseRow, DatabaseRows, DatabaseTableOptions, DatabaseTablePersistedMetadataOptions, DatabaseValue, DbCommand, DelegateCreateData, DelegateFindManyArgs, DelegateForModelSchema, DelegateInclude, DelegateOrderBy, DelegateRow, DelegateRows, DelegateSelect, DelegateUniqueWhere, DelegateUpdateArgs, DelegateUpdateData, DelegateWhere, DeleteManySpec, DeleteSpec, EachCallback, EagerLoadConstraint, EagerLoadMap, EagerLoadQueryForRelationship, EagerLoadRelations, EnumBuilder, Expression, ExpressionBinaryOperator, ExpressionBuilder, ExpressionJsonCast, ExpressionNode, ExpressionSelectMap, FactoryAttributeResolver, FactoryAttributes, FactoryCallback, FactoryDefinition, FactoryDefinitionAttributes, FactoryModelConstructor, FactoryRelationshipResolver, FactoryState, ForeignKeyBuilder, FunctionExpressionNode, GenerateMigrationOptions, GeneratedColumnExpression, GeneratedMigrationFile, GetUserConfig, GlobalScope, GroupByAggregateRow, GroupByAggregateSpec, HasManyRelationMetadata, HasManyThroughRelationMetadata, HasOneRelationMetadata, HasOneThroughRelationMetadata, InExpressionNode, InitCommand, InlineFactory, InsertManySpec, InsertSpec, JoinClause, JoinOn, JoinSource, JsonExpression, JsonExpressionNode, KyselyDatabaseAdapter, LengthAwarePaginator, LoadedRuntimeModule, MIGRATION_BRAND, MakeFactoryCommand, MakeMigrationCommand, MakeModelCommand, MakeSeederCommand, MaybePromise, MigrateCommand, MigrateFreshCommand, MigrateRollbackCommand, Migration, MigrationClass, MigrationHistoryCommand, MigrationInstanceLike, MissingDelegateException, Model, ModelAttributeValue, ModelAttributes, ModelAttributesOf, ModelCreateData, ModelDeclaredAttributeKey, ModelEventDispatcher, ModelEventHandler, ModelEventHandlerConstructor, ModelEventListener, ModelEventName, ModelFactory, ModelLifecycleState, ModelMetadata, ModelNotFoundException, ModelOrderByInput, ModelQuerySchemaLike, ModelRelationshipKey, ModelRelationshipResult, ModelStatic, ModelTableCase, ModelUpdateData, ModelWhereInput, ModelsSyncCommand, MorphManyRelationMetadata, MorphOneRelationMetadata, MorphToManyRelationMetadata, MorphToRelationMetadata, MorphedByManyRelationMetadata, NamingCase, NullCheckExpressionNode, PRISMA_ENUM_MEMBER_REGEX, PRISMA_ENUM_REGEX, PRISMA_MODEL_REGEX, PaginationCurrentPageResolver, PaginationMeta, PaginationOptions, PaginationURLDriver, PaginationURLDriverFactory, Paginator, PartitionedSelectSpec, 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, PrismaTransactionContext, PrismaTransactionOptions, QueryBuilder, QueryColumnComparisonCondition, QueryComparisonCondition, QueryComparisonOperator, QueryCondition, QueryConstraintException, QueryDayCondition, QueryExecutionException, QueryExecutionExceptionContext, QueryExistsCondition, QueryExpressionCondition, QueryFullTextCondition, QueryGroupByItem, QueryGroupCondition, QueryJoin, QueryJoinBoolean, QueryJoinColumnConstraint, QueryJoinConstraint, QueryJoinNestedConstraint, QueryJoinNullConstraint, QueryJoinRawConstraint, QueryJoinType, QueryJoinValueConstraint, QueryJsonCondition, QueryJsonConditionKind, QueryLogicalOperator, QueryNotCondition, QueryOrderBy, QueryRawCondition, QueryRelationCondition, QueryScalarComparisonOperator, QuerySchemaCreateData, QuerySchemaFindManyArgs, QuerySchemaForModel, QuerySchemaForModelInstance, QuerySchemaInclude, QuerySchemaOrderBy, QuerySchemaRow, QuerySchemaRows, QuerySchemaSelect, QuerySchemaUniqueWhere, QuerySchemaUpdateArgs, QuerySchemaUpdateData, QuerySchemaWhere, QuerySelectColumn, QueryTarget, QueryTimeCondition, RawExpressionNode, RawQuerySpec, RawSelectInput, RegisteredFactory, RegisteredModel, RegisteredModelClass, RegisteredModelInstance, RegisteredModelName, RelatedModelClass, RelatedModelForRelationship, RelatedModelFromResult, RelationAggregateConstraint, RelationAggregateInput, RelationAggregateSpec, RelationAggregateType, RelationColumnLookupSpec, RelationConstraint, RelationDefaultResolver, RelationDefaultValue, RelationFilterSpec, RelationLoadPlan, RelationLoadSpec, RelationMetadata, RelationMetadataProvider, RelationMetadataType, RelationResolutionException, RelationResult, RelationResultCache, RelationTableLookupSpec, RelationshipModelStatic, RuntimeClientLike, RuntimeConstructor, RuntimeModuleLoader, RuntimePathInput, RuntimePathKey, RuntimePathMap, SEEDER_BRAND, SchemaBuilder, SchemaColumn, SchemaColumnType, SchemaForeignKey, SchemaForeignKeyAction, SchemaIndex, SchemaOperation, SchemaPrimaryKey, SchemaTableAlterOperation, SchemaTableCreateOperation, SchemaTableDropOperation, SchemaUniqueConstraint, ScopeNotDefinedException, SeedCommand, Seeder, SeederCallArgument, SeederConstructor, SeederInput, SelectSpec, Serializable, SimplePaginationMeta, SoftDeleteConfig, SoftDeleteQueryMode, SortDirection, TableBuilder, TimestampColumnBehavior, TimestampNames, TimestampNaming, TransactionCallback, TransactionCapableClient, TransactionContext, TransactionOptions, URLDriver, UniqueConstraintResolutionException, UnsupportedAdapterFeatureException, UpdateManySpec, UpdateSpec, UpsertSpec, ValueExpressionNode, WhereCallback, applyAlterTableOperation, applyCreateTableOperation, applyDropTableOperation, applyMigrationRollbackToDatabase, applyMigrationRollbackToPrismaSchema, applyMigrationToDatabase, applyMigrationToPrismaSchema, applyOperationsToPersistedColumnMappingsState, applyOperationsToPrismaSchema, avg, awaitConfiguredModelsRegistration, bindAdapterToModels, buildEnumBlock, buildFieldLine, buildIndexLine, buildInverseRelationLine, buildMigrationIdentity, buildMigrationRunId, buildMigrationSource, buildModelBlock, buildPrimaryKeyLine, buildRelationLine, buildUniqueConstraintLine, caseWhen, coalesce, col, computeMigrationChecksum, configureArkormRuntime, count, createEmptyAppliedMigrationsState, createEmptyPersistedColumnMappingsState, createKyselyAdapter, createMigrationTimestamp, createPrismaAdapter, createPrismaCompatibilityAdapter, createPrismaDatabaseAdapter, createPrismaDelegateMap, defineConfig, defineFactory, deleteAppliedMigrationsStateFromStore, deletePersistedColumnMappingsState, deriveCollectionFieldName, deriveInverseRelationAlias, deriveRelationAlias, deriveRelationFieldName, deriveSingularFieldName, disposeArkormRuntime, emitRuntimeDebugEvent, ensureArkormConfigLoading, escapeRegex, expressionBuilder, findAppliedMigration, findEnumBlock, findModelBlock, fn, formatDefaultValue, formatEnumDefaultValue, formatRelationAction, fromExpressionNode, generateMigrationFile, getActiveTransactionAdapter, getActiveTransactionClient, getDefaultStubsPath, getLastBatchMigrations, getLastMigrationRun, getLatestAppliedMigrations, getMigrationPlan, getModel, getPersistedColumnMap, getPersistedEnumMap, getPersistedEnumTsType, getPersistedPrimaryKeyGeneration, getPersistedTableMetadata, getPersistedTimestampColumns, getRegisteredFactories, getRegisteredMigrations, getRegisteredModels, getRegisteredPaths, getRegisteredSeeders, getRuntimeAdapter, getRuntimeClient, getRuntimeCompatibilityAdapter, getRuntimeDebugHandler, getRuntimePaginationCurrentPageResolver, getRuntimePaginationURLDriverFactory, getRuntimePrismaClient, getUserConfig, inferDelegateName, isDelegateLike, isMigrationApplied, isQuerySchemaLike, isTransactionCapableClient, json, loadArkormConfig, loadFactoriesFrom, loadMigrationsFrom, loadModelsFrom, loadSeedersFrom, markMigrationApplied, markMigrationRun, max, min, pad, raw, readAppliedMigrationsState, readAppliedMigrationsStateFromStore, readPersistedColumnMappingsState, rebuildPersistedColumnMappingsState, registerFactories, registerMigrations, registerModels, registerPaths, registerSeeders, removeAppliedMigration, resetArkormRuntimeForTests, resetPersistedColumnMappingsCache, resetRuntimeRegistryForTests, resolveCast, resolveColumnMappingsFilePath, resolveEnumName, resolveGeneratedExpression, resolveMigrationClassName, resolveMigrationStateFilePath, resolvePersistedMetadataFeatures, resolvePrismaType, resolveRegisteredModel, resolveRuntimeCompatibilityQuerySchema, resolveRuntimeCompatibilityQuerySchemaOrThrow, runArkormTransaction, runMigrationWithPrisma, runPrismaCommand, stripPrismaSchemaModelsAndEnums, sum, supportsDatabaseCreation, supportsDatabaseMigrationExecution, supportsDatabaseMigrationState, supportsDatabaseReset, syncPersistedColumnMappingsFromState, toMigrationFileSlug, toModelName, val, validatePersistedMetadataFeaturesForMigrations, where, writeAppliedMigrationsState, writeAppliedMigrationsStateToStore, writePersistedColumnMappingsState };
|
package/dist/index.mjs
CHANGED
|
@@ -986,6 +986,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
986
986
|
if (condition.type === "time") return this.buildTimeCondition(target, condition);
|
|
987
987
|
if (condition.type === "day") return this.buildDayCondition(target, condition);
|
|
988
988
|
if (condition.type === "exists") return this.buildExistsCondition(condition);
|
|
989
|
+
if (condition.type === "relation") return this.buildRelationFilterExpression(target, condition.filter);
|
|
989
990
|
if (condition.type === "full-text") return this.buildFullTextCondition(target, condition);
|
|
990
991
|
if (condition.type === "json") return this.buildJsonCondition(target, condition);
|
|
991
992
|
if (condition.type === "expression") return sql`${this.buildExpression(target, condition.expression)}`;
|
|
@@ -1018,6 +1019,19 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1018
1019
|
buildColumnReference(table, column) {
|
|
1019
1020
|
return sql`${sql.table(table)}.${sql.id(column)}`;
|
|
1020
1021
|
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Renders the relation's source table, aliasing it when a self-referential
|
|
1024
|
+
* relation would otherwise put the same name on both sides of a correlated
|
|
1025
|
+
* subquery.
|
|
1026
|
+
*
|
|
1027
|
+
* @param sourceTable
|
|
1028
|
+
* @param table
|
|
1029
|
+
* @returns
|
|
1030
|
+
*/
|
|
1031
|
+
buildTableSource(sourceTable, table) {
|
|
1032
|
+
if (sourceTable === table) return sql`${sql.table(table)}`;
|
|
1033
|
+
return sql`${sql.table(sourceTable)} as ${sql.table(table)}`;
|
|
1034
|
+
}
|
|
1021
1035
|
buildRelatedTargetFromRelation(target, relation) {
|
|
1022
1036
|
const metadata = target.model?.getRelationMetadata(relation);
|
|
1023
1037
|
if (!metadata) throw new UnsupportedAdapterFeatureException(`Relation [${relation}] could not be resolved for SQL-backed relation execution.`, {
|
|
@@ -1025,7 +1039,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1025
1039
|
model: target.modelName,
|
|
1026
1040
|
relation
|
|
1027
1041
|
});
|
|
1028
|
-
if (metadata.type !== "hasMany" && metadata.type !== "hasOne" && metadata.type !== "belongsTo" && metadata.type !== "belongsToMany" && metadata.type !== "hasOneThrough" && metadata.type !== "hasManyThrough") throw new UnsupportedAdapterFeatureException(`Relation [${relation}] is not supported for SQL-backed relation execution by the Kysely adapter yet.`, {
|
|
1042
|
+
if (metadata.type !== "hasMany" && metadata.type !== "hasOne" && metadata.type !== "belongsTo" && metadata.type !== "belongsToMany" && metadata.type !== "hasOneThrough" && metadata.type !== "hasManyThrough" && metadata.type !== "morphOne" && metadata.type !== "morphMany") throw new UnsupportedAdapterFeatureException(`Relation [${relation}] is not supported for SQL-backed relation execution by the Kysely adapter yet.`, {
|
|
1029
1043
|
operation: "adapter.relation.metadata",
|
|
1030
1044
|
model: target.modelName,
|
|
1031
1045
|
relation,
|
|
@@ -1035,12 +1049,15 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1035
1049
|
}
|
|
1036
1050
|
});
|
|
1037
1051
|
const relatedMetadata = metadata.relatedModel.getModelMetadata();
|
|
1052
|
+
const sourceTable = this.resolveMappedTable(relatedMetadata.table);
|
|
1053
|
+
const table = sourceTable === this.resolveTable(target) ? `${sourceTable}_arkorm_self` : relatedMetadata.table;
|
|
1038
1054
|
return {
|
|
1039
1055
|
metadata,
|
|
1056
|
+
sourceTable,
|
|
1040
1057
|
relatedTarget: {
|
|
1041
1058
|
model: metadata.relatedModel,
|
|
1042
1059
|
modelName: metadata.relatedModel.name,
|
|
1043
|
-
table
|
|
1060
|
+
table,
|
|
1044
1061
|
primaryKey: relatedMetadata.primaryKey,
|
|
1045
1062
|
columns: relatedMetadata.columns,
|
|
1046
1063
|
softDelete: relatedMetadata.softDelete
|
|
@@ -1050,12 +1067,12 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1050
1067
|
resolveMappedTable(table) {
|
|
1051
1068
|
return this.mapping[table] ?? table;
|
|
1052
1069
|
}
|
|
1053
|
-
buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata) {
|
|
1070
|
+
buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata, sourceTable) {
|
|
1054
1071
|
const outerTable = this.resolveTable(outerTarget);
|
|
1055
1072
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1056
1073
|
const pivotTable = this.resolveMappedTable(metadata.throughTable);
|
|
1057
1074
|
return {
|
|
1058
|
-
from: sql`${
|
|
1075
|
+
from: sql`${this.buildTableSource(sourceTable, relatedTable)} inner join ${sql.table(pivotTable)} on ${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.relatedKey))} = ${this.buildColumnReference(pivotTable, metadata.relatedPivotKey)}`,
|
|
1059
1076
|
condition: sql`
|
|
1060
1077
|
${this.buildColumnReference(pivotTable, metadata.foreignPivotKey)}
|
|
1061
1078
|
=
|
|
@@ -1063,12 +1080,12 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1063
1080
|
`
|
|
1064
1081
|
};
|
|
1065
1082
|
}
|
|
1066
|
-
buildThroughJoinSource(outerTarget, relatedTarget, metadata) {
|
|
1083
|
+
buildThroughJoinSource(outerTarget, relatedTarget, metadata, sourceTable) {
|
|
1067
1084
|
const outerTable = this.resolveTable(outerTarget);
|
|
1068
1085
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1069
1086
|
const throughTable = this.resolveMappedTable(metadata.throughTable);
|
|
1070
1087
|
return {
|
|
1071
|
-
from: sql`${
|
|
1088
|
+
from: sql`${this.buildTableSource(sourceTable, relatedTable)} inner join ${sql.table(throughTable)} on ${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.secondKey))} = ${this.buildColumnReference(throughTable, metadata.secondLocalKey)}`,
|
|
1072
1089
|
condition: sql`
|
|
1073
1090
|
${this.buildColumnReference(throughTable, metadata.firstKey)}
|
|
1074
1091
|
=
|
|
@@ -1076,12 +1093,35 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1076
1093
|
`
|
|
1077
1094
|
};
|
|
1078
1095
|
}
|
|
1096
|
+
/**
|
|
1097
|
+
* The value a polymorphic child stores in its type column for this parent: the
|
|
1098
|
+
* parent model's class name, matching what the relationship writes on create
|
|
1099
|
+
* and what the set-based eager loader groups parents by.
|
|
1100
|
+
*
|
|
1101
|
+
* @param target
|
|
1102
|
+
* @param relation
|
|
1103
|
+
* @returns
|
|
1104
|
+
*/
|
|
1105
|
+
resolveMorphType(target, relation) {
|
|
1106
|
+
const morphType = target.modelName ?? target.model?.name;
|
|
1107
|
+
if (!morphType) throw new UnsupportedAdapterFeatureException(`Relation [${relation}] needs a named parent model to resolve its polymorphic type.`, {
|
|
1108
|
+
operation: "adapter.relation.metadata",
|
|
1109
|
+
model: target.modelName,
|
|
1110
|
+
relation,
|
|
1111
|
+
meta: {
|
|
1112
|
+
feature: "relationFilters",
|
|
1113
|
+
relationType: "morph"
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
return morphType;
|
|
1117
|
+
}
|
|
1079
1118
|
buildRelatedJoinCondition(outerTarget, relation) {
|
|
1080
|
-
const { metadata, relatedTarget } = this.buildRelatedTargetFromRelation(outerTarget, relation);
|
|
1119
|
+
const { metadata, relatedTarget, sourceTable } = this.buildRelatedTargetFromRelation(outerTarget, relation);
|
|
1081
1120
|
const outerTable = this.resolveTable(outerTarget);
|
|
1082
1121
|
const relatedTable = this.resolveTable(relatedTarget);
|
|
1122
|
+
const relatedFrom = this.buildTableSource(sourceTable, relatedTable);
|
|
1083
1123
|
if (metadata.type === "belongsToMany") {
|
|
1084
|
-
const joinSource = this.buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata);
|
|
1124
|
+
const joinSource = this.buildBelongsToManyJoinSource(outerTarget, relatedTarget, metadata, sourceTable);
|
|
1085
1125
|
return {
|
|
1086
1126
|
relatedTarget,
|
|
1087
1127
|
from: joinSource.from,
|
|
@@ -1089,7 +1129,7 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1089
1129
|
};
|
|
1090
1130
|
}
|
|
1091
1131
|
if (metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough") {
|
|
1092
|
-
const joinSource = this.buildThroughJoinSource(outerTarget, relatedTarget, metadata);
|
|
1132
|
+
const joinSource = this.buildThroughJoinSource(outerTarget, relatedTarget, metadata, sourceTable);
|
|
1093
1133
|
return {
|
|
1094
1134
|
relatedTarget,
|
|
1095
1135
|
from: joinSource.from,
|
|
@@ -1098,16 +1138,29 @@ var KyselyDatabaseAdapter = class KyselyDatabaseAdapter {
|
|
|
1098
1138
|
}
|
|
1099
1139
|
if (metadata.type === "hasMany" || metadata.type === "hasOne") return {
|
|
1100
1140
|
relatedTarget,
|
|
1101
|
-
from:
|
|
1141
|
+
from: relatedFrom,
|
|
1102
1142
|
condition: sql`
|
|
1103
1143
|
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.foreignKey))}
|
|
1104
1144
|
=
|
|
1105
1145
|
${this.buildColumnReference(outerTable, this.mapColumn(outerTarget, metadata.localKey))}
|
|
1106
1146
|
`
|
|
1107
1147
|
};
|
|
1148
|
+
if (metadata.type === "morphOne" || metadata.type === "morphMany") return {
|
|
1149
|
+
relatedTarget,
|
|
1150
|
+
from: relatedFrom,
|
|
1151
|
+
condition: sql`
|
|
1152
|
+
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.morphIdColumn))}
|
|
1153
|
+
=
|
|
1154
|
+
${this.buildColumnReference(outerTable, this.mapColumn(outerTarget, metadata.localKey))}
|
|
1155
|
+
and
|
|
1156
|
+
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.morphTypeColumn))}
|
|
1157
|
+
=
|
|
1158
|
+
${this.resolveMorphType(outerTarget, relation)}
|
|
1159
|
+
`
|
|
1160
|
+
};
|
|
1108
1161
|
return {
|
|
1109
1162
|
relatedTarget,
|
|
1110
|
-
from:
|
|
1163
|
+
from: relatedFrom,
|
|
1111
1164
|
condition: sql`
|
|
1112
1165
|
${this.buildColumnReference(relatedTable, this.mapColumn(relatedTarget, metadata.ownerKey))}
|
|
1113
1166
|
=
|
|
@@ -5134,6 +5187,10 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5134
5187
|
/**
|
|
5135
5188
|
* Appends a pre-built structured condition, first flushing any Prisma-like
|
|
5136
5189
|
* legacy where into the structured representation so the two combine correctly.
|
|
5190
|
+
*
|
|
5191
|
+
* @param boolean
|
|
5192
|
+
* @param condition
|
|
5193
|
+
* @returns
|
|
5137
5194
|
*/
|
|
5138
5195
|
appendStructuredWhere(boolean, condition) {
|
|
5139
5196
|
if (this.legacyWhere) {
|
|
@@ -5148,6 +5205,10 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5148
5205
|
* Appends a boolean {@link Expression} as a where predicate. When the query is
|
|
5149
5206
|
* using the Prisma-like legacy where representation, the expression is merged in
|
|
5150
5207
|
* as a structured condition alongside it.
|
|
5208
|
+
*
|
|
5209
|
+
* @param boolean
|
|
5210
|
+
* @param expression
|
|
5211
|
+
* @returns
|
|
5151
5212
|
*/
|
|
5152
5213
|
appendExpressionCondition(boolean, expression) {
|
|
5153
5214
|
const condition = {
|
|
@@ -5158,11 +5219,15 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5158
5219
|
}
|
|
5159
5220
|
/**
|
|
5160
5221
|
* Resolve a callback into a parenthesized group condition and append it.
|
|
5222
|
+
*
|
|
5223
|
+
* @param boolean
|
|
5224
|
+
* @param callback
|
|
5225
|
+
* @returns
|
|
5161
5226
|
*/
|
|
5162
5227
|
appendNestedWhere(boolean, callback) {
|
|
5163
5228
|
const nested = new QueryBuilder(this.model, this.adapter);
|
|
5164
5229
|
callback(nested);
|
|
5165
|
-
const condition = nested.getNestedWhereCondition();
|
|
5230
|
+
const condition = nested.withRelationConditions(nested.getNestedWhereCondition(), "query.where");
|
|
5166
5231
|
if (!condition) return this;
|
|
5167
5232
|
const grouped = condition.type === "group" ? condition : {
|
|
5168
5233
|
type: "group",
|
|
@@ -5173,6 +5238,40 @@ var QueryBuilder = class QueryBuilder {
|
|
|
5173
5238
|
return this;
|
|
5174
5239
|
}
|
|
5175
5240
|
/**
|
|
5241
|
+
* Fold this builder's relation filters into `condition`, in the order and
|
|
5242
|
+
* with the and/or they were added with, so they can be carried inside a
|
|
5243
|
+
* where group or another relation's constraint.
|
|
5244
|
+
*
|
|
5245
|
+
* @param condition
|
|
5246
|
+
* @param operation Names the caller in the exception raised when a filter
|
|
5247
|
+
* cannot be expressed as a condition.
|
|
5248
|
+
* @returns
|
|
5249
|
+
*/
|
|
5250
|
+
withRelationConditions(condition, operation) {
|
|
5251
|
+
if (!this.hasRelationFilters()) return condition;
|
|
5252
|
+
const specs = this.tryBuildRelationFilterSpecs();
|
|
5253
|
+
if (!specs) throw new UnsupportedAdapterFeatureException("Relation filters inside a where group or relation constraint could not be compiled into conditions.", {
|
|
5254
|
+
operation,
|
|
5255
|
+
model: this.model.name,
|
|
5256
|
+
meta: { feature: "relationFilters" }
|
|
5257
|
+
});
|
|
5258
|
+
return specs.reduce((combined, spec) => {
|
|
5259
|
+
const relation = {
|
|
5260
|
+
type: "relation",
|
|
5261
|
+
filter: {
|
|
5262
|
+
...spec,
|
|
5263
|
+
boolean: void 0
|
|
5264
|
+
}
|
|
5265
|
+
};
|
|
5266
|
+
if (!combined) return relation;
|
|
5267
|
+
return {
|
|
5268
|
+
type: "group",
|
|
5269
|
+
operator: spec.boolean === "OR" ? "or" : "and",
|
|
5270
|
+
conditions: [combined, relation]
|
|
5271
|
+
};
|
|
5272
|
+
}, condition);
|
|
5273
|
+
}
|
|
5274
|
+
/**
|
|
5176
5275
|
* Returns the user-authored where condition for nesting, excluding any
|
|
5177
5276
|
* soft-delete predicate (the parent query owns that).
|
|
5178
5277
|
*/
|
|
@@ -7295,8 +7394,8 @@ var QueryBuilder = class QueryBuilder {
|
|
|
7295
7394
|
return this.insertOrIgnore(rows);
|
|
7296
7395
|
}
|
|
7297
7396
|
/**
|
|
7298
|
-
* Updates
|
|
7299
|
-
*
|
|
7397
|
+
* Updates the first record matching the current query constraints and
|
|
7398
|
+
* returns it as a model. Use {@link updateFrom} to update every match.
|
|
7300
7399
|
*
|
|
7301
7400
|
* @param data
|
|
7302
7401
|
* @returns
|
|
@@ -7319,7 +7418,8 @@ var QueryBuilder = class QueryBuilder {
|
|
|
7319
7418
|
return this.model.hydrate(updated);
|
|
7320
7419
|
}
|
|
7321
7420
|
/**
|
|
7322
|
-
* Update
|
|
7421
|
+
* Update every record matching the current query constraints and return
|
|
7422
|
+
* the number of affected rows.
|
|
7323
7423
|
*
|
|
7324
7424
|
* @param data
|
|
7325
7425
|
* @returns
|
|
@@ -8800,12 +8900,15 @@ var QueryBuilder = class QueryBuilder {
|
|
|
8800
8900
|
return this.tryBuildRelationQueryConstraintWhere(relatedQuery);
|
|
8801
8901
|
}
|
|
8802
8902
|
tryBuildRelationQueryConstraintWhere(relatedQuery) {
|
|
8803
|
-
if (relatedQuery.
|
|
8804
|
-
|
|
8903
|
+
if (relatedQuery.hasRelationAggregates() || relatedQuery.queryRelationLoads || relatedQuery.querySelect || relatedQuery.queryOrderBy || relatedQuery.queryDistinct || relatedQuery.queryGroupBy || relatedQuery.offsetValue !== void 0 || relatedQuery.limitValue !== void 0 || relatedQuery.randomOrderEnabled) return null;
|
|
8904
|
+
const where = relatedQuery.buildQueryWhereCondition(false);
|
|
8905
|
+
if (where === null || !relatedQuery.hasRelationFilters()) return where;
|
|
8906
|
+
if (!relatedQuery.tryBuildRelationFilterSpecs()) return null;
|
|
8907
|
+
return relatedQuery.withRelationConditions(where, "query.relations");
|
|
8805
8908
|
}
|
|
8806
8909
|
isSqlRelationFeatureMetadata(metadata) {
|
|
8807
8910
|
if (!metadata) return false;
|
|
8808
|
-
return metadata.type === "hasMany" || metadata.type === "hasOne" || metadata.type === "belongsTo" || metadata.type === "belongsToMany" || metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough";
|
|
8911
|
+
return metadata.type === "hasMany" || metadata.type === "hasOne" || metadata.type === "belongsTo" || metadata.type === "belongsToMany" || metadata.type === "hasOneThrough" || metadata.type === "hasManyThrough" || metadata.type === "morphOne" || metadata.type === "morphMany";
|
|
8809
8912
|
}
|
|
8810
8913
|
async filterModelsByRelationConstraints(models, relationCache, baseIds) {
|
|
8811
8914
|
return (await Promise.all(models.map(async (model) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cs as
|
|
1
|
+
import { Cs as BelongsToManyRelation, Ss as SingleResultRelation, Ts as RelationTableLoader, _s as HasOneThroughRelation, bs as HasManyRelation, ds as SetBasedEagerLoader, fs as MorphToRelation, gs as MorphManyRelation, hs as MorphOneRelation, ms as MorphToManyRelation, ps as MorphedByManyRelation, vs as HasOneRelation, ws as Relation, xs as BelongsToRelation, ys as HasManyThroughRelation } from "../index-BSJFuytO.cjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, MorphToRelation, MorphedByManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cs as
|
|
1
|
+
import { Cs as BelongsToManyRelation, Ss as SingleResultRelation, Ts as RelationTableLoader, _s as HasOneThroughRelation, bs as HasManyRelation, ds as SetBasedEagerLoader, fs as MorphToRelation, gs as MorphManyRelation, hs as MorphOneRelation, ms as MorphToManyRelation, ps as MorphedByManyRelation, vs as HasOneRelation, ws as Relation, xs as BelongsToRelation, ys as HasManyThroughRelation } from "../index-DJe32yxM.mjs";
|
|
2
2
|
export { BelongsToManyRelation, BelongsToRelation, HasManyRelation, HasManyThroughRelation, HasOneRelation, HasOneThroughRelation, MorphManyRelation, MorphOneRelation, MorphToManyRelation, MorphToRelation, MorphedByManyRelation, Relation, RelationTableLoader, SetBasedEagerLoader, SingleResultRelation };
|