mongodb学习5--mongo的type类型

db.active.group({key:{id:1},cond:{cd:20160913,cid:"fgsdljsdv",aid:"54465"},reduce:function(obj,prev){prev.cnum++},initial:{cnum:0}}).forEach(
function(x){
var res1=db.active.find({cd:20160910,cid:'fgsdljsdv',aid:'54465',idfa:x.id});
if(res1.hasNext()){
x.cd=20160910,
db.temp_1142922596_today.insert(x);
}
}
) db.active.find({idfa:{$type:2}}).count()
Type Description Type value
Double 1
String 2
Object 3
Array 4
Binary data 5
Object id 7
Boolean 8
Date 9
Null 10
Regular expression 11
JavaScript code 13
Symbol 14
JavaScript code with scope 15
32-bit integer 16
Timestamp 17
64-bit integer 18
Min key 255
Max key 127
上一篇:sqli-labs(八)——修改密码处sql注入+http头sql注入


下一篇:js将当前时间格式化为年-月-日 时:分:秒