MongDB日常操作
记录下日常的MongoDB操作命令: //新建库 use iceportal_image //新建collection db.createCollection("xxx-acc",{autoIndexId : true}) ; db.createCollection("xxx-img",{autoIndexId : true}) ; //插入数据 db.getCollection("xxx-img").insert( {_id:ObjectId(), xxId:"xxx21749", caption:"GT", nameZh:"大唐", nameEn:"xs", category:"xss", xxxCode:"STSSW", url:"/xme/bb", imageName:"xss", extension:".jpg", specs:"12x15", isDefault:"1", publicId:"64556", fileHashCode:"32666", isDeleted:"1", createTime:ObjectId("5349b4ddd2781d08c09890f4").getTimestamp(), updateTime:ObjectId("5349b4ddd2781d08c09890f4").getTimestamp() } ) db.getCollection