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)
| 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 |