2、链接数据库+mongodb基础命令行+小demo
时间:2021-07-01 10:21:17
帮助过:30人阅读
workmate1=
{
name:‘JSPang‘
,
age:33
,
sex:1
,
job:‘前端‘
,
skill:{
skillOne:‘HTML+CSS‘
,
SkillTwo:‘JavaScript‘
,
SkillThree:‘PHP‘
},
regeditTime:new Date()
}
var workmate2=
{
name:‘ShengLei‘
,
age:30
,
sex:1
,
job:‘JAVA后端‘
,
skill:{
skillOne:‘HTML+CSS‘
,
SkillTwo:‘J2EE‘
,
SkillThree:‘PPT‘
},
regeditTime:new Date()
}
var workmate3=
{
name:‘MinJie‘
,
age:20
,
sex:1
,
job:‘UI设计‘
,
skill:{
skillOne:‘PhotoShop‘
,
SkillTwo:‘UI‘
,
SkillThree:‘Word+Excel+PPT‘
},
regeditTime:new Date()
}
var db = connect(‘company‘)
//链接数据库
var workmateArray =
[workmate1,workmate2,workmate3]
db.workmateArray.insert(workmateArray)//插入数据
print(‘OK‘)
2、链接数据库+mongodb基础命令行+小demo
标签:class done ODB asc Java后端 job drop admin rop