Rename a predicate to clarify that it is MongoDB specific.

This commit is contained in:
Max Schaefer 2020-05-20 10:08:49 +01:00
Родитель cc24a8879f
Коммит 267416f61f
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -33,7 +33,7 @@ module NoSQL {
* [go.mongodb.org/mongo-driver/mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo)
* interprets parameter `n` as a query.
*/
private predicate collectionMethods(string name, int n) {
private predicate mongoDbCollectionMethod(string name, int n) {
// func (coll *Collection) CountDocuments(ctx context.Context, filter interface{},
// opts ...*options.CountOptions) (int64, error)
name = "CountDocuments" and n = 1
@ -98,7 +98,7 @@ module NoSQL {
private class MongoDbCollectionQuery extends Range {
MongoDbCollectionQuery() {
exists(Method meth, string methodName, int n |
collectionMethods(methodName, n) and
mongoDbCollectionMethod(methodName, n) and
meth.hasQualifiedName("go.mongodb.org/mongo-driver/mongo", "Collection", methodName) and
this = meth.getACall().getArgument(n)
)