文档基本插入_隐式创建


文档(document)的数据结构和 JSON 基本一样。
所有存储在集合中的数据都是 BSON 格式。
文档的插入
单个文档插入
使用insert() 或 save() 方法向集合中插入文档,语法如下:
db.collection.insert( , { writeConcern: , ordered:  } )
db.dss.insert({"name":"dss"})
批量插入
db.collection.insertMany( [  , , ... ], { writeConcern: , ordered:  } )
db.dss.insertMany([{"name":"dss"},{"name":"dss1"}])

python中列表套字节的方式