Skip to content

datastore: default to empty dataset #121

Closed

Description

@pcostell

When working with datasets, the Datastore backend will normalize any empty datasets to the dataset of the calling application. This should be preferred to prepending "s~" to dataset ids as that is not always a valid operation.

Activity

  1. added this to the milestone on Sep 5, 2014
  2. tseaver commented on Sep 22, 2014

    @tseaver
    Contributor

    The 'to_protobuf' method of gcloud.datastore.key.Key jams a 's~' prefix onto the key's dataset_id, if the ID does not already have a 's~' or 'e~' prefix:

    https://github.com/GoogleCloudPlatform/gcloud-python/blob/1f2aaf3606802f4f02eeb30e22e1082ef7f4594e/gcloud/datastore/key.py#L60

    @pcostell Is that the normalization you are thinking of?

  3. pcostell commented on Sep 22, 2014

    @pcostell
    ContributorAuthor

    Yes that's the normalization that is not needed. The datastore backend is smart about looking up the correct dataset for the application.

  4. self-assigned this
    on Oct 17, 2014
  5. added a commit that references this issue on Oct 20, 2014
    88b0ec7
  6. tseaver commented on Oct 20, 2014

    @tseaver
    Contributor

    The fix in #259 is not correct / complete. See:

  7. added a commit that references this issue on Oct 21, 2014
    374cdf8
  8. added a commit that references this issue on Oct 21, 2014
    8b97707
  9. dhermes commented on Oct 21, 2014

    @dhermes
    Contributor

    You'd figure GitHub wouldn't auto-close on their own reverts?

  10. 99 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions