Merge pull request #1862 from bagerard/document_name_param_for_indexes

Documented that it is possible to specify a 'name' for the indexes (using the dict definition)
This commit is contained in:
erdenezul
2018-09-03 17:20:17 +08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -214,7 +214,7 @@ class query_counter(object):
"""Get the number of queries."""
ignore_query = {'ns': {'$ne': '%s.system.indexes' % self.db.name}}
count = self.db.system.profile.find(ignore_query).count() - self.counter
self.counter += 1
self.counter += 1 # Account for the query we just fired
return count