arkormx 2.5.3 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +5 -1
- package/dist/{index-594mzS6G.d.mts → index-BUn0wR2X.d.cts} +457 -10
- package/dist/{index-B4brAVHp.d.cts → index-D8STuZ8X.d.mts} +457 -10
- package/dist/index.cjs +229 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +229 -2
- package/dist/relationship/index.cjs +1 -1
- package/dist/relationship/index.d.cts +1 -1
- package/dist/relationship/index.d.mts +1 -1
- package/dist/relationship/index.mjs +1 -1
- package/dist/{relationship-huiFTxxu.mjs → relationship-C6oXK5EB.mjs} +302 -0
- package/dist/{relationship-uoGA5q9a.cjs → relationship-CKQaNPdK.cjs} +302 -0
- package/package.json +1 -1
|
@@ -3612,6 +3612,187 @@ var Relation = class {
|
|
|
3612
3612
|
return this.constrain((query) => query.where(where));
|
|
3613
3613
|
}
|
|
3614
3614
|
/**
|
|
3615
|
+
* Adds an OR where clause to the query.
|
|
3616
|
+
*
|
|
3617
|
+
* @param where
|
|
3618
|
+
* @returns
|
|
3619
|
+
*/
|
|
3620
|
+
orWhere(where) {
|
|
3621
|
+
return this.constrain((query) => query.orWhere(where));
|
|
3622
|
+
}
|
|
3623
|
+
/**
|
|
3624
|
+
* Adds a NOT where clause to the query.
|
|
3625
|
+
*
|
|
3626
|
+
* @param where
|
|
3627
|
+
* @returns
|
|
3628
|
+
*/
|
|
3629
|
+
whereNot(where) {
|
|
3630
|
+
return this.constrain((query) => query.whereNot(where));
|
|
3631
|
+
}
|
|
3632
|
+
/**
|
|
3633
|
+
* Adds an OR NOT where clause to the query.
|
|
3634
|
+
*
|
|
3635
|
+
* @param where
|
|
3636
|
+
* @returns
|
|
3637
|
+
*/
|
|
3638
|
+
orWhereNot(where) {
|
|
3639
|
+
return this.constrain((query) => query.orWhereNot(where));
|
|
3640
|
+
}
|
|
3641
|
+
/**
|
|
3642
|
+
* Adds a null check for a key.
|
|
3643
|
+
*
|
|
3644
|
+
* @param key
|
|
3645
|
+
* @returns
|
|
3646
|
+
*/
|
|
3647
|
+
whereNull(key) {
|
|
3648
|
+
return this.constrain((query) => query.whereNull(key));
|
|
3649
|
+
}
|
|
3650
|
+
/**
|
|
3651
|
+
* Adds a not-null check for a key.
|
|
3652
|
+
*
|
|
3653
|
+
* @param key
|
|
3654
|
+
* @returns
|
|
3655
|
+
*/
|
|
3656
|
+
whereNotNull(key) {
|
|
3657
|
+
return this.constrain((query) => query.whereNotNull(key));
|
|
3658
|
+
}
|
|
3659
|
+
/**
|
|
3660
|
+
* Adds a between range clause for a key.
|
|
3661
|
+
*
|
|
3662
|
+
* @param key
|
|
3663
|
+
* @param range
|
|
3664
|
+
* @returns
|
|
3665
|
+
*/
|
|
3666
|
+
whereBetween(key, range) {
|
|
3667
|
+
return this.constrain((query) => query.whereBetween(key, range));
|
|
3668
|
+
}
|
|
3669
|
+
/**
|
|
3670
|
+
* Adds a date-only equality clause for a date-like key.
|
|
3671
|
+
*
|
|
3672
|
+
* @param key
|
|
3673
|
+
* @param value
|
|
3674
|
+
* @returns
|
|
3675
|
+
*/
|
|
3676
|
+
whereDate(key, value) {
|
|
3677
|
+
return this.constrain((query) => query.whereDate(key, value));
|
|
3678
|
+
}
|
|
3679
|
+
whereMonth(key, month, year) {
|
|
3680
|
+
return this.constrain((query) => query.whereMonth(key, month, year));
|
|
3681
|
+
}
|
|
3682
|
+
whereYear(key, year) {
|
|
3683
|
+
return this.constrain((query) => query.whereYear(key, year));
|
|
3684
|
+
}
|
|
3685
|
+
whereTime(key, operatorOrValue, maybeValue) {
|
|
3686
|
+
return this.constrain((query) => maybeValue === void 0 ? query.whereTime(key, operatorOrValue) : query.whereTime(key, operatorOrValue, maybeValue));
|
|
3687
|
+
}
|
|
3688
|
+
whereDay(key, operatorOrDay, maybeDay) {
|
|
3689
|
+
return this.constrain((query) => maybeDay === void 0 ? query.whereDay(key, operatorOrDay) : query.whereDay(key, operatorOrDay, maybeDay));
|
|
3690
|
+
}
|
|
3691
|
+
/**
|
|
3692
|
+
* Adds clause to determine if a column's value is in the past
|
|
3693
|
+
*
|
|
3694
|
+
* @param key
|
|
3695
|
+
* @returns
|
|
3696
|
+
*/
|
|
3697
|
+
wherePast(key) {
|
|
3698
|
+
return this.constrain((query) => query.wherePast(key));
|
|
3699
|
+
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Adds clause to determine if a column's value is in the future
|
|
3702
|
+
*
|
|
3703
|
+
* @param key
|
|
3704
|
+
* @returns
|
|
3705
|
+
*/
|
|
3706
|
+
whereFuture(key) {
|
|
3707
|
+
return this.constrain((query) => query.whereFuture(key));
|
|
3708
|
+
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Adds clause to determine if a column's value is in the past, inclusive of the current date and time
|
|
3711
|
+
*
|
|
3712
|
+
* @param key
|
|
3713
|
+
* @returns
|
|
3714
|
+
*/
|
|
3715
|
+
whereNowOrPast(key) {
|
|
3716
|
+
return this.constrain((query) => query.whereNowOrPast(key));
|
|
3717
|
+
}
|
|
3718
|
+
/**
|
|
3719
|
+
* Adds clause to determine if a column's value is in the future, inclusive of the current date and time
|
|
3720
|
+
*
|
|
3721
|
+
* @param key
|
|
3722
|
+
* @returns
|
|
3723
|
+
*/
|
|
3724
|
+
whereNowOrFuture(key) {
|
|
3725
|
+
return this.constrain((query) => query.whereNowOrFuture(key));
|
|
3726
|
+
}
|
|
3727
|
+
/**
|
|
3728
|
+
* Adds clause to determine if a column's value is today
|
|
3729
|
+
*
|
|
3730
|
+
* @param key
|
|
3731
|
+
* @returns
|
|
3732
|
+
*/
|
|
3733
|
+
whereToday(key) {
|
|
3734
|
+
return this.constrain((query) => query.whereToday(key));
|
|
3735
|
+
}
|
|
3736
|
+
/**
|
|
3737
|
+
* Adds clause to determine if a column's value is before today
|
|
3738
|
+
*
|
|
3739
|
+
* @param key
|
|
3740
|
+
* @returns
|
|
3741
|
+
*/
|
|
3742
|
+
whereBeforeToday(key) {
|
|
3743
|
+
return this.constrain((query) => query.whereBeforeToday(key));
|
|
3744
|
+
}
|
|
3745
|
+
/**
|
|
3746
|
+
* Adds clause to determine if a column's value is after today
|
|
3747
|
+
*
|
|
3748
|
+
* @param key
|
|
3749
|
+
* @returns
|
|
3750
|
+
*/
|
|
3751
|
+
whereAfterToday(key) {
|
|
3752
|
+
return this.constrain((query) => query.whereAfterToday(key));
|
|
3753
|
+
}
|
|
3754
|
+
/**
|
|
3755
|
+
* Adds clause to determine if a column's value is today or before today
|
|
3756
|
+
*
|
|
3757
|
+
* @param key
|
|
3758
|
+
* @returns
|
|
3759
|
+
*/
|
|
3760
|
+
whereTodayOrBefore(key) {
|
|
3761
|
+
return this.constrain((query) => query.whereTodayOrBefore(key));
|
|
3762
|
+
}
|
|
3763
|
+
/**
|
|
3764
|
+
* Adds clause to determine if a column's value is today or after today
|
|
3765
|
+
*
|
|
3766
|
+
* @param key
|
|
3767
|
+
* @returns
|
|
3768
|
+
*/
|
|
3769
|
+
whereTodayOrAfter(key) {
|
|
3770
|
+
return this.constrain((query) => query.whereTodayOrAfter(key));
|
|
3771
|
+
}
|
|
3772
|
+
whereColumn(left, operatorOrRight, maybeRight) {
|
|
3773
|
+
return this.constrain((query) => maybeRight === void 0 ? query.whereColumn(left, operatorOrRight) : query.whereColumn(left, operatorOrRight, maybeRight));
|
|
3774
|
+
}
|
|
3775
|
+
/**
|
|
3776
|
+
* Adds "where exists" SQL clauses.
|
|
3777
|
+
*
|
|
3778
|
+
* @param queryOrCallback
|
|
3779
|
+
* @returns
|
|
3780
|
+
*/
|
|
3781
|
+
whereExists(queryOrCallback) {
|
|
3782
|
+
return this.constrain((query) => query.whereExists(queryOrCallback));
|
|
3783
|
+
}
|
|
3784
|
+
/**
|
|
3785
|
+
* Adds a fulltext clause for columns that have full text indexes.
|
|
3786
|
+
*
|
|
3787
|
+
* @param columns
|
|
3788
|
+
* @param value
|
|
3789
|
+
* @param options
|
|
3790
|
+
* @returns
|
|
3791
|
+
*/
|
|
3792
|
+
whereFullText(columns, value, options = {}) {
|
|
3793
|
+
return this.constrain((query) => query.whereFullText(columns, value, options));
|
|
3794
|
+
}
|
|
3795
|
+
/**
|
|
3615
3796
|
* Add a strongly-typed where key clause to the relationship query.
|
|
3616
3797
|
*
|
|
3617
3798
|
* @param key
|
|
@@ -3622,6 +3803,16 @@ var Relation = class {
|
|
|
3622
3803
|
return this.constrain((query) => query.whereKey(key, value));
|
|
3623
3804
|
}
|
|
3624
3805
|
/**
|
|
3806
|
+
* Adds a strongly-typed inequality where clause for a single attribute key.
|
|
3807
|
+
*
|
|
3808
|
+
* @param key
|
|
3809
|
+
* @param value
|
|
3810
|
+
* @returns
|
|
3811
|
+
*/
|
|
3812
|
+
whereKeyNot(key, value) {
|
|
3813
|
+
return this.constrain((query) => query.whereKeyNot(key, value));
|
|
3814
|
+
}
|
|
3815
|
+
/**
|
|
3625
3816
|
* Add a strongly-typed where in clause to the relationship query.
|
|
3626
3817
|
*
|
|
3627
3818
|
* @param key
|
|
@@ -3632,6 +3823,36 @@ var Relation = class {
|
|
|
3632
3823
|
return this.constrain((query) => query.whereIn(key, values));
|
|
3633
3824
|
}
|
|
3634
3825
|
/**
|
|
3826
|
+
* Adds a strongly-typed OR IN where clause for a single attribute key.
|
|
3827
|
+
*
|
|
3828
|
+
* @param key
|
|
3829
|
+
* @param values
|
|
3830
|
+
* @returns
|
|
3831
|
+
*/
|
|
3832
|
+
orWhereIn(key, values) {
|
|
3833
|
+
return this.constrain((query) => query.orWhereIn(key, values));
|
|
3834
|
+
}
|
|
3835
|
+
/**
|
|
3836
|
+
* Adds a strongly-typed NOT IN where clause for a single attribute key.
|
|
3837
|
+
*
|
|
3838
|
+
* @param key
|
|
3839
|
+
* @param values
|
|
3840
|
+
* @returns
|
|
3841
|
+
*/
|
|
3842
|
+
whereNotIn(key, values) {
|
|
3843
|
+
return this.constrain((query) => query.whereNotIn(key, values));
|
|
3844
|
+
}
|
|
3845
|
+
/**
|
|
3846
|
+
* Adds a strongly-typed OR NOT IN where clause for a single attribute key.
|
|
3847
|
+
*
|
|
3848
|
+
* @param key
|
|
3849
|
+
* @param values
|
|
3850
|
+
* @returns
|
|
3851
|
+
*/
|
|
3852
|
+
orWhereNotIn(key, values) {
|
|
3853
|
+
return this.constrain((query) => query.orWhereNotIn(key, values));
|
|
3854
|
+
}
|
|
3855
|
+
/**
|
|
3635
3856
|
* Add a string contains clause to the relationship query.
|
|
3636
3857
|
*
|
|
3637
3858
|
* @param key
|
|
@@ -3671,6 +3892,42 @@ var Relation = class {
|
|
|
3671
3892
|
return this.constrain((query) => query.orderBy(orderBy));
|
|
3672
3893
|
}
|
|
3673
3894
|
/**
|
|
3895
|
+
* Puts the query results in random order.
|
|
3896
|
+
*
|
|
3897
|
+
* @returns
|
|
3898
|
+
*/
|
|
3899
|
+
inRandomOrder() {
|
|
3900
|
+
return this.constrain((query) => query.inRandomOrder());
|
|
3901
|
+
}
|
|
3902
|
+
/**
|
|
3903
|
+
* Removes existing order clauses and optionally applies a new one.
|
|
3904
|
+
*
|
|
3905
|
+
* @param column
|
|
3906
|
+
* @param direction
|
|
3907
|
+
* @returns
|
|
3908
|
+
*/
|
|
3909
|
+
reorder(column, direction = "asc") {
|
|
3910
|
+
return this.constrain((query) => query.reorder(column, direction));
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* Adds an orderBy descending clause for a timestamp-like column.
|
|
3914
|
+
*
|
|
3915
|
+
* @param column
|
|
3916
|
+
* @returns
|
|
3917
|
+
*/
|
|
3918
|
+
latest(column = "createdAt") {
|
|
3919
|
+
return this.constrain((query) => query.latest(column));
|
|
3920
|
+
}
|
|
3921
|
+
/**
|
|
3922
|
+
* Adds an orderBy ascending clause for a timestamp-like column.
|
|
3923
|
+
*
|
|
3924
|
+
* @param column
|
|
3925
|
+
* @returns
|
|
3926
|
+
*/
|
|
3927
|
+
oldest(column = "createdAt") {
|
|
3928
|
+
return this.constrain((query) => query.oldest(column));
|
|
3929
|
+
}
|
|
3930
|
+
/**
|
|
3674
3931
|
* Add an include clause to the relationship query.
|
|
3675
3932
|
*
|
|
3676
3933
|
* @param include
|
|
@@ -3697,6 +3954,9 @@ var Relation = class {
|
|
|
3697
3954
|
select(select) {
|
|
3698
3955
|
return this.constrain((query) => query.select(select));
|
|
3699
3956
|
}
|
|
3957
|
+
addSelect(select) {
|
|
3958
|
+
return this.constrain((query) => query.addSelect(select));
|
|
3959
|
+
}
|
|
3700
3960
|
/**
|
|
3701
3961
|
* Add a skip clause to the relationship query.
|
|
3702
3962
|
*
|
|
@@ -3706,6 +3966,9 @@ var Relation = class {
|
|
|
3706
3966
|
skip(skip) {
|
|
3707
3967
|
return this.constrain((query) => query.skip(skip));
|
|
3708
3968
|
}
|
|
3969
|
+
offset(value) {
|
|
3970
|
+
return this.constrain((query) => query.offset(value));
|
|
3971
|
+
}
|
|
3709
3972
|
/**
|
|
3710
3973
|
* Add a take clause to the relationship query.
|
|
3711
3974
|
*
|
|
@@ -3716,6 +3979,45 @@ var Relation = class {
|
|
|
3716
3979
|
return this.constrain((query) => query.take(take));
|
|
3717
3980
|
}
|
|
3718
3981
|
/**
|
|
3982
|
+
* Alias for take.
|
|
3983
|
+
*
|
|
3984
|
+
* @param value
|
|
3985
|
+
* @returns
|
|
3986
|
+
*/
|
|
3987
|
+
limit(value) {
|
|
3988
|
+
return this.constrain((query) => query.limit(value));
|
|
3989
|
+
}
|
|
3990
|
+
/**
|
|
3991
|
+
* Sets offset/limit for a 1-based page.
|
|
3992
|
+
*
|
|
3993
|
+
* @param page
|
|
3994
|
+
* @param perPage
|
|
3995
|
+
* @returns
|
|
3996
|
+
*/
|
|
3997
|
+
forPage(page, perPage = 15) {
|
|
3998
|
+
return this.constrain((query) => query.forPage(page, perPage));
|
|
3999
|
+
}
|
|
4000
|
+
/**
|
|
4001
|
+
* Adds a raw where clause when supported by the adapter.
|
|
4002
|
+
*
|
|
4003
|
+
* @param sql
|
|
4004
|
+
* @param bindings
|
|
4005
|
+
* @returns
|
|
4006
|
+
*/
|
|
4007
|
+
whereRaw(sql, bindings = []) {
|
|
4008
|
+
return this.constrain((query) => query.whereRaw(sql, bindings));
|
|
4009
|
+
}
|
|
4010
|
+
/**
|
|
4011
|
+
* Adds a raw OR where clause when supported by the adapter.
|
|
4012
|
+
*
|
|
4013
|
+
* @param sql
|
|
4014
|
+
* @param bindings
|
|
4015
|
+
* @returns
|
|
4016
|
+
*/
|
|
4017
|
+
orWhereRaw(sql, bindings = []) {
|
|
4018
|
+
return this.constrain((query) => query.orWhereRaw(sql, bindings));
|
|
4019
|
+
}
|
|
4020
|
+
/**
|
|
3719
4021
|
* Include soft-deleted records in the relationship query.
|
|
3720
4022
|
*
|
|
3721
4023
|
* @returns
|