摘要: // 获得数据库服务 Mongo m = new Mongo("localhost", 27017); // 得到数据库mytest DB db = m.getDB("dbtest"); // 得到mytest数据库下所有表名 Set colls =... 阅读全文
posted @ 2012-12-27 16:16 互联互通社区 阅读(37) 评论(0) 推荐(0)
摘要: MongoDB条件操作符 $gt : > $lt : = $lte: $in : in $nin: not in $all: all $not: 反匹配(1.3.3及以上版本) 阅读全文
posted @ 2012-12-27 15:10 互联互通社区 阅读(33) 评论(0) 推荐(0)
摘要: 首先要启动MongoDB shell工具,即bin下的mongo.exe常用shell命令如下:1、查询本地所有数据库名称> show dbs;2、切换至指定数据库环境(若无指定的数据库,则创建新的库)> use dbtest;切换至dbtest库或创建名为d... 阅读全文
posted @ 2012-12-27 14:26 互联互通社区 阅读(152) 评论(0) 推荐(0)