Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 362a99c

Browse files
authored
Delete unused Datastore region tags / samples. (GoogleCloudPlatform#1531)
1 parent 84c4317 commit 362a99c

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

datastore/cloud-client/snippets.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff 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-
491475
def distinct_on_query(client):
492476
# Create the entity that we're going to query.
493477
upsert(client)

datastore/cloud-client/snippets_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

datastore/cloud-client/tasks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def delete_task(client, task_id):
7474
# [END datastore_delete_entity]
7575

7676

77-
# [START datastore_format_results]
7877
def 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

9391
def new_command(client, args):

0 commit comments

Comments
 (0)