Skip to content
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

Object Value type in Datastore? #1121

Closed
sebelga opened this issue Feb 6, 2016 · 2 comments
Closed

Object Value type in Datastore? #1121

sebelga opened this issue Feb 6, 2016 · 2 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.

Comments

@sebelga
Copy link
Contributor

sebelga commented Feb 6, 2016

Hi,
Reading the #553 issue and having a look at the valueToProperty method here https://github.com/GoogleCloudPlatform/gcloud-node/blob/bc2b57ce4e2d84a8d2ff722d677ddfe681fc8d00/lib/datastore/entity.js#L380, I suddenly realize that I can save Object Value type in the Datastore...

I am probably missing something because according to the dos from Google (https://cloud.google.com/appengine/docs/python/datastore/typesandpropertyclasses) there are no "Object" Property class....
Could someone clarify this and tell me then if it is possible to index those Object values?
Thank you!

@stephenplusplus
Copy link
Contributor

The docs you linked are for App Engine and Python :) Take a look at these docs: https://cloud.google.com/datastore/docs/concepts/entities#Datastore_Properties_and_value_types, specifically the "embedded entity". As of this version of Datastore (v1beta2), these types cannot be indexed.

And sorry about the doc confusion. I can totally relate to being overwhelmed by the amount of docs that exist for something you think should be a quick Q&A. Feel free to come back with any more questions you have so I can help find more answers 👍

@stephenplusplus stephenplusplus added type: question Request for information or clarification. Not an issue. api: datastore Issues related to the Datastore API. labels Feb 6, 2016
@sebelga
Copy link
Contributor Author

sebelga commented Feb 6, 2016

Thank you for clarifying this. I have indeed a hard time sometime to find the API reference when I google my search. Sometimes I end up in the Java section, sometimes in the Python but almost never here in gCloud... Looking at it differently: I know now how to query the Datastore in 3 languages :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants