We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
keys
Query
1 parent b343acf commit 5bbf856Copy full SHA for 5bbf856
1 file changed
gcloud/datastore/query.py
@@ -516,6 +516,14 @@ def projection(self, projection=None):
516
clone._pb.projection.add().property.name = projection_name
517
return clone
518
519
+ def keys(self):
520
+ """Adds a projection to get keys only
521
+
522
+ :rtype: :class:`Query`
523
+ :returns: A new Query instance only returns entity keys
524
+ """
525
+ return self.projection(['__key__'])
526
527
def offset(self, offset=None):
528
"""Adds offset to the query to allow pagination.
529
0 commit comments