Query in Java as in Mongo shell 【Jongo】
来源:互联网 发布:学英语哪个软件好 编辑:程序博客网 时间:2024/05/22 12:30
what ?
在 java 中直接使用 shell 操作 mongodb
how ?
DB db = new MongoClient().getDB("dbname");Jongo jongo = new Jongo(db);MongoCollection friends = jongo.getCollection("friends");MongoCursor<Friend> all = friends.find("{name: 'Joe'}").as(Friend.class);Friend one = friends.findOne("{name: 'Joe'}").as(Friend.class);
why ?
- 最直接的作用是可以简化代码量
- 在 java 中使用 shell 操作很灵活方便
- 性能更好
other
官方
http://jongo.org/
github
https://github.com/bguerout/jongo
0 0
- Query in Java as in Mongo shell 【Jongo】
- exec text in vim as Shell command!
- Invoke shell in Java
- mongo 使用 in操作
- Java Run As Service in Linux
- read file by bash shell just as getline() in c++
- java操作mongo的and,or, in操作
- Jongo
- simple query in prolog
- Query & Retrieve in DICOM
- Concat() in mysql query
- Query Occlusion in Unreal3
- rails in query
- Query user in Powershell
- In version 2.0, DB Query Analyzer will never be mistaken as virus by anti-virus software
- Live templates in AS
- "as" in Swift
- AS、LIKE、IN
- 数据库索引Database Indexing
- Java 多态
- Spring 用注解方式来进行事务管理
- Java泛型
- GSON基本使用
- Query in Java as in Mongo shell 【Jongo】
- String类为何不可变,为何final修饰
- Java 简单选择排序
- 【POJ3237】Tree(树链剖分)
- C语言编译链接流程以及重要特性在编译器中实现
- Android中如何实现后台执行定时任务
- Hive 源头获取 终点获取
- 串
- Eclipse设置注释模板