I store comment
entity in Datastore and I use Datastore Viewer
to see stored data.
I can do following queries
select * from comment
select __key__ from comment
select Subject from comment
select Comment from comment
But I can't query
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't find any reference why it is wrong. These errors does not tell me much.
I have not set any key or index for these entities.
Documentation tells 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
- is property list and it valid query. But it is not.
I created entity from Go code.