Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 267416f

Browse files
author
Max Schaefer
committed
Rename a predicate to clarify that it is MongoDB specific.
1 parent cc24a88 commit 267416f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ql/src/semmle/go/frameworks/NoSQL.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module NoSQL {
3333
* [go.mongodb.org/mongo-driver/mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo)
3434
* interprets parameter `n` as a query.
3535
*/
36-
private predicate collectionMethods(string name, int n) {
36+
private predicate mongoDbCollectionMethod(string name, int n) {
3737
// func (coll *Collection) CountDocuments(ctx context.Context, filter interface{},
3838
// opts ...*options.CountOptions) (int64, error)
3939
name = "CountDocuments" and n = 1
@@ -98,7 +98,7 @@ module NoSQL {
9898
private class MongoDbCollectionQuery extends Range {
9999
MongoDbCollectionQuery() {
100100
exists(Method meth, string methodName, int n |
101-
collectionMethods(methodName, n) and
101+
mongoDbCollectionMethod(methodName, n) and
102102
meth.hasQualifiedName("go.mongodb.org/mongo-driver/mongo", "Collection", methodName) and
103103
this = meth.getACall().getArgument(n)
104104
)

0 commit comments

Comments
 (0)