Skip to content

Commit 3024046

Browse files
committed
added more documentation
1 parent 831935c commit 3024046

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ for the individual options.
2525
* [x] Add support for driver sessions ([See](https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst))
2626
* [x] Add support driver transactions ([See](https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst))
2727
* [ ] Add support for `op_compressed` ([See](https://github.com/mongodb/specifications/blob/master/source/compression/OP_COMPRESSED.rst))
28-
* [ ] Because the driver is used in production environments, quick adjustments are necessary.
2928

3029
## Features
3130

@@ -38,6 +37,8 @@ for the individual options.
3837
* Support for SCRAM-SHA-256 (MongoDB 4.x)
3938
* Support for change streams api ([See](https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst))
4039
* Support for bulk writes ([See](https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#write))
40+
* support for driver sessions ([See](https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst))
41+
* support driver transactions ([See](https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst))
4142

4243
## Data representation
4344

@@ -173,7 +174,7 @@ no exception is made, but the cursor is re-scheduled at the last successful loca
173174
The following example will never stop,
174175
so it is a good idea to use a process for change streams.
175176

176-
```
177+
```elixir
177178
seeds = ["hostname1.net:27017", "hostname2.net:27017", "hostname3.net:27017"]
178179
{:ok, top} = Mongo.start_link(database: "my-db", seeds: seeds, appname: "getting rich")
179180
cursor = Mongo.watch_collection(top, "accounts", [], fn doc -> IO.puts "New Token #{inspect doc}" end, max_time: 2_000 )
@@ -182,7 +183,7 @@ cursor |> Enum.each(fn doc -> IO.puts inspect doc end)
182183

183184
An example with a spawned process that sends message to the monitor process:
184185

185-
```
186+
```elixir
186187
def for_ever(top, monitor) do
187188
cursor = Mongo.watch_collection(top, "users", [], fn doc -> send(monitor, {:token, doc}) end)
188189
cursor |> Enum.each(fn doc -> send(monitor, {:change, doc}) end)
@@ -346,7 +347,6 @@ Copyright 2015 Eric Meadows-Jönsson and Justin Wood
346347

347348
Copyright 2019 Michael Maier
348349

349-
350350
Licensed under the Apache License, Version 2.0 (the "License");
351351
you may not use this file except in compliance with the License.
352352
You may obtain a copy of the License at

0 commit comments

Comments
 (0)