在Google App Engine数据模型中进行'OR'查询 [英] Making 'OR' Queries in Google App Engine Data Model

查看:74
本文介绍了在Google App Engine数据模型中进行'OR'查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想进行这样的查询从Person where Address =OR age =选择姓名。这在GAE模型中是可行的吗?所有的东西都包括AND关闭,而不是OR。我该如何使用JDO / JPA来实现对象化。提前致谢

I want to make a query like this "Select name from Person where Address="" OR age="" ". Is that possible in the GAE model. All things include AND closure and not OR. How can i do that with JDO/JPA, Objectify. Thanks in advance

推荐答案

数据存储没有OR操作。您必须执行两个单独的查询并在您自己的代码中找到交集。

There is no "OR" operation on the datastore. You must do two separate queries and find the intersection in your own code.

http://code.google.com/appengine/docs/python/datastore/gqlreference.html

这篇关于在Google App Engine数据模型中进行'OR'查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