Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to specify a projection for ndb.get_multi()?

Using NDB, it is possible to specify a projection for a query, allowing to limit the number of properties that are retrieved for the entities that match the query.

However, I couldn't find anything in the documentation about how to specify a projection when using ndb.get_multi(), which always fetches complete entities.

Is there a way to fetch only certain properties when using ndb.get_multi()?

like image 372
Pascal Bourque Avatar asked Dec 26 '22 19:12

Pascal Bourque


1 Answers

No, the projection feature only works for queries. There would be no advantage (in terms of fewer I/O operations) to projecting get() operations.

like image 101
Guido van Rossum Avatar answered Jan 18 '23 16:01

Guido van Rossum