开发者

google app engine OR filter

I want to do an OR filter within google app engine.

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"

results = MyModel.all().filter("name =", "steve").filter("description =","some text").fetch(10)

开发者_Go百科What syntax do I use to change this to an OR statement? 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

Not sure how to mark this as a duplicate. Sorry.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