[英]google app engine OR filter
I want to do an OR filter within google app engine. 我想在Google App Engine中做一个OR过滤器。
For example: 例如:
class MyModel(db.Model):
name = db.StringPropery()
description = db. StringPropery()
The following will return all "MyModel" instances with name = steve AND description = "some text" 以下将返回所有名称为“ steve AND AND description =” some text”的“ MyModel”实例
results = MyModel.all().filter("name =", "steve").filter("description =","some text").fetch(10)
What syntax do I use to change this to an OR statement? 我使用什么语法将其更改为OR语句? Or do I need to do two queries and then merge them somehow? 还是我需要做两个查询,然后以某种方式合并它们?
I found another thread with some answers here: app-engine-datastore-does-not-support-operator-or 我在这里找到了另一个带有一些答案的线程: app-engine-datastore-does-not-support-operator-or
Not sure how to mark this as a duplicate. 不知道如何将其标记为重复项。 Sorry. 抱歉。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.