Thanks Jason.
I tried the following:
SELECT __key__ FROM MDsIri
Also,
SELECT * FROM MDsIri
No more error. But it returns "No results".
The Data Viewer shows that I have many entities.
http://code.google.com/appengine/docs/python/datastore/gqlreference.html
shows the following syntax:
SELECT [* | __key__] FROM <kind>
[WHERE <condition> [AND <condition> ...]]
[ORDER BY <property> [ASC | DESC] [, <property> [ASC |
DESC] ...]]
[LIMIT [<offset>,]<count>]
[OFFSET <offset>]
Why didn't I get any result?
On Nov 2, 4:15 pm, "Jason (Google)" <[email protected]> wrote:
> Yes, that is the correct doc for the Java indexes.
>
> Regarding your GQL query, the name of the kind is not the full name of the
> class (including the package) but the simple name. So try using MDsIri
> instead of com.col.server. MDsIri. You should be able to see any entities
> you saved in the data viewer and the valid kind names are provided in the
> drop down.
>
> - Jason
>
> On Fri, Oct 30, 2009 at 12:05 PM, Pion <[email protected]> wrote:
>
> > I found this
> >http://code.google.com/appengine/docs/java/datastore/queriesandindexe...
> > with the following example:
> > <?xml version="1.0" encoding="utf-8"?>
> > <datastore-indexes
> > xmlns="http://appengine.google.com/ns/datastore-indexes/1.0"
> > autoGenerate="true">
> > <datastore-index kind="Person" ancestor="false">
> > <property name="lastName" direction="asc" />
> > <property name="height" direction="desc" />
> > </datastore-index>
> > </datastore-indexes>
>
> > But I still cannot solve my query error.
>
> > On Oct 30, 9:34 am, Pion <[email protected]> wrote:
> > > I just deployedmy app to the GAE for the first time.
>
> > > I went to the Admin Console -> DataStore -> Indexes which says, "You
> > > have not created indexes for this application. Some types of queries
> > > require an index to be built. You can manage your indexes in an
> > > index.yaml file. Learn more abouthttp://
> > code.google.com/appengine/kb/general.html#indexes
> > > ".
>
> > >http://code.google.com/appengine/kb/general.html#indexeslinkstohttp://
> > code.google.com/appengine/docs/python/datastore/queriesandinde....
> > > It seems to be Python specific.
>
> > > What's the corresponding one on Java? It seems to be on war\WEB-INF
> > > \appengine-generated\datastore-indexes.xml. Please correct me if I am
> > > wrong. My datastore-indexes.xml is empty.
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <datastore-indexes autoGenerate="true">
>
> > > </datastore-indexes>
>
> > > Also, I didi the following:
>
> > > o Go to the Admin Console -> DataStore -> Data Viewer. It displays my
> > > low-level datastore contents.
> > > o Click the "Query (using GQL)". It displays "SELECT * FROM
> > > com.col.server.MDsIri" automatically by default.
> > > o Click "Run Query" button
> > > o It says, "Invalid GQL query string."
>
> > > I suspect because I do not have any indexes yet.
>
> > > What are the syntax to populate datastore-indexes.xml so I can do the
> > > above query.
>
> > > Thanks in advance for your help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---