,管理mongodb的所有数据)
3.使用mongodb链接该文件夹,Windows下mongodb的命令需要在其安装目录下执行才有效....= require('mongoose');
let db=mongoose.connect('mongodb://localhost/tenDB', {useNewUrlParser: true}...:"String",default:"未知"},
},{
collection:"person"
});
//利用集合生成模板,接下来,所有的数据库的操作,如增删查改全部由该模型负责...:1,age:1,_id:0},function (err,res) {
console.log(res);
});*/
//查询条件的特殊写法: $gt 大于,$lt...表名 where 字段 not between 值1 and 值2
例如: select * from student where age not between 24 and 25
7.根据多个条件中的某个条件