arkormx 2.8.1 → 2.9.1

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.
@@ -355,6 +355,132 @@ declare class Paginator<T> {
355
355
  };
356
356
  }
357
357
  //#endregion
358
+ //#region src/JoinClause.d.ts
359
+ /**
360
+ * A fluent builder for the `on`/`where` constraints of a join clause.
361
+ *
362
+ * Instances are handed to the closure form of the query builder join helpers
363
+ * (for example `query.join('posts', join => join.on(...).where(...))`) and
364
+ * mirror Laravel's `JoinClause` surface. Column identifiers are treated as raw
365
+ * database identifiers (qualify them as `table.column` when needed).
366
+ *
367
+ * @author Legacy (3m1n3nc3)
368
+ */
369
+ declare class JoinClause {
370
+ private readonly constraints;
371
+ /**
372
+ * Adds a column-to-column `on` constraint, joined with `and`.
373
+ *
374
+ * Accepts either a closure (for a nested group) or a column comparison in
375
+ * the `(first, second)` or `(first, operator, second)` form.
376
+ *
377
+ * @param first The left-hand column or a nested closure.
378
+ * @param operator The comparison operator (defaults to `=`).
379
+ * @param second The right-hand column.
380
+ * @returns
381
+ */
382
+ on(first: string | ((join: JoinClause) => void), operator?: QueryScalarComparisonOperator | string, second?: string): this;
383
+ /**
384
+ * Adds a column-to-column `on` constraint, joined with `or`.
385
+ *
386
+ * @param first The left-hand column or a nested closure.
387
+ * @param operator The comparison operator (defaults to `=`).
388
+ * @param second The right-hand column.
389
+ * @returns
390
+ */
391
+ orOn(first: string | ((join: JoinClause) => void), operator?: QueryScalarComparisonOperator | string, second?: string): this;
392
+ /**
393
+ * Adds a column-to-value constraint, joined with `and`.
394
+ *
395
+ * @param column The column being compared.
396
+ * @param operator The comparison operator or the value when omitted.
397
+ * @param value The value to compare against.
398
+ * @returns
399
+ */
400
+ where(column: string, operator?: QueryComparisonOperator | string | DatabaseValue, value?: DatabaseValue): this;
401
+ /**
402
+ * Adds a column-to-value constraint, joined with `or`.
403
+ *
404
+ * @param column The column being compared.
405
+ * @param operator The comparison operator or the value when omitted.
406
+ * @param value The value to compare against.
407
+ * @returns
408
+ */
409
+ orWhere(column: string, operator?: QueryComparisonOperator | string | DatabaseValue, value?: DatabaseValue): this;
410
+ /**
411
+ * Adds an `is null` constraint joined with `and`.
412
+ *
413
+ * @param column The column to test for null.
414
+ * @returns
415
+ */
416
+ whereNull(column: string): this;
417
+ /**
418
+ * Adds an `is null` constraint joined with `or`.
419
+ *
420
+ * @param column The column to test for null.
421
+ * @returns
422
+ */
423
+ orWhereNull(column: string): this;
424
+ /**
425
+ * Adds an `is not null` constraint joined with `and`.
426
+ *
427
+ * @param column The column to test for non-null.
428
+ * @returns
429
+ */
430
+ whereNotNull(column: string): this;
431
+ /**
432
+ * Adds an `is not null` constraint joined with `or`.
433
+ *
434
+ * @param column The column to test for non-null.
435
+ * @returns
436
+ */
437
+ orWhereNotNull(column: string): this;
438
+ /**
439
+ * Adds a raw constraint joined with `and`.
440
+ *
441
+ * @param sql The raw SQL fragment (with `?` placeholders for bindings).
442
+ * @param bindings The values bound to the placeholders.
443
+ * @returns
444
+ */
445
+ onRaw(sql: string, bindings?: DatabaseValue[]): this;
446
+ /**
447
+ * Adds a raw constraint joined with `or`.
448
+ *
449
+ * @param sql The raw SQL fragment (with `?` placeholders for bindings).
450
+ * @param bindings The values bound to the placeholders.
451
+ * @returns
452
+ */
453
+ orOnRaw(sql: string, bindings?: DatabaseValue[]): this;
454
+ /**
455
+ * Returns the accumulated constraints for this join clause.
456
+ *
457
+ * @returns
458
+ */
459
+ getConstraints(): QueryJoinConstraint[];
460
+ private addOn;
461
+ private addWhere;
462
+ }
463
+ //#endregion
464
+ //#region src/types/query-builder.d.ts
465
+ type RelatedModelFromResult<TResult> = TResult extends ArkormCollection<infer TRelated> ? TRelated : Exclude<TResult, null | undefined>;
466
+ type RelatedModelForRelationship<TModel, TKey extends ModelRelationshipKey<TModel>> = TModel[TKey] extends ((...args: any[]) => infer TRelation) ? TRelation extends {
467
+ getResults: (...args: any[]) => Promise<infer TResult>;
468
+ } ? RelatedModelFromResult<TResult> : never : never;
469
+ /**
470
+ * The left-hand argument accepted by the join helpers: either a column name or a
471
+ * closure that configures the join constraints through a {@link JoinClause}.
472
+ */
473
+ type JoinOn = string | ((join: JoinClause) => void);
474
+ /**
475
+ * A subquery source accepted by the subquery/lateral join helpers.
476
+ */
477
+ type JoinSource = QueryBuilder<any, any> | string;
478
+ /**
479
+ * A callback that builds a parenthesized group of nested where conditions.
480
+ */
481
+ type WhereCallback<TModel, TDelegate extends ModelQuerySchemaLike> = (query: QueryBuilder<TModel, TDelegate>) => QueryBuilder<any, any> | void;
482
+ type EagerLoadRelations<TModel> = { [TKey in ModelRelationshipKey<TModel>]?: true | EagerLoadConstraint<QueryBuilder<RelatedModelForRelationship<TModel, TKey>, QuerySchemaForModelInstance<RelatedModelForRelationship<TModel, TKey>>>> };
483
+ //#endregion
358
484
  //#region src/types/relationship.d.ts
359
485
  type RelationResult = unknown[] | unknown | null;
360
486
  type RelationResultCache = WeakMap<object, Map<string, Map<unknown, Promise<RelationResult>>>>;
