1.0.0 • Published 2 years ago
silent-mongodb v1.0.0
silent-mongodb
insertDB 插入数据
- @param1 必填
dbCollection {
db: '数据库',
collection: '集合'
}
- @param2
operatorConfig {
inserArray: [] // 插入的数据,为一个数组 必填
}
searchDB 搜索
- @param1 必填
dbCollection {
db: '数据库',
collection: '集合'
}
- @param2
operatorConfig {
target: {}, // 查询条件
pageing: { // 是否分页
skip: 0, // 跳过多少条
limit: 1 // 返回多少条
}
}
deleteDB 删除
- @param1 必填
dbCollection {
db: '数据库',
collection: '集合'
}
- @param2
operatorConfig {
target: {}, // 删除对象查询条件 必填
deleteMany: false // 是否删除多个, 默认false
moveToDelete: { // 是否移入另一个集合 默认为空
db: '数据库',
collection: '集合'
}
}
updateDB 更新数据
- @param1 必填
dbCollection {
db: '数据库',
collection: '集合'
}
- @param2
operatorConfig {
target: {}, // 更新对象查询条件 必填
updateMany: false // 是否更新多个, 默认false
updateObject: {} // 更新对象 必填
}
1.0.0
2 years ago