开发者

SQL query in Google App Engine in Java?

开发者 https://www.devze.com 2023-02-14 05:11 出处:网络
I have to get all the entities in Google Datastore that fulfill a particular criteria I have 3 fields:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消