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):
467
467
query .keys_only ()
468
468
# [END datastore_keys_only_query]
469
469
470
- # [START datastore_run_keys_only_query]
471
470
keys = list ([entity .key for entity in query .fetch (limit = 10 )])
472
- # [END datastore_run_keys_only_query]
473
471
474
472
return keys
475
473
476
474
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
-
491
475
def distinct_on_query (client ):
492
476
# Create the entity that we're going to query.
493
477
upsert (client )
Original file line number Diff line number Diff line change @@ -191,12 +191,6 @@ def test_keys_only_query(self, client):
191
191
client .query (kind = 'Task' ).fetch ())
192
192
assert keys
193
193
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
-
200
194
@eventually_consistent .mark
201
195
def test_distinct_on_query (self , client ):
202
196
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):
74
74
# [END datastore_delete_entity]
75
75
76
76
77
- # [START datastore_format_results]
78
77
def format_tasks (tasks ):
79
78
lines = []
80
79
for task in tasks :
@@ -87,7 +86,6 @@ def format_tasks(tasks):
87
86
task .key .id , task ['description' ], status ))
88
87
89
88
return '\n ' .join (lines )
90
- # [END datastore_format_results]
91
89
92
90
93
91
def new_command (client , args ):
You can’t perform that action at this time.
0 commit comments