@@ -617,6 +743,17 @@ declare abstract class Relation<TModel> {
617
743
  whereFullText<TKey extends keyof ModelAttributes<TModel> & string>(columns: TKey | TKey[], value: string, options?: {
618
744
  language?: string;
619
745
  }): this;
746
+ /**
747
+ * Add an OR fulltext clause to the relationship query.
748
+ *
749
+ * @param columns
750
+ * @param value
751
+ * @param options
752
+ * @returns
753
+ */
754
+ orWhereFullText<TKey extends keyof ModelAttributes<TModel> & string>(columns: TKey | TKey[], value: string, options?: {
755
+ language?: string;
756
+ }): this;
620
757
  /**
621
758
  * Add a strongly-typed where key clause to the relationship query.
622
759
  *
@@ -673,6 +810,142 @@ declare abstract class Relation<TModel> {
673
810
  * @returns
674
811
  */
675
812
  whereLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
813
+ /**
814
+ * Add an OR string contains clause to the relationship query.
815
+ *
816
+ * @param key
817
+ * @param value
818
+ * @returns
819
+ */
820
+ orWhereLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
821
+ /**
822
+ * Add a negated string contains (NOT LIKE) clause to the relationship query.
823
+ *
824
+ * @param key
825
+ * @param value
826
+ * @returns
827
+ */
828
+ whereNotLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
829
+ /**
830
+ * Add an OR negated string contains (NOT LIKE) clause to the relationship query.
831
+ *
832
+ * @param key
833
+ * @param value
834
+ * @returns
835
+ */
836
+ orWhereNotLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
837
+ /**
838
+ * Add a JSON containment clause to the relationship query.
839
+ *
840
+ * @param key
841
+ * @param value
842
+ * @returns
843
+ */
844
+ whereJsonContains(column: string, value: DatabaseValue): this;
845
+ /**
846
+ * OR variant of whereJsonContains().
847
+ *
848
+ * @param column
849
+ * @param value
850
+ * @returns
851
+ */
852
+ orWhereJsonContains(column: string, value: DatabaseValue): this;
853
+ /**
854
+ * Add a negated JSON containment clause to the relationship query.
855
+ *
856
+ * @param column
857
+ * @param value
858
+ * @returns
859
+ */
860
+ whereJsonDoesntContain(column: string, value: DatabaseValue): this;
861
+ /**
862
+ * OR variant of whereJsonDoesntContain().
863
+ *
864
+ * @param column
865
+ * @param value
866
+ * @returns
867
+ */
868
+ orWhereJsonDoesntContain(column: string, value: DatabaseValue): this;
869
+ /**
870
+ * Add a JSON key-existence clause to the relationship query.
871
+ *
872
+ * @param column
873
+ * @param value
874
+ * @returns
875
+ */
876
+ whereJsonContainsKey(column: string): this;
877
+ /**
878
+ * OR variant of whereJsonContainsKey().
879
+ *
880
+ * @param column
881
+ * @returns
882
+ */
883
+ orWhereJsonContainsKey(column: string): this;
884
+ /**
885
+ * Add a negated JSON key-existence clause to the relationship query.
886
+ *
887
+ * @param column
888
+ * @returns
889
+ */
890
+ whereJsonDoesntContainKey(column: string): this;
891
+ /**
892
+ * OR variant of whereJsonDoesntContainKey().
893
+ *
894
+ * @param column
895
+ * @returns
896
+ */
897
+ orWhereJsonDoesntContainKey(column: string): this;
898
+ /**
899
+ * Add a JSON array-length clause to the relationship query.
900
+ *
901
+ * @param column
902
+ * @returns
903
+ */
904
+ whereJsonLength(column: string, value: number): this;
905
+ whereJsonLength(column: string, operator: QueryScalarComparisonOperator, value: number): this;
906
+ /**
907
+ * OR variant of whereJsonLength().
908
+ *
909
+ * @param column
910
+ * @param value
911
+ */
912
+ orWhereJsonLength(column: string, value: number): this;
913
+ orWhereJsonLength(column: string, operator: QueryScalarComparisonOperator, value: number): this;
914
+ /**
915
+ * Add a JSON array overlap clause to the relationship query.
916
+ *
917
+ * @param column
918
+ * @param value
919
+ */
920
+ whereJsonOverlaps(column: string, value: DatabaseValue): this;
921
+ /**
922
+ * OR variant of whereJsonOverlaps().
923
+ *
924
+ * @param column
925
+ * @param value
926
+ */
927
+ orWhereJsonOverlaps(column: string, value: DatabaseValue): this;
928
+ /**
929
+ * Add a HAVING clause to the relationship query.
930
+ *
931
+ * @param column
932
+ * @param value
933
+ */
934
+ having(column: string, value: DatabaseValue): this;
935
+ having(column: string, operator: QueryScalarComparisonOperator, value: DatabaseValue): this;
936
+ /**
937
+ * Add an OR HAVING clause to the relationship query.
938
+ */
939
+ orHaving(column: string, value: DatabaseValue): this;
940
+ orHaving(column: string, operator: QueryScalarComparisonOperator, value: DatabaseValue): this;
941
+ /**
942
+ * Add a raw HAVING clause to the relationship query.
943
+ */
944
+ havingRaw(sql: string, bindings?: unknown[]): this;
945
+ /**
946
+ * Add a raw OR HAVING clause to the relationship query.
947
+ */
948
+ orHavingRaw(sql: string, bindings?: unknown[]): this;
676
949
  /**
677
950
  * Add a string starts-with clause to the relationship query.
678
951
  *
@@ -2940,127 +3213,7 @@ type ModelLifecycleState = {
2940
3213
  globalScopesSuppressed: number;
2941
3214
  };
2942
3215
  //#endregion
2943
- //#region src/JoinClause.d.ts
2944
- /**
2945
- * A fluent builder for the `on`/`where` constraints of a join clause.
2946
- *
2947
- * Instances are handed to the closure form of the query builder join helpers
2948
- * (for example `query.join('posts', join => join.on(...).where(...))`) and
2949
- * mirror Laravel's `JoinClause` surface. Column identifiers are treated as raw
2950
- * database identifiers (qualify them as `table.column` when needed).
2951
- *
2952
- * @author Legacy (3m1n3nc3)
2953
- */
2954
- declare class JoinClause {
2955
- private readonly constraints;
2956
- /**
2957
- * Adds a column-to-column `on` constraint, joined with `and`.
2958
- *
2959
- * Accepts either a closure (for a nested group) or a column comparison in
2960
- * the `(first, second)` or `(first, operator, second)` form.
2961
- *
2962
- * @param first The left-hand column or a nested closure.
2963
- * @param operator The comparison operator (defaults to `=`).
2964
- * @param second The right-hand column.
2965
- * @returns
2966
- */
2967
- on(first: string | ((join: JoinClause) => void), operator?: QueryScalarComparisonOperator | string, second?: string): this;
2968
- /**
2969
- * Adds a column-to-column `on` constraint, joined with `or`.
2970
- *
2971
- * @param first The left-hand column or a nested closure.
2972
- * @param operator The comparison operator (defaults to `=`).
2973
- * @param second The right-hand column.
2974
- * @returns
2975
- */
2976
- orOn(first: string | ((join: JoinClause) => void), operator?: QueryScalarComparisonOperator | string, second?: string): this;
2977
- /**
2978
- * Adds a column-to-value constraint, joined with `and`.
2979
- *
2980
- * @param column The column being compared.
2981
- * @param operator The comparison operator or the value when omitted.
2982
- * @param value The value to compare against.
2983
- * @returns
2984
- */
2985
- where(column: string, operator?: QueryComparisonOperator | string | DatabaseValue, value?: DatabaseValue): this;
2986
- /**
2987
- * Adds a column-to-value constraint, joined with `or`.
2988
- *
2989
- * @param column The column being compared.
2990
- * @param operator The comparison operator or the value when omitted.
2991
- * @param value The value to compare against.
2992
- * @returns
2993
- */
2994
- orWhere(column: string, operator?: QueryComparisonOperator | string | DatabaseValue, value?: DatabaseValue): this;
2995
- /**
2996
- * Adds an `is null` constraint joined with `and`.
2997
- *
2998
- * @param column The column to test for null.
2999
- * @returns
3000
- */
3001
- whereNull(column: string): this;
3002
- /**
3003
- * Adds an `is null` constraint joined with `or`.
3004
- *
3005
- * @param column The column to test for null.
3006
- * @returns
3007
- */
3008
- orWhereNull(column: string): this;
3009
- /**
3010
- * Adds an `is not null` constraint joined with `and`.
3011
- *
3012
- * @param column The column to test for non-null.
3013
- * @returns
3014
- */
3015
- whereNotNull(column: string): this;
3016
- /**
3017
- * Adds an `is not null` constraint joined with `or`.
3018
- *
3019
- * @param column The column to test for non-null.
3020
- * @returns
3021
- */
3022
- orWhereNotNull(column: string): this;
3023
- /**
3024
- * Adds a raw constraint joined with `and`.
3025
- *
3026
- * @param sql The raw SQL fragment (with `?` placeholders for bindings).
3027
- * @param bindings The values bound to the placeholders.
3028
- * @returns
3029
- */
3030
- onRaw(sql: string, bindings?: DatabaseValue[]): this;
3031
- /**
3032
- * Adds a raw constraint joined with `or`.
3033
- *
3034
- * @param sql The raw SQL fragment (with `?` placeholders for bindings).
3035
- * @param bindings The values bound to the placeholders.
3036
- * @returns
3037
- */
3038
- orOnRaw(sql: string, bindings?: DatabaseValue[]): this;
3039
- /**
3040
- * Returns the accumulated constraints for this join clause.
3041
- *
3042
- * @returns
3043
- */
3044
- getConstraints(): QueryJoinConstraint[];
3045
- private addOn;
3046
- private addWhere;
3047
- }
3048
- //#endregion
3049
3216
  //#region src/QueryBuilder.d.ts
3050
- type RelatedModelFromResult<TResult> = TResult extends ArkormCollection<infer TRelated> ? TRelated : Exclude<TResult, null | undefined>;
3051
- type RelatedModelForRelationship<TModel, TKey extends ModelRelationshipKey<TModel>> = TModel[TKey] extends ((...args: any[]) => infer TRelation) ? TRelation extends {
3052
- getResults: (...args: any[]) => Promise<infer TResult>;
3053
- } ? RelatedModelFromResult<TResult> : never : never;
3054
- /**
3055
- * The left-hand argument accepted by the join helpers: either a column name or a
3056
- * closure that configures the join constraints through a {@link JoinClause}.
3057
- */
3058
- type JoinOn = string | ((join: JoinClause) => void);
3059
- /**
3060
- * A subquery source accepted by the subquery/lateral join helpers.
3061
- */
3062
- type JoinSource = QueryBuilder<any, any> | string;
3063
- type EagerLoadRelations<TModel> = { [TKey in ModelRelationshipKey<TModel>]?: true | EagerLoadConstraint<QueryBuilder<RelatedModelForRelationship<TModel, TKey>, QuerySchemaForModelInstance<RelatedModelForRelationship<TModel, TKey>>>> };
3064
3217
  /**
3065
3218
  * The QueryBuilder class provides a fluent interface for building and
3066
3219
  * executing database queries.
@@ -3079,6 +3232,7 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
3079
3232
  private querySelect?;
3080
3233
  private queryDistinct;
3081
3234
  private queryGroupBy?;
3235
+ private queryHaving?;
3082
3236
  private queryJoins?;
3083
3237
  private offsetValue?;
3084
3238
  private limitValue?;
@@ -3099,17 +3253,33 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
3099
3253
  * Adds a where clause to the query. Multiple calls to where will combine
3100
3254
  * the clauses with AND logic.
3101
3255
  *
3256
+ * Pass a callback to build a parenthesized group of nested conditions, e.g.
3257
+ * `where(query => query.where({ a: 1 }).orWhere({ b: 2 }))` compiles to
3258
+ * `(... or ...)`.
3259
+ *
3102
3260
  * @param where
3103
3261
  * @returns
3104
3262
  */
3105
3263
  where(where: QuerySchemaWhere<TDelegate>): this;
3264
+ where(callback: WhereCallback<TModel, TDelegate>): this;
3106
3265
  /**
3107
- * Adds an OR where clause to the query.
3266
+ * Adds an OR where clause to the query. Pass a callback to build a
3267
+ * parenthesized group of nested conditions.
3108
3268
  *
3109
3269
  * @param where
3110
3270
  * @returns
3111
3271
  */
3112
3272
  orWhere(where: QuerySchemaWhere<TDelegate>): this;
3273
+ orWhere(callback: WhereCallback<TModel, TDelegate>): this;
3274
+ /**
3275
+ * Resolve a callback into a parenthesized group condition and append it.
3276
+ */
3277
+ private appendNestedWhere;
3278
+ /**
3279
+ * Returns the user-authored where condition for nesting, excluding any
3280
+ * soft-delete predicate (the parent query owns that).
3281
+ */
3282
+ private getNestedWhereCondition;
3113
3283
  /**
3114
3284
  * Adds a NOT where clause to the query.
3115
3285
  *
@@ -3301,6 +3471,17 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
3301
3471
  whereFullText<TKey extends keyof ModelAttributes<TModel> & string>(columns: TKey | TKey[], value: string, options?: {
3302
3472
  language?: string;
3303
3473
  }): this;
3474
+ /**
3475
+ * Adds an OR fulltext clause for columns that have full text indexes.
3476
+ *
3477
+ * @param columns
3478
+ * @param value
3479
+ * @param options
3480
+ * @returns
3481
+ */
3482
+ orWhereFullText<TKey extends keyof ModelAttributes<TModel> & string>(columns: TKey | TKey[], value: string, options?: {
3483
+ language?: string;
3484
+ }): this;
3304
3485
  /**
3305
3486
  * Adds a strongly-typed inequality where clause for a single attribute key.
3306
3487
  *
@@ -3333,6 +3514,138 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
3333
3514
  * @returns
3334
3515
  */
3335
3516
  whereLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
3517
+ /**
3518
+ * Adds an OR string contains clause for a single attribute key.
3519
+ *
3520
+ * @param key
3521
+ * @param value
3522
+ * @returns
3523
+ */
3524
+ orWhereLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
3525
+ /**
3526
+ * Adds a negated string contains (NOT LIKE) clause for a single attribute key.
3527
+ *
3528
+ * @param key
3529
+ * @param value
3530
+ * @returns
3531
+ */
3532
+ whereNotLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
3533
+ /**
3534
+ * Adds an OR negated string contains (NOT LIKE) clause for a single attribute key.
3535
+ *
3536
+ * @param key
3537
+ * @param value
3538
+ * @returns
3539
+ */
3540
+ orWhereNotLike<TKey extends keyof ModelAttributes<TModel> & string>(key: TKey, value: Extract<ModelAttributes<TModel>[TKey], string>): this;
3541
+ /**
3542
+ * Append a structured JSON predicate, splitting a `column->path->key`
3543
+ * expression into its base column and nested path segments.
3544
+ *
3545
+ * @param boolean
3546
+ * @param kind
3547
+ * @param column
3548
+ * @param options
3549
+ * @returns
3550
+ */
3551
+ private appendJsonCondition;
3552
+ /**
3553
+ * Adds a clause asserting the JSON column contains the given value
3554
+ * (PostgreSQL `@>` containment).
3555
+ *
3556
+ * @param column
3557
+ * @param value
3558
+ * @returns
3559
+ */
3560
+ whereJsonContains(column: string, value: DatabaseValue): this;
3561
+ /**
3562
+ * OR variant of whereJsonContains().
3563
+ *
3564
+ * @param column
3565
+ * @param value
3566
+ * @returns
3567
+ */
3568
+ orWhereJsonContains(column: string, value: DatabaseValue): this;
3569
+ /**
3570
+ * Adds a clause asserting the JSON column does not contain the given value.
3571
+ *
3572
+ * @param column
3573
+ * @param value
3574
+ * @returns
3575
+ */
3576
+ whereJsonDoesntContain(column: string, value: DatabaseValue): this;
3577
+ /**
3578
+ * OR variant of whereJsonDoesntContain().
3579
+ *
3580
+ * @param column
3581
+ * @param value
3582
+ * @returns
3583
+ */
3584
+ orWhereJsonDoesntContain(column: string, value: DatabaseValue): this;
3585
+ /**
3586
+ * Adds a clause asserting the JSON document contains the given key/path.
3587
+ *
3588
+ * @param column
3589
+ * @returns
3590
+ */
3591
+ whereJsonContainsKey(column: string): this;
3592
+ /**
3593
+ * OR variant of whereJsonContainsKey().
3594
+ *
3595
+ * @param column
3596
+ * @returns
3597
+ */
3598
+ orWhereJsonContainsKey(column: string): this;
3599
+ /**
3600
+ * Adds a clause asserting the JSON document does not contain the given key/path.
3601
+ *
3602
+ * @param column
3603
+ * @returns
3604
+ */
3605
+ whereJsonDoesntContainKey(column: string): this;
3606
+ /**
3607
+ * OR variant of whereJsonDoesntContainKey().
3608
+ *
3609
+ * @param column
3610
+ * @returns
3611
+ */
3612
+ orWhereJsonDoesntContainKey(column: string): this;
3613
+ /**
3614
+ * Adds a clause comparing the length of a JSON array column.
3615
+ *
3616
+ * @param column
3617
+ * @param operatorOrValue
3618
+ * @param maybeValue
3619
+ * @returns
3620
+ */
3621
+ whereJsonLength(column: string, value: number): this;
3622
+ whereJsonLength(column: string, operator: QueryScalarComparisonOperator, value: number): this;
3623
+ /**
3624
+ * OR variant of whereJsonLength().
3625
+ *
3626
+ * @param column
3627
+ * @param value
3628
+ */
3629
+ orWhereJsonLength(column: string, value: number): this;
3630
+ orWhereJsonLength(column: string, operator: QueryScalarComparisonOperator, value: number): this;
3631
+ private resolveJsonLengthArgs;
3632
+ /**
3633
+ * Adds a clause asserting the JSON array column overlaps with the given
3634
+ * array (shares at least one element).
3635
+ *
3636
+ * @param column
3637
+ * @param value
3638
+ * @returns
3639
+ */
3640
+ whereJsonOverlaps(column: string, value: DatabaseValue): this;
3641
+ /**
3642
+ * OR variant of whereJsonOverlaps().
3643
+ *
3644
+ * @param column
3645
+ * @param value
3646
+ * @returns
3647
+ */
3648
+ orWhereJsonOverlaps(column: string, value: DatabaseValue): this;
3336
3649
  /**
3337
3650
  * Adds a string starts-with clause for a single attribute key.
3338
3651
  *
@@ -3680,6 +3993,47 @@ declare class QueryBuilder<TModel, TDelegate extends ModelQuerySchemaLike = Mode
3680
3993
  */
3681
3994
  groupBy<TKey extends keyof ModelAttributes<TModel> & string>(columns: TKey[]): this;
3682
3995
  groupBy<TKey extends keyof ModelAttributes<TModel> & string>(...columns: TKey[]): this;
3996
+ private appendHavingCondition;
3997
+ private buildHavingComparison;
3998
+ /**
3999
+ * Adds a HAVING clause to filter grouped rows. Accepts either
4000
+ * `having(column, value)` (defaulting to equality) or
4001
+ * `having(column, operator, value)`. Multiple calls combine with AND.
4002
+ *
4003
+ * @param column
4004
+ * @param operatorOrValue
4005
+ * @param maybeValue
4006
+ * @returns
4007
+ */
4008
+ having(column: string, value: DatabaseValue): this;
4009
+ having(column: string, operator: QueryScalarComparisonOperator, value: DatabaseValue): this;
4010
+ /**
4011
+ * Adds an OR HAVING clause to filter grouped rows.
4012
+ *
4013
+ * @param column
4014
+ * @param operatorOrValue
4015
+ * @param maybeValue
4016
+ * @returns
4017
+ */
4018
+ orHaving(column: string, value: DatabaseValue): this;
4019
+ orHaving(column: string, operator: QueryScalarComparisonOperator, value: DatabaseValue): this;
4020
+ /**
4021
+ * Adds a raw HAVING clause, useful for filtering on aggregate expressions
4022
+ * such as `count(*)`. Combines with previous HAVING clauses using AND.
4023
+ *
4024
+ * @param sql
4025
+ * @param bindings
4026
+ * @returns
4027
+ */
4028
+ havingRaw(sql: string, bindings?: unknown[]): this;
4029
+ /**
4030
+ * Adds a raw OR HAVING clause.
4031
+ *
4032
+ * @param sql
4033
+ * @param bindings
4034
+ * @returns
4035
+ */
4036
+ orHavingRaw(sql: string, bindings?: unknown[]): this;
3683
4037
  /**
3684
4038
  * Adds a join clause to the query.
3685
4039
  *
@@ -4774,11 +5128,25 @@ interface QueryFullTextCondition {
4774
5128
  value: string;
4775
5129
  language?: string;
4776
5130
  }
5131
+ type QueryJsonConditionKind = 'contains' | 'contains-key' | 'length' | 'overlaps';
5132
+ interface QueryJsonCondition {
5133
+ type: 'json';
5134
+ kind: QueryJsonConditionKind;
5135
+ column: string;
5136
+ /** Nested JSON path segments below the base column (e.g. `data->meta->lang`). */
5137
+ path?: string[];
5138
+ /** Negates the predicate (doesntContain / doesntContainKey). */
5139
+ not?: boolean;
5140
+ /** JSON value for `contains`/`overlaps`, or the integer length for `length`. */
5141
+ value?: DatabaseValue;
5142
+ /** Comparison operator used by the `length` kind. */
5143
+ operator?: QueryScalarComparisonOperator;
5144
+ }
4777
5145
  interface RawQuerySpec {
4778
5146
  sql: string;
4779
5147
  bindings?: DatabaseValue[];
4780
5148
  }
