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

Function get_mongodb_version

mongoengine/mongodb_support.py:18–24  ·  view source on GitHub ↗

Return the version of the default connected mongoDB (first 2 digits) :return: tuple(int, int)

()

Source from the content-addressed store, hash-verified

16
17
18def get_mongodb_version():
19 """Return the version of the default connected mongoDB (first 2 digits)
20
21 :return: tuple(int, int)
22 """
23 version_list = get_connection().server_info()["versionArray"][:2] # e.g: (3, 2)
24 return tuple(version_list)

Callers 8

_innerFunction · 0.90
setUpMethod · 0.90
test_reload_shardedMethod · 0.90
test_covered_indexMethod · 0.90

Calls 1

get_connectionFunction · 0.90