Skip to content

Delete unused Datastore region tags / samples. #1531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions datastore/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,27 +467,11 @@ def keys_only_query(client):
query.keys_only()
# [END datastore_keys_only_query]

# [START datastore_run_keys_only_query]
keys = list([entity.key for entity in query.fetch(limit=10)])
# [END datastore_run_keys_only_query]

return keys


def distinct_query(client):
# Create the entity that we're going to query.
upsert(client)

# [START datastore_distinct_query]
query = client.query(kind='Task')
query.distinct_on = ['category', 'priority']
query.order = ['category', 'priority']
query.projection = ['category', 'priority']
# [END datastore_distinct_query]

return list(query.fetch())


def distinct_on_query(client):
# Create the entity that we're going to query.
upsert(client)
Expand Down
6 changes: 0 additions & 6 deletions datastore/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,6 @@ def test_keys_only_query(self, client):
client.query(kind='Task').fetch())
assert keys

@eventually_consistent.mark
def test_distinct_query(self, client):
tasks = snippets.distinct_query(client)
client.entities_to_delete.extend(tasks)
assert tasks

@eventually_consistent.mark
def test_distinct_on_query(self, client):
tasks = snippets.distinct_on_query(client)
Expand Down
2 changes: 0 additions & 2 deletions datastore/cloud-client/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def delete_task(client, task_id):
# [END datastore_delete_entity]


# [START datastore_format_results]
def format_tasks(tasks):
lines = []
for task in tasks:
Expand All @@ -87,7 +86,6 @@ def format_tasks(tasks):
task.key.id, task['description'], status))

return '\n'.join(lines)
# [END datastore_format_results]


def new_command(client, args):
Expand Down