国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

MongoDB ( 四 )高級_find修飾符

crossea / 3177人閱讀

摘要:返回內容查詢出來后顯示的結果樣式,可以用和控制是否顯示。修飾符文件使用進行鏈接對應的集合聲明變量,并把查詢結果賦值給利用游標的進行循環輸出結果。到此的基礎操作就結束了,但是我們還沒有結束呢,下一節我們會用配合使用哦

find查詢操作是我們平時再開發中最常用的,也是重中之重。

find基本操作符
// 批量插入數據

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");
// 啟動數據庫
PS D:myweb
odemongodb