4781
- type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryFullTextCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
5149
+ type QueryCondition = QueryComparisonCondition | QueryColumnComparisonCondition | QueryTimeCondition | QueryDayCondition | QueryExistsCondition | QueryFullTextCondition | QueryJsonCondition | QueryGroupCondition | QueryNotCondition | QueryRawCondition;
4782
5150
  interface AggregateSelection {
4783
5151
  type: AggregateOperation;
4784
5152
  column?: string;
@@ -4858,6 +5226,7 @@ interface SelectSpec<TModel = unknown> {
4858
5226
  columns?: QuerySelectColumn[];
4859
5227
  distinct?: boolean;
4860
5228
  groupBy?: string[];
5229
+ having?: QueryCondition;
4861
5230
  joins?: QueryJoin[];
4862
5231
  where?: QueryCondition;
4863
5232
  orderBy?: QueryOrderBy[];
@@ -5106,6 +5475,7 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
5106
5475
  private buildSelectList;
5107
5476
  private buildOrderBy;
5108
5477
  private buildGroupBy;
5478
+ private buildHavingClause;
5109
5479
  private buildJoinClause;
5110
5480
  private joinKeyword;
5111
5481
  private buildJoinSource;
@@ -5120,6 +5490,8 @@ declare class KyselyDatabaseAdapter implements DatabaseAdapter {
5120
5490
  private buildDayCondition;
5121
5491
  private buildExistsCondition;
5122
5492
  private buildFullTextCondition;
5493
+ private buildJsonAccessor;
5494
+ private buildJsonCondition;
5123
5495
  private buildWhereCondition;
5124
5496
  private buildWhereClause;
5125
5497
  private buildPaginationClause;
@@ -7396,4 +7768,4 @@ declare class URLDriver {
7396
7768
  url(page: number): string;
7397
7769
  }
7398
7770
  //#endregion
7399
- export { buildRelationLine as $, AttributeUpdateInput as $a, GetUserConfig as $i, RuntimePathMap as $n, ArkormCollection as $o, QueryFullTextCondition as $r, getPersistedColumnMap as $t, isTransactionCapableClient as A, QuerySchemaUpdateData as Aa, AdapterQueryInspection as Ai, ForeignKeyBuilder as An, MorphManyRelation as Ao, AdapterModelFieldStructure as Ar, GeneratedMigrationFile as As, createEmptyAppliedMigrationsState as At, applyDropTableOperation as B, TransactionOptions as Ba, DelegateCreateData as Bi, MakeFactoryCommand as Bn, RelationAggregateConstraint as Bo, DatabaseRow as Br, SchemaIndex as Bs, removeAppliedMigration as Bt, getRuntimeDebugHandler as C, QuerySchemaInclude as Ca, SelectSpec as Ci, ArkormException as Cn, InlineFactory as Co, createPrismaDatabaseAdapter as Cr, PivotModelStatic as Cs, supportsDatabaseMigrationExecution as Ct, getUserConfig as D, QuerySchemaSelect as Da, UpdateSpec as Di, SchemaBuilder as Dn, MorphToRelation as Do, AdapterCapability as Dr, AppliedMigrationRun as Ds, buildMigrationIdentity as Dt, getRuntimePrismaClient as E, QuerySchemaRows as Ea, UpdateManySpec as Ei, Migration as En, SetBasedEagerLoader as Eo, AdapterCapabilities as Er, AppliedMigrationEntry as Es, toModelName as Et, PRISMA_ENUM_MEMBER_REGEX as F, SimplePaginationMeta as Fa, CastDefinition as Fi, MigrateFreshCommand as Fn, BelongsToRelation as Fo, AggregateOperation as Fr, PrismaSchemaSyncOptions as Fs, isMigrationApplied as Ft, applyOperationsToPrismaSchema as G, JoinSource as Ga, DelegateRows as Gi, AttributeOptions as Gn, RelationDefaultResolver as Go, InsertManySpec as Gr, SchemaTableDropOperation as Gs, PersistedColumnMappingsState as Gt, applyMigrationRollbackToPrismaSchema as H, RelationshipModelStatic as Ha, DelegateInclude as Hi, CliApp as Hn, RelationAggregateType as Ho, DatabaseValue as Hr, SchemaPrimaryKey as Hs, supportsDatabaseMigrationState as Ht, PRISMA_ENUM_REGEX as I, SoftDeleteConfig as Ia, CastHandler as Ii, MigrateCommand as In, SingleResultRelation as Io, AggregateSelection as Ir, SchemaColumn as Is, markMigrationApplied as It, buildIndexLine as J, AttributeCreateInput as Ja, DelegateUpdateArgs as Ji, RegisteredFactory as Jn, RelationResult as Jo, QueryComparisonCondition as Jr, TimestampNames as Js, PersistedTableMetadata as Jt, buildEnumBlock as K, QueryBuilder as Ka, DelegateSelect as Ki, Arkorm as Kn, RelationDefaultValue as Ko, InsertSpec as Kr, SchemaUniqueConstraint as Ks, PersistedMetadataFeatures as Kt, PRISMA_MODEL_REGEX as L, TransactionCallback as La, CastMap as Li, MakeSeederCommand as Ln, BelongsToManyRelation as Lo, AggregateSpec as Lr, SchemaColumnType as Ls, markMigrationRun as Lt, resetArkormRuntimeForTests as M, RawSelectInput as Ma, ArkormConfig as Mi, ModelsSyncCommand as Mn, HasOneRelation as Mo, AdapterModelStructure as Mr, MigrationInstanceLike as Ms, findAppliedMigration as Mt, runArkormTransaction as N, RuntimeClientLike as Na, ArkormDebugEvent as Ni, MigrationHistoryCommand as Nn, HasManyThroughRelation as No, AdapterQueryOperation as Nr, PrimaryKeyGeneration as Ns, getLastMigrationRun as Nt, isDelegateLike as O, QuerySchemaUniqueWhere as Oa, UpsertSpec as Oi, EnumBuilder as On, MorphToManyRelation as Oo, AdapterDatabaseCreationResult as Or, AppliedMigrationsState as Os, buildMigrationRunId as Ot, PrimaryKeyGenerationPlanner as P, Serializable as Pa, ArkormDebugHandler as Pi, MigrateRollbackCommand as Pn, HasManyRelation as Po, AdapterTransactionContext as Pr, PrismaMigrationWorkflowOptions as Ps, getLatestAppliedMigrations as Pt, buildPrimaryKeyLine as Q, AttributeSelect as Qa, EagerLoadMap as Qi, RuntimePathKey as Qn, Paginator as Qo, QueryExistsCondition as Qr, deletePersistedColumnMappingsState as Qt, applyAlterTableOperation as R, TransactionCapableClient as Ra, CastType as Ri, MakeModelCommand as Rn, Relation as Ro, DatabaseAdapter as Rr, SchemaForeignKey as Rs, readAppliedMigrationsState as Rt, getRuntimeClient as S, QuerySchemaFindManyArgs as Sa, RelationLoadSpec as Si, ArkormErrorContext as Sn, Model as So, createPrismaCompatibilityAdapter as Sr, MorphToRelationMetadata as Ss, supportsDatabaseCreation as St, getRuntimePaginationURLDriverFactory as T, QuerySchemaRow as Ta, SortDirection as Ti, MIGRATION_BRAND as Tn, defineFactory as To, createKyselyAdapter as Tr, RelationMetadataType as Ts, toMigrationFileSlug as Tt, applyMigrationToDatabase as U, EagerLoadRelations as Ua, DelegateOrderBy as Ui, resolveCast as Un, RelationColumnLookupSpec as Uo, DeleteManySpec as Ur, SchemaTableAlterOperation as Us, writeAppliedMigrationsState as Ut, applyMigrationRollbackToDatabase as V, ModelStatic as Va, DelegateFindManyArgs as Vi, InitCommand as Vn, RelationAggregateInput as Vo, DatabaseRows as Vr, SchemaOperation as Vs, resolveMigrationStateFilePath as Vt, applyMigrationToPrismaSchema as W, JoinOn as Wa, DelegateRow as Wi, Attribute as Wn, RelationConstraint as Wo, DeleteSpec as Wr, SchemaTableCreateOperation as Ws, writeAppliedMigrationsStateToStore as Wt, buildMigrationSource as X, AttributeQuerySchema as Xa, DelegateWhere as Xi, RuntimeConstructor as Xn, RelationTableLookupSpec as Xo, QueryCondition as Xr, applyOperationsToPersistedColumnMappingsState as Xt, buildInverseRelationLine as Y, AttributeOrderBy as Ya, DelegateUpdateData as Yi, RegisteredModel as Yn, RelationResultCache as Yo, QueryComparisonOperator as Yr, TimestampNaming as Ys, PersistedTimestampColumn as Yt, buildModelBlock as Z, AttributeSchemaDelegate as Za, EagerLoadConstraint as Zi, RuntimePathInput as Zn, LengthAwarePaginator as Zo, QueryDayCondition as Zr, createEmptyPersistedColumnMappingsState as Zt, ensureArkormConfigLoading as _, PrismaTransactionCallback as _a, QueryTimeCondition as _i, QueryExecutionException as _n, ModelUpdateData as _o, SeederCallArgument as _r, HasOneThroughRelationMetadata as _s, resolveMigrationClassName as _t, getRuntimeCompatibilityAdapter as a, PaginationOptions as aa, QueryJoinNestedConstraint as ai, readPersistedColumnMappingsState as an, ModelAttributesOf as ao, loadFactoriesFrom as ar, FactoryModelConstructor as as, deriveRelationFieldName as at, getDefaultStubsPath as b, PrismaTransactionOptions as ba, RelationFilterSpec as bi, ModelNotFoundException as bn, QuerySchemaForModelInstance as bo, PrismaDatabaseAdapter as br, MorphOneRelationMetadata as bs, runPrismaCommand as bt, PrismaDelegateMap as c, PrismaClientLike as ca, QueryJoinType as ci, resolveColumnMappingsFilePath as cn, ModelEventDispatcher as co, loadSeedersFrom as cr, MaybePromise as cs, findEnumBlock as ct, inferDelegateName as d, PrismaLikeInclude as da, QueryNotCondition as di, validatePersistedMetadataFeaturesForMigrations as dn, ModelEventListener as do, registerModels as dr, BelongsToManyRelationMetadata as ds, formatEnumDefaultValue as dt, ModelQuerySchemaLike as ea, QueryGroupCondition as ei, getPersistedEnumMap as en, AttributeWhereInput as eo, getRegisteredFactories as er, FactoryAttributeResolver as es, buildUniqueConstraintLine as et, awaitConfiguredModelsRegistration as f, PrismaLikeOrderBy as fa, QueryOrderBy as fi, writePersistedColumnMappingsState as fn, ModelEventName as fo, registerPaths as fr, BelongsToRelationMetadata as fs, formatRelationAction as ft, emitRuntimeDebugEvent as g, PrismaLikeWhereInput as ga, QueryTarget as gi, RelationResolutionException as gn, ModelRelationshipResult as go, Seeder as gr, HasOneRelationMetadata as gs, resolveEnumName as gt, defineConfig as h, PrismaLikeSortOrder as ha, QuerySelectColumn as hi, ScopeNotDefinedException as hn, ModelRelationshipKey as ho, SEEDER_BRAND as hr, HasManyThroughRelationMetadata as hs, pad as ht, RuntimeModuleLoader as i, PaginationMeta as ia, QueryJoinConstraint as ii, getPersistedTimestampColumns as in, ModelAttributes as io, getRegisteredSeeders as ir, FactoryDefinitionAttributes as is, deriveRelationAlias as it, loadArkormConfig as j, QuerySchemaWhere as ja, ArkormBootContext as ji, SeedCommand as jn, HasOneThroughRelation as jo, AdapterModelIntrospectionOptions as jr, MigrationClass as js, deleteAppliedMigrationsStateFromStore as jt, isQuerySchemaLike as k, QuerySchemaUpdateArgs as ka, AdapterBindableModel as ki, TableBuilder as kn, MorphOneRelation as ko, AdapterInspectionRequest as kr, GenerateMigrationOptions as ks, computeMigrationChecksum as kt, createPrismaAdapter as l, PrismaDelegateLike as la, QueryJoinValueConstraint as li, resolvePersistedMetadataFeatures as ln, ModelEventHandler as lo, registerFactories as lr, DatabaseTableOptions as ls, findModelBlock as lt, configureArkormRuntime as m, PrismaLikeSelect as ma, QueryScalarComparisonOperator as mi, UniqueConstraintResolutionException as mn, ModelOrderByInput as mo, resetRuntimeRegistryForTests as mr, HasManyRelationMetadata as ms, getMigrationPlan as mt, PivotModel as n, NamingCase as na, QueryJoinBoolean as ni, getPersistedPrimaryKeyGeneration as nn, GlobalScope as no, getRegisteredModels as nr, FactoryCallback as ns, deriveCollectionFieldName as nt, resolveRuntimeCompatibilityQuerySchema as o, PaginationURLDriver as oa, QueryJoinNullConstraint as oi, rebuildPersistedColumnMappingsState as on, ModelCreateData as oo, loadMigrationsFrom as or, FactoryRelationshipResolver as os, deriveSingularFieldName as ot, bindAdapterToModels as p, PrismaLikeScalarFilter as pa, QueryRawCondition as pi, UnsupportedAdapterFeatureException as pn, ModelLifecycleState as po, registerSeeders as pr, ColumnMap as ps, generateMigrationFile as pt, buildFieldLine as q, JoinClause as qa, DelegateUniqueWhere as qi, Arkormx as qn, RelationMetadataProvider as qo, QueryColumnComparisonCondition as qr, TimestampColumnBehavior as qs, PersistedPrimaryKeyGeneration as qt, LoadedRuntimeModule as r, PaginationCurrentPageResolver as ra, QueryJoinColumnConstraint as ri, getPersistedTableMetadata as rn, ModelAttributeValue as ro, getRegisteredPaths as rr, FactoryDefinition as rs, deriveInverseRelationAlias as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, PaginationURLDriverFactory as sa, QueryJoinRawConstraint as si, resetPersistedColumnMappingsCache as sn, ModelDeclaredAttributeKey as so, loadModelsFrom as sr, FactoryState as ss, escapeRegex as st, URLDriver as t, ModelTableCase as ta, QueryJoin as ti, getPersistedEnumTsType as tn, DelegateForModelSchema as to, getRegisteredMigrations as tr, FactoryAttributes as ts, createMigrationTimestamp as tt, createPrismaDelegateMap as u, PrismaFindManyArgsLike as ua, QueryLogicalOperator as ui, syncPersistedColumnMappingsFromState as un, ModelEventHandlerConstructor as uo, registerMigrations as ur, DatabaseTablePersistedMetadataOptions as us, formatDefaultValue as ut, getActiveTransactionAdapter as v, PrismaTransactionCapableClient as va, RawQuerySpec as vi, QueryExecutionExceptionContext as vn, ModelWhereInput as vo, SeederConstructor as vr, ModelMetadata as vs, resolvePrismaType as vt, getRuntimePaginationCurrentPageResolver as w, QuerySchemaOrderBy as wa, SoftDeleteQueryMode as wi, DB as wn, ModelFactory as wo, KyselyDatabaseAdapter as wr, RelationMetadata as ws, supportsDatabaseReset as wt, getRuntimeAdapter as x, QuerySchemaCreateData as xa, RelationLoadPlan as xi, MissingDelegateException as xn, RelatedModelClass as xo, PrismaDelegateNameMapping as xr, MorphToManyRelationMetadata as xs, stripPrismaSchemaModelsAndEnums as xt, getActiveTransactionClient as y, PrismaTransactionContext as ya, RelationAggregateSpec as yi, QueryConstraintException as yn, QuerySchemaForModel as yo, SeederInput as yr, MorphManyRelationMetadata as ys, runMigrationWithPrisma as yt, applyCreateTableOperation as z, TransactionContext as za, ClientResolver as zi, MakeMigrationCommand as zn, RelationTableLoader as zo, DatabasePrimitive as zr, SchemaForeignKeyAction as zs, readAppliedMigrationsStateFromStore as zt };
7771
+ export { buildRelationLine as $, DelegateForModelSchema as $a, EagerLoadConstraint as $i, RuntimePathMap as $n, RelatedModelFromResult as $o, QueryFullTextCondition as $r, TimestampNames as $s, getPersistedColumnMap as $t, isTransactionCapableClient as A, QuerySchemaUniqueWhere as Aa, UpsertSpec as Ai, ForeignKeyBuilder as An, HasOneRelation as Ao, AdapterModelFieldStructure as Ar, RelationMetadataType as As, createEmptyAppliedMigrationsState as At, applyDropTableOperation as B, TransactionCapableClient as Ba, CastType as Bi, MakeFactoryCommand as Bn, RelationAggregateType as Bo, DatabaseRow as Br, PrismaSchemaSyncOptions as Bs, removeAppliedMigration as Bt, getRuntimeDebugHandler as C, QuerySchemaCreateData as Ca, RelationLoadPlan as Ci, ArkormException as Cn, defineFactory as Co, createPrismaDatabaseAdapter as Cr, ModelMetadata as Cs, supportsDatabaseMigrationExecution as Ct, getUserConfig as D, QuerySchemaRow as Da, SortDirection as Di, SchemaBuilder as Dn, MorphOneRelation as Do, AdapterCapability as Dr, MorphToRelationMetadata as Ds, buildMigrationIdentity as Dt, getRuntimePrismaClient as E, QuerySchemaOrderBy as Ea, SoftDeleteQueryMode as Ei, Migration as En, MorphToManyRelation as Eo, AdapterCapabilities as Er, MorphToManyRelationMetadata as Es, toModelName as Et, PRISMA_ENUM_MEMBER_REGEX as F, RuntimeClientLike as Fa, ArkormDebugEvent as Fi, MigrateFreshCommand as Fn, BelongsToManyRelation as Fo, AggregateOperation as Fr, GeneratedMigrationFile as Fs, isMigrationApplied as Ft, applyOperationsToPrismaSchema as G, QueryBuilder as Ga, DelegateOrderBy as Gi, AttributeOptions as Gn, RelationMetadataProvider as Go, InsertManySpec as Gr, SchemaIndex as Gs, PersistedColumnMappingsState as Gt, applyMigrationRollbackToPrismaSchema as H, TransactionOptions as Ha, DelegateCreateData as Hi, CliApp as Hn, RelationConstraint as Ho, DatabaseValue as Hr, SchemaColumnType as Hs, supportsDatabaseMigrationState as Ht, PRISMA_ENUM_REGEX as I, Serializable as Ia, ArkormDebugHandler as Ii, MigrateCommand as In, Relation as Io, AggregateSelection as Ir, MigrationClass as Is, markMigrationApplied as It, buildIndexLine as J, AttributeQuerySchema as Ja, DelegateSelect as Ji, RegisteredFactory as Jn, RelationTableLookupSpec as Jo, QueryComparisonCondition as Jr, SchemaTableAlterOperation as Js, PersistedTableMetadata as Jt, buildEnumBlock as K, AttributeCreateInput as Ka, DelegateRow as Ki, Arkorm as Kn, RelationResult as Ko, InsertSpec as Kr, SchemaOperation as Ks, PersistedMetadataFeatures as Kt, PRISMA_MODEL_REGEX as L, SimplePaginationMeta as La, CastDefinition as Li, MakeSeederCommand as Ln, RelationTableLoader as Lo, AggregateSpec as Lr, MigrationInstanceLike as Ls, markMigrationRun as Lt, resetArkormRuntimeForTests as M, QuerySchemaUpdateData as Ma, AdapterQueryInspection as Mi, ModelsSyncCommand as Mn, HasManyRelation as Mo, AdapterModelStructure as Mr, AppliedMigrationRun as Ms, findAppliedMigration as Mt, runArkormTransaction as N, QuerySchemaWhere as Na, ArkormBootContext as Ni, MigrationHistoryCommand as Nn, BelongsToRelation as No, AdapterQueryOperation as Nr, AppliedMigrationsState as Ns, getLastMigrationRun as Nt, isDelegateLike as O, QuerySchemaRows as Oa, UpdateManySpec as Oi, EnumBuilder as On, MorphManyRelation as Oo, AdapterDatabaseCreationResult as Or, PivotModelStatic as Os, buildMigrationRunId as Ot, PrimaryKeyGenerationPlanner as P, RawSelectInput as Pa, ArkormConfig as Pi, MigrateRollbackCommand as Pn, SingleResultRelation as Po, AdapterTransactionContext as Pr, GenerateMigrationOptions as Ps, getLatestAppliedMigrations as Pt, buildPrimaryKeyLine as Q, AttributeWhereInput as Qa, DelegateWhere as Qi, RuntimePathKey as Qn, RelatedModelForRelationship as Qo, QueryExistsCondition as Qr, TimestampColumnBehavior as Qs, deletePersistedColumnMappingsState as Qt, applyAlterTableOperation as R, SoftDeleteConfig as Ra, CastHandler as Ri, MakeModelCommand as Rn, RelationAggregateConstraint as Ro, DatabaseAdapter as Rr, PrimaryKeyGeneration as Rs, readAppliedMigrationsState as Rt, getRuntimeClient as S, PrismaTransactionOptions as Sa, RelationFilterSpec as Si, ArkormErrorContext as Sn, ModelFactory as So, createPrismaCompatibilityAdapter as Sr, HasOneThroughRelationMetadata as Ss, supportsDatabaseCreation as St, getRuntimePaginationURLDriverFactory as T, QuerySchemaInclude as Ta, SelectSpec as Ti, MIGRATION_BRAND as Tn, MorphToRelation as To, createKyselyAdapter as Tr, MorphOneRelationMetadata as Ts, toMigrationFileSlug as Tt, applyMigrationToDatabase as U, ModelStatic as Ua, DelegateFindManyArgs as Ui, resolveCast as Un, RelationDefaultResolver as Uo, DeleteManySpec as Ur, SchemaForeignKey as Us, writeAppliedMigrationsState as Ut, applyMigrationRollbackToDatabase as V, TransactionContext as Va, ClientResolver as Vi, InitCommand as Vn, RelationColumnLookupSpec as Vo, DatabaseRows as Vr, SchemaColumn as Vs, resolveMigrationStateFilePath as Vt, applyMigrationToPrismaSchema as W, RelationshipModelStatic as Wa, DelegateInclude as Wi, Attribute as Wn, RelationDefaultValue as Wo, DeleteSpec as Wr, SchemaForeignKeyAction as Ws, writeAppliedMigrationsStateToStore as Wt, buildMigrationSource as X, AttributeSelect as Xa, DelegateUpdateArgs as Xi, RuntimeConstructor as Xn, JoinOn as Xo, QueryCondition as Xr, SchemaTableDropOperation as Xs, applyOperationsToPersistedColumnMappingsState as Xt, buildInverseRelationLine as Y, AttributeSchemaDelegate as Ya, DelegateUniqueWhere as Yi, RegisteredModel as Yn, EagerLoadRelations as Yo, QueryComparisonOperator as Yr, SchemaTableCreateOperation as Ys, PersistedTimestampColumn as Yt, buildModelBlock as Z, AttributeUpdateInput as Za, DelegateUpdateData as Zi, RuntimePathInput as Zn, JoinSource as Zo, QueryDayCondition as Zr, SchemaUniqueConstraint as Zs, createEmptyPersistedColumnMappingsState as Zt, ensureArkormConfigLoading as _, PrismaLikeSortOrder as _a, QuerySelectColumn as _i, QueryExecutionException as _n, QuerySchemaForModel as _o, SeederCallArgument as _r, BelongsToRelationMetadata as _s, resolveMigrationClassName as _t, getRuntimeCompatibilityAdapter as a, PaginationCurrentPageResolver as aa, QueryJoinNestedConstraint as ai, readPersistedColumnMappingsState as an, ModelDeclaredAttributeKey as ao, loadFactoriesFrom as ar, FactoryAttributeResolver as as, deriveRelationFieldName as at, getDefaultStubsPath as b, PrismaTransactionCapableClient as ba, RawQuerySpec as bi, ModelNotFoundException as bn, Model as bo, PrismaDatabaseAdapter as br, HasManyThroughRelationMetadata as bs, runPrismaCommand as bt, PrismaDelegateMap as c, PaginationURLDriver as ca, QueryJoinType as ci, resolveColumnMappingsFilePath as cn, ModelEventHandlerConstructor as co, loadSeedersFrom as cr, FactoryDefinition as cs, findEnumBlock as ct, inferDelegateName as d, PrismaDelegateLike as da, QueryJsonConditionKind as di, validatePersistedMetadataFeaturesForMigrations as dn, ModelLifecycleState as do, registerModels as dr, FactoryRelationshipResolver as ds, formatEnumDefaultValue as dt, EagerLoadMap as ea, TimestampNaming as ec, QueryGroupCondition as ei, getPersistedEnumMap as en, GlobalScope as eo, getRegisteredFactories as er, WhereCallback as es, buildUniqueConstraintLine as et, awaitConfiguredModelsRegistration as f, PrismaFindManyArgsLike as fa, QueryLogicalOperator as fi, writePersistedColumnMappingsState as fn, ModelOrderByInput as fo, registerPaths as fr, FactoryState as fs, formatRelationAction as ft, emitRuntimeDebugEvent as g, PrismaLikeSelect as ga, QueryScalarComparisonOperator as gi, RelationResolutionException as gn, ModelWhereInput as go, Seeder as gr, BelongsToManyRelationMetadata as gs, resolveEnumName as gt, defineConfig as h, PrismaLikeScalarFilter as ha, QueryRawCondition as hi, ScopeNotDefinedException as hn, ModelUpdateData as ho, SEEDER_BRAND as hr, DatabaseTablePersistedMetadataOptions as hs, pad as ht, RuntimeModuleLoader as i, NamingCase as ia, QueryJoinConstraint as ii, getPersistedTimestampColumns as in, ModelCreateData as io, getRegisteredSeeders as ir, ArkormCollection as is, deriveRelationAlias as it, loadArkormConfig as j, QuerySchemaUpdateArgs as ja, AdapterBindableModel as ji, SeedCommand as jn, HasManyThroughRelation as jo, AdapterModelIntrospectionOptions as jr, AppliedMigrationEntry as js, deleteAppliedMigrationsStateFromStore as jt, isQuerySchemaLike as k, QuerySchemaSelect as ka, UpdateSpec as ki, TableBuilder as kn, HasOneThroughRelation as ko, AdapterInspectionRequest as kr, RelationMetadata as ks, computeMigrationChecksum as kt, createPrismaAdapter as l, PaginationURLDriverFactory as la, QueryJoinValueConstraint as li, resolvePersistedMetadataFeatures as ln, ModelEventListener as lo, registerFactories as lr, FactoryDefinitionAttributes as ls, findModelBlock as lt, configureArkormRuntime as m, PrismaLikeOrderBy as ma, QueryOrderBy as mi, UniqueConstraintResolutionException as mn, ModelRelationshipResult as mo, resetRuntimeRegistryForTests as mr, DatabaseTableOptions as ms, getMigrationPlan as mt, PivotModel as n, ModelQuerySchemaLike as na, QueryJoinBoolean as ni, getPersistedPrimaryKeyGeneration as nn, ModelAttributes as no, getRegisteredModels as nr, LengthAwarePaginator as ns, deriveCollectionFieldName as nt, resolveRuntimeCompatibilityQuerySchema as o, PaginationMeta as oa, QueryJoinNullConstraint as oi, rebuildPersistedColumnMappingsState as on, ModelEventDispatcher as oo, loadMigrationsFrom as or, FactoryAttributes as os, deriveSingularFieldName as ot, bindAdapterToModels as p, PrismaLikeInclude as pa, QueryNotCondition as pi, UnsupportedAdapterFeatureException as pn, ModelRelationshipKey as po, registerSeeders as pr, MaybePromise as ps, generateMigrationFile as pt, buildFieldLine as q, AttributeOrderBy as qa, DelegateRows as qi, Arkormx as qn, RelationResultCache as qo, QueryColumnComparisonCondition as qr, SchemaPrimaryKey as qs, PersistedPrimaryKeyGeneration as qt, LoadedRuntimeModule as r, ModelTableCase as ra, QueryJoinColumnConstraint as ri, getPersistedTableMetadata as rn, ModelAttributesOf as ro, getRegisteredPaths as rr, Paginator as rs, deriveInverseRelationAlias as rt, resolveRuntimeCompatibilityQuerySchemaOrThrow as s, PaginationOptions as sa, QueryJoinRawConstraint as si, resetPersistedColumnMappingsCache as sn, ModelEventHandler as so, loadModelsFrom as sr, FactoryCallback as ss, escapeRegex as st, URLDriver as t, GetUserConfig as ta, QueryJoin as ti, getPersistedEnumTsType as tn, ModelAttributeValue as to, getRegisteredMigrations as tr, JoinClause as ts, createMigrationTimestamp as tt, createPrismaDelegateMap as u, PrismaClientLike as ua, QueryJsonCondition as ui, syncPersistedColumnMappingsFromState as un, ModelEventName as uo, registerMigrations as ur, FactoryModelConstructor as us, formatDefaultValue as ut, getActiveTransactionAdapter as v, PrismaLikeWhereInput as va, QueryTarget as vi, QueryExecutionExceptionContext as vn, QuerySchemaForModelInstance as vo, SeederConstructor as vr, ColumnMap as vs, resolvePrismaType as vt, getRuntimePaginationCurrentPageResolver as w, QuerySchemaFindManyArgs as wa, RelationLoadSpec as wi, DB as wn, SetBasedEagerLoader as wo, KyselyDatabaseAdapter as wr, MorphManyRelationMetadata as ws, supportsDatabaseReset as wt, getRuntimeAdapter as x, PrismaTransactionContext as xa, RelationAggregateSpec as xi, MissingDelegateException as xn, InlineFactory as xo, PrismaDelegateNameMapping as xr, HasOneRelationMetadata as xs, stripPrismaSchemaModelsAndEnums as xt, getActiveTransactionClient as y, PrismaTransactionCallback as ya, QueryTimeCondition as yi, QueryConstraintException as yn, RelatedModelClass as yo, SeederInput as yr, HasManyRelationMetadata as ys, runMigrationWithPrisma as yt, applyCreateTableOperation as z, TransactionCallback as za, CastMap as zi, MakeMigrationCommand as zn, RelationAggregateInput as zo, DatabasePrimitive as zr, PrismaMigrationWorkflowOptions as zs, readAppliedMigrationsStateFromStore as zt };