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

Method to_mongo

mongoengine/base/fields.py:221–223  ·  view source on GitHub ↗

Convert a Python type to a MongoDB-compatible type.

(self, value)

Source from the content-addressed store, hash-verified

219 return value
220
221 def to_mongo(self, value):
222 """Convert a Python type to a MongoDB-compatible type."""
223 return self.to_python(value)
224
225 def _to_mongo_safe_call(self, value, use_db_field=True, fields=None):
226 """Helper method to call to_mongo with proper inputs."""

Callers 4

_to_mongo_safe_callMethod · 0.95
insertMethod · 0.45
updateFunction · 0.45
to_mongoMethod · 0.45

Calls 1

to_pythonMethod · 0.95

Tested by

no test coverage detected