1. 首页
  2. 数据库
  3. 其它
  4. mongodb BSON的基本使用教程

mongodb BSON的基本使用教程

上传者: 2020-12-21 00:57:46上传 PDF文件 54.46KB 热度 11次
查找 Find m := bson.M{ "create_time": bson.M{ "$gte": start, "$lte": end, }, "account": account, "tag": "tag", } session.DB("db").C("collect").Find(m).Count() 这里查找时间戳内,账号为account,标签为tag的数据并统计个数。 聚合管道在mgo中为Pipe(pipeline interface{}) 这个和bash中使用的管道很像,数据可以被层层处理。一般传入的参数为[
下载地址
用户评论