$where $options: 'g','i'
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},false,false) 存在更新一条记录,不存在不插入upsert,multi
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},false,true) 存在更新多条记录,不存在不插入
db.classes.update({"count":{$gt:20}},{$set:{"name":"c4"}},true,false) 存在更新一条记录,不存在插入
db.usercollection.find({name: {$exists: true}, $where: "this.name.length > 40"}).limit(2);
db.apps.find({$where:"(this.id.length gt 6) && (this.id.length lt 15) " } ).count();
db.table1.find({$where:'this.a == this.b'})
$regex: 'Value_2', $options: 'g' }
随机推荐
- Python中的join()函数split()函数
函数:string.join() Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组.将字符串.元组.列表中的元素以指定的 ...
- TortoiseSvn
TortoiseSVN 是svn版本控制系统的一个免费开源客户端,它是svn版本控制的 Windows 扩展.可以使你避免使用枯燥而且不方便的命令行.它完全嵌入 Windows Explorer,使用 ...
- 转:Eric Lippert:阅读代码真的很难
转自:http://blog.jobbole.com/438/ 相关文章 微软资深软件工程师:阅读代码真的很难(第2篇) 阅读优秀代码是提高开发人员修为的一种捷径 学会阅读源代码 如何阅读大型代码库? ...
- 转:随机函数 C++中rand()函数的用法
转自:http://blog.163.com/wujiaxing009@126/blog/static/719883992011113011359154/ 一.C++中不能使用random()函数 ...
- 牛客网 --java问答题
http://www.nowcoder.com/ 主要是自己什么都不怎么会.在这里可以学习很多的! 第一天看题自己回答,第二天看牛客网的答案! 1 什么是Java虚拟机?为什么Java被称作是“平台无 ...
- Material Design Button 样式
132down voteaccepted I will add my answer since I don't use any of the other answers provided. With ...
- worker中加载本地文件报错的解决方案
如果在一个swf的主线程中加载文件时,报安全沙箱的错误, 网上有诸多的解决方案.但是如果在一个worker中加载本地文件报类似如下的错误: *** 安全沙箱冲突 *** SecurityError: ...
- Python 练习 21
#!/usr/bin/python # -*- coding: UTF-8 -*- h = 0 leap = 1 from math import sqrt from sys import stdou ...
- [maven] 跳过单元测试
1.mvn命令 $ mvn install -Dmaven.test.skip=true 2.通过配置pom <project> [...] <build> <plugi ...
- [saiku] JCR在saiku中的运用原理
转载自: 什么是JAVA内容仓库(Java Content Repository)(1) 什么是JAVA内容仓库(Java Content Repository)(2) 什么是JAVA内容仓库(Jav ...