摘要:返回內(nèi)容查詢出來后顯示的結(jié)果樣式,可以用和控制是否顯示。修飾符文件使用進行鏈接對應(yīng)的集合聲明變量,并把查詢結(jié)果賦值給利用游標(biāo)的進行循環(huán)輸出結(jié)果。到此的基礎(chǔ)操作就結(jié)束了,但是我們還沒有結(jié)束呢,下一節(jié)我們會用配合使用哦
find查詢操作是我們平時再開發(fā)中最常用的,也是重中之重。
find基本操作符
// 批量插入數(shù)據(jù) var workmate1={ name:"JSPang", age:33, sex:1, job:"前端", skill:{ skillOne:"HTML+CSS", skillTwo:"JavaScript", skillThree:"PHP" }, regeditTime:new Date(), interest:[] } var workmate2={ name:"ShengLei", age:31, sex:1, job:"JAVA后端", skill:{ skillOne:"HTML+CSS", skillTwo:"J2EE", skillThree:"PPT" }, regeditTime:new Date(), interest:[] } var workmate3={ name:"MinJie", age:18, sex:0, job:"UI", skill:{ skillOne:"PhotoShop", skillTwo:"UI", skillThree:"PPT" }, regeditTime:new Date(), interest:[] } var workmate4={ name:"XiaoWang", age:25, sex:1, job:"UI", skill:{ skillOne:"PhotoShop", skillTwo:"UI", skillThree:"PPT" }, regeditTime:new Date(), interest:[] } var workmate5={ name:"LiangPeng", age:28, sex:1, job:"前端", skill:{ skillOne:"HTML+CSS", skillTwo:"JavaScript", }, regeditTime:new Date(), interest:[] } var workmate6={ name:"HouFei", age:25, sex:0, job:"前端", skill:{ skillOne:"HTML+CSS", skillTwo:"JavaScript", }, regeditTime:new Date(), interest:[] } var workmate7={ name:"LiuYan", age:35, sex:0, job:"美工", skill:{ skillOne:"PhotoShop", skillTwo:"CAD", }, regeditTime:new Date(), interest:[] } var workmate8={ name:"DingLu", age:20, sex:0, job:"美工", skill:{ skillOne:"PhotoShop", skillTwo:"CAD", }, regeditTime:new Date(), interest:[] } var workmate9={ name:"JiaPeng", age:29, sex:1, job:"前端", skill:{ skillOne:"HTML+CSS", skillTwo:"JavaScript", skillThree:"PHP" }, regeditTime:new Date(), interest:[] } var workmate10={ name:"LiJia", age:26, sex:0, job:"前端", skill:{ skillOne:"HTML+CSS", skillTwo:"JavaScript", skillThree:"PHP" }, regeditTime:new Date(), interest:[] } var db=connect("company"); var workmateArray=[workmate1,workmate2,workmate3,workmate4,workmate5,workmate6,workmate7,workmate8,workmate9,workmate10]; db.workmate.insert(workmateArray); print("[SUCCESS]:The data was inserted successfully");
// 啟動數(shù)據(jù)庫 PS D:myweb odemongodb