5

In Google App Engine, GQL(an SQL-like query mechanism foe datastore) is available only for Python Projects and not for java projects. Why is it so?

Also it there anyway to overcome this and use GQL in java projects also?

vivek_jonam
  • 3,237
  • 8
  • 32
  • 44
  • I know this isn't the answer you want but I personally think GQL was a mistake. I have been developing with appengine (python) since it came out and have never found a use for it in any project. Too many people fall into the trap of thinking GQL is SQL and therefore approach the appengine datastore with many preconcieved ideas. – Tim Hoffman Aug 05 '12 at 15:26
  • ya.. I agree GQL has many contraints.. but that would be enough for some minor applications though.. but why for python why not for java? – vivek_jonam Aug 05 '12 at 16:06
  • 1
    Check this out: [gql4j](http://code.google.com/p/gql4j/) and [ExtendedGQLParser](http://code.google.com/p/audao/wiki/ExtendedGQLParser) – Paolo Moretti Aug 05 '12 at 18:05
  • 1
    Remmeber you can not update with GQL, so you always have to abandon it at some point. – Tim Hoffman Aug 05 '12 at 23:23

1 Answers1

4

GQL isn't in the Java implementation and as a replacement you would use the Query object to build datastore queries.

If you're looking for a GQL implementation for Java, gql4j works well enough. I tested it out on a small data set to make sure it works but I haven't used it in a project otherwise.

http://code.google.com/p/gql4j/

Michael Celey
  • 12,645
  • 6
  • 57
  • 62