MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / __init__

Method __init__

mongoengine/context_managers.py:222–231  ·  view source on GitHub ↗
(self, alias=DEFAULT_CONNECTION_NAME)

Source from the content-addressed store, hash-verified

220 """
221
222 def __init__(self, alias=DEFAULT_CONNECTION_NAME):
223 self.db = get_db(alias=alias)
224 self.initial_profiling_level = None
225 self._ctx_query_counter = 0 # number of queries issued by the context
226
227 self._ignored_query = {
228 "ns": {"$ne": "%s.system.indexes" % self.db.name},
229 "op": {"$ne": "killcursors"}, # MONGODB < 3.2
230 "command.killCursors": {"$exists": False}, # MONGODB >= 3.2
231 }
232
233 def _turn_on_profiling(self):
234 profile_update_res = self.db.command({"profile": 0})

Callers

nothing calls this directly

Calls 1

get_dbFunction · 0.90

Tested by

no test coverage detected