How do I get the equivalent result of the following query in NDB?
Entity.all(keys_only=True).fetch(20)
I know you can pass 'keys_only=True'
to the iter()
method. But what if I want to perform a keys only fetch, how do I do that in NDB?
How do I get the equivalent result of the following query in NDB?
Entity.all(keys_only=True).fetch(20)
I know you can pass 'keys_only=True'
to the iter()
method. But what if I want to perform a keys only fetch, how do I do that in NDB?
Found it in the GAE NDB Docs. The answer is Entity.query().fetch(20,keys_only=True)
.
© 2022 - 2024 — McMap. All rights reserved.