简体   繁体   English

Java中的Google App Engine中的SQL查询?

[英]SQL query in Google App Engine in Java?

I have to get all the entities in Google Datastore that fulfill a particular criteria 我必须获取Google数据存储区中满足特定条件的所有实体

I have 3 fields: 我有3个领域:

marks1, marks2, marks3

I want the entities that have marks greater than 60 in all the fields 我希望在所有字段中标记大于60的实体

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. 我该如何绕过呢。.请提出一种不占用大量内存或处理器的解决方案。

在您的实体中添加一个布尔属性allMarksGreaterThan60,并在每次标记之一更改时重新计算其值。

Alternatively, cou can now use Google Cloud Sql. 另外,cou现在可以使用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. 有关如何在Java上启动和运行的信息,请参见https://developers.google.com/cloud-sql/docs/developers_guide_java It's basically managed MySQL using standard jdbc to talk to App Engine. 它基本上是通过使用标准jdbc与App Engine进行对话来管理的MySQL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM