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

Method as_pymongo

mongoengine/queryset/base.py:1297–1306  ·  view source on GitHub ↗

Instead of returning Document instances, return raw values from pymongo. This method is particularly useful if you don't need dereferencing and care primarily about the speed of data retrieval.

(self)

Source from the content-addressed store, hash-verified

1295 return self.scalar(*fields)
1296
1297 def as_pymongo(self):
1298 """Instead of returning Document instances, return raw values from
1299 pymongo.
1300
1301 This method is particularly useful if you don't need dereferencing
1302 and care primarily about the speed of data retrieval.
1303 """
1304 queryset = self.clone()
1305 queryset._as_pymongo = True
1306 return queryset
1307
1308 def max_time_ms(self, ms):
1309 """Wait `ms` milliseconds before killing the query on the server

Calls 1

cloneMethod · 0.95