We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2071ce5 + 6b03e4b commit 55dcdfdCopy full SHA for 55dcdfd
README.md
@@ -199,6 +199,22 @@ For more information see
199
200
* [Mongo.watch_collection](https://hexdocs.pm/mongodb_driver/Mongo.html#watch_collection/5)
201
202
+### Inserts
203
+
204
+To insert a single document:
205
206
+```elixir
207
+Mongo.insert_one(top, "users", %{first_name: "John", last_name: "Smith"})
208
+```
209
210
+To insert a list of documents:
211
212
213
+Mongo.insert_many(top, "users", [
214
+ %{first_name: "John", last_name: "Smith"},
215
+ %{first_name: "Jane", last_name: "Doe"}
216
+])
217
218
219
### Bulk writes
220
0 commit comments