Skip to content

Commit ee9780e

Browse files
committed
chore: updated JvmName of expr and filter to reflect new naming scheme
1 parent c97c820 commit ee9780e

7 files changed

Lines changed: 36 additions & 40 deletions

File tree

module-mongokt/src/commonMain/kotlin/expr/Extensions.kt

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ operator fun Expr<_Number>.div(other: Expr<_Number>): Expr<_Number> =
3131

3232
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/mod/ */
3333
@BsonMarker2
34-
@JvmName("Number_mod_Number")
34+
@JvmName($$"Number_$mod_Number")
3535
infix fun Expr<_Number>.`$mod`(other: Expr<_Number>): Expr<_Number> =
3636
`$mod`(this, other)
3737

@@ -43,7 +43,7 @@ operator fun Expr<_Number>.times(other: Expr<_Number>): Expr<_Number> =
4343

4444
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/pow/ */
4545
@BsonMarker2
46-
@JvmName("Number_pow_Number")
46+
@JvmName($$"Number_$pow_Number")
4747
infix fun Expr<_Number>.`$pow`(other: Expr<_Number>): Expr<_Number> =
4848
`$pow`(this, other)
4949

@@ -82,9 +82,8 @@ operator fun Expr<_Array>.plus(other: Expr<_Array>): Expr<_Array> =
8282
`$concatArrays`(this, other)
8383

8484
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/in/ */
85-
@Suppress("FunctionName")
8685
@BsonMarker2
87-
@JvmName("Element_in_Array")
86+
@JvmName($$"Element_$in_Array")
8887
infix fun Expr<_Element>.`$in`(other: Expr<_Array>): Expr<_Boolean> =
8988
`$in`(this, other)
9089

@@ -94,19 +93,19 @@ infix fun Expr<_Element>.`$in`(other: Expr<_Array>): Expr<_Boolean> =
9493

9594
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/bitAnd/ */
9695
@BsonMarker2
97-
@JvmName("Number_bitAnd_Number")
96+
@JvmName($$"Number_$bitAnd_Number")
9897
infix fun Expr<_Number>.`$bitAnd`(other: Expr<_Number>): Expr<_Number> =
9998
`$bitAnd`(this, other)
10099

101100
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/bitOr/ */
102101
@BsonMarker2
103-
@JvmName("Number_bitOr_Number")
102+
@JvmName($$"Number_$bitOr_Number")
104103
infix fun Expr<_Number>.`$bitOr`(other: Expr<_Number>): Expr<_Number> =
105104
`$bitOr`(this, other)
106105

107106
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/bitXor/ */
108107
@BsonMarker2
109-
@JvmName("Number_bitXor_Number")
108+
@JvmName($$"Number_$bitXor_Number")
110109
infix fun Expr<_Number>.`$bitXor`(other: Expr<_Number>): Expr<_Number> =
111110
`$bitXor`(this, other)
112111

@@ -116,13 +115,13 @@ infix fun Expr<_Number>.`$bitXor`(other: Expr<_Number>): Expr<_Number> =
116115

117116
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/and/ */
118117
@BsonMarker2
119-
@JvmName("Element_and_Element")
118+
@JvmName($$"Element_$and_Element")
120119
infix fun Expr<_Element>.`$and`(other: Expr<_Element>): Expr<_Boolean> =
121120
`$and`(this, other)
122121

123122
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/or/ */
124123
@BsonMarker2
125-
@JvmName("Element_or_Element")
124+
@JvmName($$"Element_$or_Element")
126125
infix fun Expr<_Element>.`$or`(other: Expr<_Element>): Expr<_Boolean> =
127126
`$or`(this, other)
128127

@@ -132,43 +131,43 @@ infix fun Expr<_Element>.`$or`(other: Expr<_Element>): Expr<_Boolean> =
132131

133132
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/cmp/ */
134133
@BsonMarker2
135-
@JvmName("Element_cmp_Element")
134+
@JvmName($$"Element_$cmp_Element")
136135
infix fun Expr<_Element>.`$cmp`(other: Expr<_Element>): Expr<_Number> =
137136
`$cmp`(this, other)
138137

139138
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/eq/ */
140139
@BsonMarker2
141-
@JvmName("Element_eq_Element")
140+
@JvmName($$"Element_$eq_Element")
142141
infix fun Expr<_Element>.`$eq`(other: Expr<_Element>): Expr<_Boolean> =
143142
`$eq`(this, other)
144143

145144
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/gt/ */
146145
@BsonMarker2
147-
@JvmName("Element_gt_Element")
146+
@JvmName($$"Element_$gt_Element")
148147
infix fun Expr<_Element>.`$gt`(other: Expr<_Element>): Expr<_Boolean> =
149148
`$gt`(this, other)
150149

151150
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/gte/ */
152151
@BsonMarker2
153-
@JvmName("Element_gte_Element")
152+
@JvmName($$"Element_$gte_Element")
154153
infix fun Expr<_Element>.`$gte`(other: Expr<_Element>): Expr<_Boolean> =
155154
`$gte`(this, other)
156155

157156
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/lt/ */
158157
@BsonMarker2
159-
@JvmName("Element_lt_Element")
158+
@JvmName($$"Element_$lt_Element")
160159
infix fun Expr<_Element>.`$lt`(other: Expr<_Element>): Expr<_Boolean> =
161160
`$lt`(this, other)
162161

163162
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/lte/ */
164163
@BsonMarker2
165-
@JvmName("Element_lte_Element")
164+
@JvmName($$"Element_$lte_Element")
166165
infix fun Expr<_Element>.`$lte`(other: Expr<_Element>): Expr<_Boolean> =
167166
`$lte`(this, other)
168167

169168
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/ne/ */
170169
@BsonMarker2
171-
@JvmName("Element_ne_Element")
170+
@JvmName($$"Element_$ne_Element")
172171
infix fun Expr<_Element>.`$ne`(other: Expr<_Element>): Expr<_Boolean> =
173172
`$ne`(this, other)
174173

@@ -178,7 +177,7 @@ infix fun Expr<_Element>.`$ne`(other: Expr<_Element>): Expr<_Boolean> =
178177

179178
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/ifNull/ */
180179
@BsonMarker2
181-
@JvmName("T_ifNull_T")
180+
@JvmName($$"T_$ifNull_T")
182181
infix fun <T : _Element> Expr<T>.`$ifNull`(other: Expr<T>): Expr<T> =
183182
`$ifNull`(this, other)
184183

@@ -208,31 +207,31 @@ operator fun Expr<_Document>.plus(other: Expr<_Document>): Expr<_Document> =
208207

209208
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/setDifference/ */
210209
@BsonMarker2
211-
@JvmName("Array_setDifference_Array")
210+
@JvmName($$"Array_$setDifference_Array")
212211
infix fun Expr<_Array>.`$setDifference`(other: Expr<_Array>): Expr<_Array> =
213212
`$setDifference`(this, other)
214213

215214
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/setEquals/ */
216215
@BsonMarker2
217-
@JvmName("Array_setEquals_Array")
216+
@JvmName($$"Array_$setEquals_Array")
218217
infix fun Expr<_Array>.`$setEquals`(other: Expr<_Array>): Expr<_Boolean> =
219218
`$setEquals`(this, other)
220219

221220
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/setIntersection/ */
222221
@BsonMarker2
223-
@JvmName("Array_setIntersection_Array")
222+
@JvmName($$"Array_$setIntersection_Array")
224223
infix fun Expr<_Array>.`$setIntersection`(other: Expr<_Array>): Expr<_Array> =
225224
`$setIntersection`(this, other)
226225

227226
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/setIsSubset/ */
228227
@BsonMarker2
229-
@JvmName("Array_setIsSubset_Array")
228+
@JvmName($$"Array_$setIsSubset_Array")
230229
infix fun Expr<_Array>.`$setIsSubset`(other: Expr<_Array>): Expr<_Boolean> =
231230
`$setIsSubset`(this, other)
232231

