Google App Engine和SQL LIKE [英] Google App Engine and SQL LIKE

查看:89
本文介绍了Google App Engine和SQL LIKE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用类似于SQL LIKE语句的过滤器来查询GAE数据存储?例如,如果一个类有一个字符串字段,并且我想查找所有在该字符串中具有特定关键字的类,那我该怎么做?
看起来JDOQL的matches()不起作用...我错过了什么?

Is there any way to query GAE datastore with filter similar to SQL LIKE statement? For example, if a class has a string field, and I want to find all classes that have some specific keyword in that string, how can I do that? It looks like JDOQL's matches() don't work... Am I missing something?

欢迎任何评论,链接或代码片段

Any comments, links or code fragments are welcome

推荐答案

正如GAE / J文档所言,BigTable没有这种本地支持。您可以将JDOQL String.matches用于something%(即startsWith)。这就是全部。否则,请在内存中进行评估。

As the GAE/J docs say, BigTable doesn't have such native support. You can use JDOQL String.matches for "something%" (i.e startsWith). That's all there is. Evaluate it in-memory otherwise.

这篇关于Google App Engine和SQL LIKE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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