Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MongoEngine/mongoengine
/ _get_db
Method
_get_db
mongoengine/document.py:200–202 ·
view source on GitHub ↗
Some Model using other db_alias
(cls)
Source
from the content-addressed store, hash-verified
198
199
@classmethod
200
def
_get_db(cls):
201
""
"Some Model using other db_alias"
""
202
return
get_db(cls._meta.get(
"db_alias"
, DEFAULT_CONNECTION_NAME))
203
204
@classmethod
205
def
_disconnect(cls):
Callers
15
_fetch_objects
Method · 0.80
to_python
Method · 0.80
_lazy_load_ref
Method · 0.80
to_python
Method · 0.80
_lazy_load_ref
Method · 0.80
_lazy_load_ref
Method · 0.80
_get_collection
Method · 0.80
_get_capped_collection
Method · 0.80
_get_timeseries_collection
Method · 0.80
switch_db
Method · 0.80
drop_collection
Method · 0.80
map_reduce
Method · 0.80
Calls
2
get_db
Function · 0.90
get
Method · 0.45
Tested by
5
test_get_db
Method · 0.64
test_get_db
Method · 0.64
test_db_alias_tests
Method · 0.64
test_file_field_no_default
Method · 0.64
test_file_disk_space
Method · 0.64