Skip to content

metadata property types #85

Description

@pcostell

Right now the metadata describes a property type (string, int, etc) as a kind. This is a little overloaded with the concept of a Kind in datastore. Perhaps these could all be called type instead? Then metadata would look like:

registerKind('namespace', 'Author', {
    name: { type: STRING, indexed: false },
    tags: { type: STRING, multi: true }, // an array of string elements.
    favArticles: { type: KEY, multi: true }
    contact: {
        kind: {
          telephone: { type: STRING },
          email: { type: STRING }
        }
    }
});

Activity

  1. added this to the milestone on Aug 1, 2014
  2. rakyll commented on Aug 1, 2014

    @rakyll
    Contributor

    Agreed, I will replace kind with type when we support schema.

  3. added a commit that references this issue on Aug 30, 2014
    ef45b39
  4. changed the title [-]datastore: metadata property types[/-] [+]metadata property types[/+] on Jan 20, 2015
  5. modified the milestones: Datastore Stable, , Datastore Future on Feb 2, 2015
  6. stephenplusplus commented on Nov 23, 2015

    @stephenplusplus
    Contributor

    @pcostell obviously, a lot has changed over the last 15 months. Is there anything for me to do here?

  7. pcostell commented on Nov 23, 2015

    @pcostell
    ContributorAuthor

    I don't think so. Did this metadata registration ever make it into the project?

  8. stephenplusplus commented on Nov 23, 2015

    @stephenplusplus
    Contributor

    Nope. In general, our library is pretty relaxed when it comes to types and validation and such. Beyond common utilities, we leave it to the user to create helpers where they make sense given their own projects and workflows. Then, where applicable, we let the API catch any errors from input mismatches.

    Datastore is arguably the most complex API we support, so I can see how it could be valuable in this case, however. What do you think? Would the majority of codebases using Datastore benefit from this concept?

  9. pcostell commented on Nov 23, 2015

    @pcostell
    ContributorAuthor

    I think that would be more beneficial for a higher level, maybe 3rd party library. Or even some sort of adapter to an existing framework. I think keeping the gcloud API relatively simple is better.

  10. 86 remaining items

  11. added a commit that references this issue on Feb 25, 2026
  12. added a commit that references this issue on Mar 5, 2026
  13. added a commit that references this issue on Mar 18, 2026
  14. added 2 commits that reference this issue on Mar 23, 2026
    c46b83b
    eb9fc1c
  15. added a commit that references this issue on Mar 27, 2026
    4a56a10
  16. added a commit that references this issue on May 5, 2026
    bddcf06
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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions