摘要: 插入测试数据 db.inventory.insertMany([ { item: "journal", qty: 25, tags: ["blank", "red"], dim_cm: [ 14, 21 ] }, { item: "notebook", qty: 50, tags: ["red", 阅读全文
posted @ 2021-06-01 22:50 小菠萝测试笔记 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 插入测试数据 db.inventory.insertMany( [ { item: "journal", qty: 25, size: { h: 14, w: 21, uom: "cm" }, status: "A" }, { item: "notebook", qty: 50, size: { h 阅读全文
posted @ 2021-06-01 17:14 小菠萝测试笔记 阅读(1047) 评论(0) 推荐(0) 编辑
摘要: find() MongoDB 中查询文档使用 find() find() 方法以非结构化的方式来显示所要查询的文档 语法格式 db.collection.find(query, projection) query:可选项,设置查询操作符指定查询条件 projection :可选项,指定要在与 que 阅读全文
posted @ 2021-06-01 16:58 小菠萝测试笔记 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 删除方法 db.collection.deleteOne() 删除单条文档 db.collection.deleteMany() 删除多条文档 db.collection.remove() 删除单条或多条文档 deleteOne() 语法格式 db.collection.deleteOne( <fi 阅读全文
posted @ 2021-06-01 11:11 小菠萝测试笔记 阅读(466) 评论(0) 推荐(0) 编辑