摘要: 插入测试数据 db.inventory.insertMany([ { _id: 1, item: null }, { _id: 2 } ]) 后面的栗子都会用到这里的测试数据 查询匹配包含值为 null 的 item 字段或不包含 item 字段的文档 > db.inventory.find( { 阅读全文
posted @ 2021-06-02 15:16 小菠萝测试笔记 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 插入测试数据 db.inventory.insertMany( [ { item: "journal", status: "A", size: { h: 14, w: 21, uom: "cm" }, instock: [ { warehouse: "A", qty: 5 } ] }, { item 阅读全文
posted @ 2021-06-02 14:34 小菠萝测试笔记 阅读(1199) 评论(0) 推荐(0) 编辑
摘要: 插入测试数据 db.inventory.insertMany( [ { item: "journal", instock: [ { warehouse: "A", qty: 5 }, { warehouse: "C", qty: 15 } ] }, { item: "notebook", insto 阅读全文
posted @ 2021-06-02 12:52 小菠萝测试笔记 阅读(357) 评论(0) 推荐(0) 编辑