mongo operations
Check Mongo Operate Logs
db.getCollection('oplog.rs').find({'ns':{$in:['sxa.sxacc-organizations','sxa.devices']},'op':{$in:['u','i','d']},'wall':{$gt:new ISODate('2018-05-02T08:40:51')}})
Update Mongo
db.getCollection('sxacc-organizations').update({"_id" : "12605082"},{$set:{"updateSubscriberEnabled":"true"}});
db.getCollection('sxacc-organizations').update({"_id" : "12605082"},{$set:{"updateDeviceEnabled":"true"}});
db.getCollection('sxacc-organizations').update({"_id" : "12605082"},{$set:{"detachDeviceEnabled":"true"}});
db.getCollection('sxacc-organizations').find({"_id" : "12605082"}); – check if the options are set successfully
mongoexport -h localhost --db sxa --collection sxacc-devices --out sxacc-devices.json --query='{"orgId":"57550"}'
mongoimport --host cdtsxacc01.calix.local --db=sxa --collection=sxacc_devices --file=sxacc-devices.json
db.inventory.deleteOne( { status: "D" } )
db.collection.deleteMany(
<filter>,
{
writeConcern: <document>,
collation: <document>
}
)
mongo test --eval "printjson(db.getCollectionNames())"
TODO
mongo operations的更多相关文章
- SpringDataMongoDB介绍(一)-入门
SpringDataMongoDB介绍(一)-入门 本文介绍如何应用SpringDataMongoDB操作实体和数据库,本文只介绍最基本的例子,复杂的例子在后面的文章中介绍. SpringDataMo ...
- MongoDB入门(7)- SpringDataMongoDB
入门 本文介绍如何应用SpringDataMongoDB操作实体和数据库,本文只介绍最基本的例子,复杂的例子在后面的文章中介绍. SpringDataMongoDB简介 SpringDataMongo ...
- MongoDB - MongoDB CRUD Operations, Query Documents, Iterate a Cursor in the mongo Shell
The db.collection.find() method returns a cursor. To access the documents, you need to iterate the c ...
- golang mgo的mongo连接池设置:必须手动加上maxPoolSize
本司礼物系统使用了golang的 mongo库 mgo,中间踩了一些坑,总结下避免大家再踩坑 golang的mgo库说明里是说明了开启连接复用的,但观察实验发现,这并没有根本实现连接的控制,连接复用仅 ...
- MongoDB—— 读操作 Core MongoDB Operations (CRUD)
本文主要介绍内容:从MongoDB中请求数据的不同的方法 Note:All of the examples in this document use the mongo shell interface ...
- MongoDB - The mongo Shell, mongo Shell Quick Reference
mongo Shell Command History You can retrieve previous commands issued in the mongo shell with the up ...
- MongoDB - The mongo Shell, Write Scripts for the mongo Shell
You can write scripts for the mongo shell in JavaScript that manipulate data in MongoDB or perform a ...
- MongoDB - The mongo Shell, Access the mongo Shell Help
In addition to the documentation in the MongoDB Manual, the mongo shell provides some additional inf ...
- MongoDB - The mongo Shell, Configure the mongo Shell
Customize the Prompt You may modify the content of the prompt by setting the variable prompt in the ...
随机推荐
- 权限管理ranger
为超级管理员airflow赋权: 在ranger 中的hive中加入root policy, url policy 在hdfs中加入/ 的poclicy 你如果需要自动ldap同步,时间1小时,ran ...
- K8S从入门到放弃系列-(14)Kubernetes集群Dashboard部署
Dashboard是k8s的web界面,用户可以用 Kubernetes Dashboard 部署容器化的应用.监控应用.并对集群本身进行管理,在 Kubernetes Dashboard 中可以查看 ...
- ElasticSearch入门-基本概念介绍以及安装
Elasticsearch基本概念 Elasticsearch是基于Lucene的全文检索库,本质也是存储数据,很多概念与传统关系型数据库类似. 传统关系型数据库与Elasticsearch进行概念对 ...
- Error: errCode: -404011 cloud function execution error | errMsg: clou……错误
在开通了云开发之后,无论点击小程序获取openid按钮报,Error: errCode: -404011 cloud function execution error | errMsg: clou…… ...
- Python笔记004-Python最基本内置数据类型和运算符
第二章(1)Python编程基础概念 1. 最基本内置数据类型和运算符 每个对象都有类型,Python 中最基本的内置数据类型: 1. 整数 整数,2345 ,10 ,50 2. 浮点型 小数,3.1 ...
- Python之正则表达式笔记
概述 概念 Regular Expression 一种文本模式,描述在搜索文本时要匹配的一个或多个字符串 典型场景 数据验证.文本扫描.文本提取.文本替换.文本分割 语法 字面值 普通字符 需转义:\ ...
- awr报告没有数据11.2.0.3
有个朋友,反馈AWR没有数据: 咨询版本:oracle企业版本11.2.0.3 SQL> select * from v$version; BANNER -------------------- ...
- sqlyog 如何导出建表语句
真傻了,这个问题弄了半天. 解决 点击表名后,在右侧的信息栏里面有啊: PS - 个人博客链接:sqlyog 如何导出建表语句
- java注解日志记录到数据库
1. pom添加依赖包 <!--添加aop依赖--><dependency> <groupId>org.springframework.boot</group ...
- leetcode-63. Unique Paths II · DP + vector
题面 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). ...