@@ -144,7 +144,7 @@ private module PyMongo {
144
144
private class MongoMapReduceQuery extends API:: CallNode , NoSqlExecution:: Range {
145
145
MongoMapReduceQuery ( ) { this = mongoCollection ( ) .getMember ( "map_reduce" ) .getACall ( ) }
146
146
147
- override DataFlow:: Node getQuery ( ) { result in [ this .getArgByName ( "query" ) ] }
147
+ override DataFlow:: Node getQuery ( ) { result = this .getArgByName ( "query" ) }
148
148
149
149
override predicate interpretsDict ( ) { any ( ) }
150
150
@@ -178,19 +178,20 @@ private module PyMongo {
178
178
* See https://www.mongodb.com/docs/manual/reference/operator/aggregation/function/#mongodb-expression-exp.-function
179
179
*/
180
180
private class FunctionQueryOperator extends DataFlow:: Node , Decoding:: Range {
181
- API:: Node dictionary ;
182
181
DataFlow:: Node query ;
183
182
184
183
FunctionQueryOperator ( ) {
185
- dictionary =
186
- mongoCollection ( )
187
- .getMember ( mongoCollectionMethodName ( ) )
188
- .getACall ( )
189
- .getParameter ( 0 )
190
- .getASubscript * ( )
191
- .getSubscript ( "$function" ) and
192
- query = dictionary .getSubscript ( "body" ) .asSink ( ) and
193
- this = dictionary .asSink ( )
184
+ exists ( API:: Node dictionary |
185
+ dictionary =
186
+ mongoCollection ( )
187
+ .getMember ( mongoCollectionMethodName ( ) )
188
+ .getACall ( )
189
+ .getParameter ( 0 )
190
+ .getASubscript * ( )
191
+ .getSubscript ( "$function" ) and
192
+ query = dictionary .getSubscript ( "body" ) .asSink ( ) and
193
+ this = dictionary .asSink ( )
194
+ )
194
195
}
195
196
196
197
override DataFlow:: Node getAnInput ( ) { result = query }
@@ -208,19 +209,20 @@ private module PyMongo {
208
209
* See https://www.mongodb.com/docs/manual/reference/operator/aggregation/accumulator/#mongodb-group-grp.-accumulator
209
210
*/
210
211
private class AccumulatorQueryOperator extends DataFlow:: Node , Decoding:: Range {
211
- API:: Node dictionary ;
212
212
DataFlow:: Node query ;
213
213
214
214
AccumulatorQueryOperator ( ) {
215
- dictionary =
216
- mongoCollection ( )
217
- .getMember ( "aggregate" )
218
- .getACall ( )
219
- .getParameter ( 0 )
220
- .getASubscript * ( )
221
- .getSubscript ( "$accumulator" ) and
222
- query = dictionary .getSubscript ( [ "init" , "accumulate" , "merge" , "finalize" ] ) .asSink ( ) and
223
- this = dictionary .asSink ( )
215
+ exists ( API:: Node dictionary |
216
+ dictionary =
217
+ mongoCollection ( )
218
+ .getMember ( "aggregate" )
219
+ .getACall ( )
220
+ .getParameter ( 0 )
221
+ .getASubscript * ( )
222
+ .getSubscript ( "$accumulator" ) and
223
+ query = dictionary .getSubscript ( [ "init" , "accumulate" , "merge" , "finalize" ] ) .asSink ( ) and
224
+ this = dictionary .asSink ( )
225
+ )
224
226
}
225
227
226
228
override DataFlow:: Node getAnInput ( ) { result = query }
0 commit comments