I save the object commentto the data store and use it Datastore Viewerto view the stored data.
I can fulfill the following queries
select * from comment
select __key__ from comment
select Subject from comment
select Comment from comment
But I can not request
select Subject, Comment from comment
// Error: The suggested index for this query is:
// - kind: comment
// properties:
// - name: Comment
// - name: Subject
select __key__, Subject, Comment from comment
// Error: projections are not supported for the property: __key__
I can not find the link why this is wrong. These mistakes do not tell me much.
I have not set a single key or index for these objects.
The documentation reports the following:
SELECT [DISTINCT] [* | <property list> | __key__]
[FROM <kind>]
[WHERE <condition> [AND <condition> ...]]
[ORDER BY <property> [ASC | DESC] [, <property> [ASC | DESC] ...]]
[LIMIT [<offset>,]<count>]
[OFFSET <offset>]
<property list> := <property> [, <property> ...]
<condition> := <property> {< | <= | > | >= | = | != } <value>
<condition> := <property> IN <list>
<condition> := ANCESTOR IS <entity or key>
<list> := (<value> [, <value> ...]])
Subject, Comment- list of properties and valid request. But this is not so. I created an object from Go code.
source
share