233232
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/setUnion/ */
234233
@BsonMarker2
235-
@JvmName("Array_setUnion_Array")
234+
@JvmName($$"Array_$setUnion_Array")
236235
infix fun Expr<_Array>.`$setUnion`(other: Expr<_Array>): Expr<_Array> =
237236
`$setUnion`(this, other)
238237

@@ -248,13 +247,13 @@ operator fun Expr<_String>.plus(other: Expr<_String>): Expr<_String> =
248247

249248
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexMatch/ */
250249
@BsonMarker2
251-
@JvmName("String_regexMatch_Element")
250+
@JvmName($$"String_$regexMatch_Element")
252251
infix fun Expr<_String>.`$regexMatch`(regex: Expr<_Element /* String | RegExp */>): Expr<_Boolean> =
253252
`$regexMatch`(this, regex)
254253

255254
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/strcasecmp/ */
256255
@BsonMarker2
257-
@JvmName("String_strcasecmp_String")
256+
@JvmName($$"String_$strcasecmp_String")
258257
infix fun Expr<_String>.`$strcasecmp`(regex: Expr<_String>): Expr<_Number> =
259258
`$strcasecmp`(this, regex)
260259

module-mongokt/src/commonMain/kotlin/expr/_Arithmetic.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,19 @@ fun `$sqrt`(number: Expr<_Number>): Expr<_Number> =
134134

135135
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/subtract/ */
136136
@BsonMarker2
137-
@JvmName("subtract_Number_Number")
137+
@JvmName($$"$subtract_Number_Number")
138138
fun `$subtract`(expression1: Expr<_Number>, expression2: Expr<_Number>): Expr<_Number> =
139139
Expr { `$subtract` by array(expression1.element, expression2.element) }
140140

141141
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/subtract/ */
142142
@BsonMarker2
143-
@JvmName("subtract_DateTime_Number")
143+
@JvmName($$"$subtract_DateTime_Number")
144144
fun `$subtract`(expression1: Expr<_DateTime>, expression2: Expr<_Number>): Expr<_DateTime> =
145145
Expr { `$subtract` by array(expression1.element, expression2.element) }
146146

147147
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/subtract/ */
148148
@BsonMarker2
149-
@JvmName("subtract_DateTime_DateTime")
149+
@JvmName($$"$subtract_DateTime_DateTime")
150150
fun `$subtract`(expression1: Expr<_DateTime>, expression2: Expr<_DateTime>): Expr<_Number> =
151151
Expr { `$subtract` by array(expression1.element, expression2.element) }
152152

module-mongokt/src/commonMain/kotlin/expr/_Array.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ fun `$slice`(array: Expr<_Array>, position: Expr<_Number>, n: Expr<_Number>): Ex
240240

241241
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/sortArray/ */
242242
@BsonMarker2
243-
@JvmName("sortArray_Array_Number")
243+
@JvmName($$"$sortArray_Array_Number")
244244
fun `$sortArray`(input: Expr<_Array>, sortBy: Expr<_Number>): Expr<_Array> =
245245
Expr { `$sortArray` by { "input" by input.element; "sortBy" by sortBy.element } }
246246

247247
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/sortArray/ */
248248
@BsonMarker2
249-
@JvmName("sortArray_Array_Document")
249+
@JvmName($$"$sortArray_Array_Document")
250250
fun `$sortArray`(input: Expr<_Array>, sortBy: Expr<_Document>): Expr<_Array> =
251251
Expr { `$sortArray` by { "input" by input.element; "sortBy" by sortBy.element } }
252252

module-mongokt/src/commonMain/kotlin/expr/_DataSize.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import org.cufy.mongodb.expr.Expr.*
1616

1717
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/binarySize/ */
1818
@BsonMarker2
19-
@JvmName("binarySize_String")
19+
@JvmName($$"$binarySize_String")
2020
fun `$binarySize`(string: Expr<_String>): Expr<_Number> =
2121
Expr { `$binarySize` by string.element }
2222

2323
/** https://www.mongodb.com/docs/manual/reference/operator/aggregation/binarySize/ */
2424
@BsonMarker2
25-
@JvmName("binarySize_Binary")
25+
@JvmName($$"$binarySize_Binary")
2626
fun `$binarySize`(binary: Expr<_Binary>): Expr<_Number> =
2727
Expr { `$binarySize` by binary.element }
2828

