File tree Expand file tree Collapse file tree 3 files changed +0
-24
lines changed
Expand file tree Collapse file tree 3 files changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -467,27 +467,11 @@ def keys_only_query(client):
467467 query .keys_only ()
468468 # [END datastore_keys_only_query]
469469
470- # [START datastore_run_keys_only_query]
471470 keys = list ([entity .key for entity in query .fetch (limit = 10 )])
472- # [END datastore_run_keys_only_query]
473471
474472 return keys
475473
476474
477- def distinct_query (client ):
478- # Create the entity that we're going to query.
479- upsert (client )
480-
481- # [START datastore_distinct_query]
482- query = client .query (kind = 'Task' )
483- query .distinct_on = ['category' , 'priority' ]
484- query .order = ['category' , 'priority' ]
485- query .projection = ['category' , 'priority' ]
486- # [END datastore_distinct_query]
487-
488- return list (query .fetch ())
489-
490-
491475def distinct_on_query (client ):
492476 # Create the entity that we're going to query.
493477 upsert (client )
Original file line number Diff line number Diff line change @@ -191,12 +191,6 @@ def test_keys_only_query(self, client):
191191 client .query (kind = 'Task' ).fetch ())
192192 assert keys
193193
194- @eventually_consistent .mark
195- def test_distinct_query (self , client ):
196- tasks = snippets .distinct_query (client )
197- client .entities_to_delete .extend (tasks )
198- assert tasks
199-
200194 @eventually_consistent .mark
201195 def test_distinct_on_query (self , client ):
202196 tasks = snippets .distinct_on_query (client )
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def delete_task(client, task_id):
7474# [END datastore_delete_entity]
7575
7676
77- # [START datastore_format_results]
7877def format_tasks (tasks ):
7978 lines = []
8079 for task in tasks :
@@ -87,7 +86,6 @@ def format_tasks(tasks):
8786 task .key .id , task ['description' ], status ))
8887
8988 return '\n ' .join (lines )
90- # [END datastore_format_results]
9189
9290
9391def new_command (client , args ):
You can’t perform that action at this time.
0 commit comments