File tree Expand file tree Collapse file tree
module-mongokt/src/commonMain/kotlin/expr Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,20 @@ fun `$concatArrays`(arrays: List<Expr<_Array>>): Expr<_Array> =
3939
4040/* ============= ------------------ ============= */
4141
42+ /* * https://www.mongodb.com/docs/manual/reference/operator/aggregation/filter/ */
43+ @BsonMarker4
44+ fun `$filter` (
45+ input : Expr <_Array >,
46+ cond : Expr <_Boolean >,
47+ limit : Expr <_Number >? = null,
48+ ): Expr <_Array > = Expr {
49+ `$filter` by {
50+ " input" by input.element
51+ " cond" by cond.element
52+ if (limit != null ) " limit" by limit.element
53+ }
54+ }
55+
4256/* * https://www.mongodb.com/docs/manual/reference/operator/aggregation/filter/ */
4357@Suppress(" LocalVariableName" )
4458@BsonMarker4
@@ -133,6 +147,19 @@ fun `$lastN`(input: Expr<_Array>, n: Expr<_Number>): Expr<_Array> =
133147
134148/* ============= ------------------ ============= */
135149
150+ /* * https://www.mongodb.com/docs/manual/reference/operator/aggregation/map/ */
151+ @Suppress(" LocalVariableName" )
152+ @BsonMarker4
153+ fun `$map` (
154+ input : Expr <_Array >,
155+ _in : Expr <_Element >,
156+ ): Expr <_Array > = Expr {
157+ `$map` by {
158+ " input" by input.element
159+ " in" by _in .element
160+ }
161+ }
162+
136163/* * https://www.mongodb.com/docs/manual/reference/operator/aggregation/map/ */
137164@Suppress(" LocalVariableName" )
138165@BsonMarker4
You can’t perform that action at this time.
0 commit comments