module-mongokt/src/commonMain/kotlin/filters/_Comparison.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,18 @@ infix fun String.`$gte`(value: BsonElement) =
5252
/* ============= ------------------ ============= */
5353

5454
/** https://www.mongodb.com/docs/manual/reference/operator/query/in */
55-
@Suppress("FunctionName")
5655
@BsonMarker2
5756
context(_: /* Operator */BsonDocumentBuilder)
5857
fun `$in`(vararg values: BsonElement) =
5958
`$in` by array(*values)
6059

6160
/** https://www.mongodb.com/docs/manual/reference/operator/query/in */
62-
@Suppress("FunctionName")
6361
@BsonMarker2
6462
context(_: /* Operator */BsonDocumentBuilder)
6563
fun `$in`(values: List<BsonElement>) =
6664
`$in` by values
6765

6866
/** https://www.mongodb.com/docs/manual/reference/operator/query/in */
69-
@Suppress("FunctionName")
7067
@BsonMarker2
7168
context(_: /* Query */BsonDocumentBuilder)
7269
infix fun String.`$in`(values: List<BsonElement>) =

module-mongokt/src/commonMain/kotlin/filters/_Element.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ fun `$type`(type: String) =
3838

3939
/** https://www.mongodb.com/docs/manual/reference/operator/query/type */
4040
@BsonMarker2
41-
@JvmName("type_List<Int>")
41+
@JvmName($$"$type_List<Int>")
4242
context(_: /* Operator */BsonDocumentBuilder)
4343
fun `$type`(types: List<Int>) =
4444
`$type` by array { types.forEach { by(it) } }
4545

4646
/** https://www.mongodb.com/docs/manual/reference/operator/query/type */
4747
@BsonMarker2
48-
@JvmName("type_List<String>")
48+
@JvmName($$"$type_List<String>")
4949
context(_: /* Operator */BsonDocumentBuilder)
5050
fun `$type`(types: List<String>) =
5151
`$type` by array { types.forEach { by(it) } }
@@ -64,14 +64,14 @@ infix fun String.`$type`(type: String) =
6464

6565
/** https://www.mongodb.com/docs/manual/reference/operator/query/type */
6666
@BsonMarker2
67-
@JvmName("String_type_List<Int>")
67+
@JvmName($$"String_$type_List<Int>")
6868
context(_: /* Query */BsonDocumentBuilder)
6969
infix fun String.`$type`(types: List<Int>) =
7070
this by { `$type` by array { types.forEach { contextOf().add(it.bson) } } }
7171

7272
/** https://www.mongodb.com/docs/manual/reference/operator/query/type */
7373
@BsonMarker2
74-
@JvmName("String_type_List<String>")
74+
@JvmName($$"String_$type_List<String>")
7575
context(_: /* Query */BsonDocumentBuilder)
7676
infix fun String.`$type`(types: List<String>) =
7777
this by { `$type` by array { types.forEach { contextOf().add(it.bson) } } }

module-mongokt/src/commonMain/kotlin/filters/_Evaluation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fun `$mod`(divisor: Long, remainder: Long) =
5757

5858
/** https://www.mongodb.com/docs/manual/reference/operator/query/regex */
5959
@BsonMarker2
60-
@JvmName("regex_String_String")
60+
@JvmName($$"$regex_String_String")
6161
context(_: /* Operator */BsonDocumentBuilder)
6262
fun `$regex`(regex: String, options: String? = null) {
6363
`$regex` by regex
@@ -74,7 +74,7 @@ fun `$regex`(regex: BsonRegExp, options: String? = null) {
7474

7575
/** https://www.mongodb.com/docs/manual/reference/operator/query/regex */
7676
@BsonMarker2
77-
@JvmName("String_regex_String")
77+
@JvmName($$"String_$regex_String")
7878
context(_: /* Query */BsonDocumentBuilder)
7979
infix fun String.`$regex`(regex: String) =
8080
this by { `$regex` by regex }

0 commit comments

Comments
 (0)