SQL query in Google App Engine in Java?
I have to get all the entities in Google Datastore that fulfill a particular criteria
I have 3 fields:
marks1, marks2, marks3
I want the entities that h开发者_JAVA百科ave marks greater than 60 in all the fields
but since datastore allows inequality operator on a single field.
How can I bypass that.. Please suggest a solution that is not memory or processor intensive.
Add a boolean property allMarksGreaterThan60 in your entity, and recompute its value each time one of the marks changes.
Alternatively, cou can now use Google Cloud Sql. See https://developers.google.com/cloud-sql/docs/developers_guide_java for information on how to get up and running on Java. It's basically managed MySQL using standard jdbc to talk to App Engine.
精彩评论