How to query mongodb with “like” using the java api?(如何使用 java api 用“like查询 mongodb?)
本文介绍了如何使用 java api 用“like"查询 mongodb?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个问题与另一个post
我基本上是想用mongodb版本的sql "like" '%m%' operator
I basically want to use the mongodb version of the sql "like" '%m%' operator
但在我的情况下,我使用 mongodb 的 java api,而另一篇文章使用的是 mongodb shell
but in my situation i'm using the java api for mongodb, while the other post is using mongodb shell
我尝试了其他帖子中发布的内容,效果很好
i tried what was posted in the other thread and it worked fine
db.users.find({"name": /m
织梦狗教程
本文标题为:如何使用 java api 用“like"查询 mongodb?
基础教程推荐
猜你喜欢
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
