@@ -25,7 +25,6 @@ for the individual options.
25
25
* [x] Add support for driver sessions ([ See] ( https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst ) )
26
26
* [x] Add support driver transactions ([ See] ( https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst ) )
27
27
* [ ] 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.
29
28
30
29
## Features
31
30
@@ -38,6 +37,8 @@ for the individual options.
38
37
* Support for SCRAM-SHA-256 (MongoDB 4.x)
39
38
* Support for change streams api ([ See] ( https://github.com/mongodb/specifications/blob/master/source/change-streams/change-streams.rst ) )
40
39
* 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 ) )
41
42
42
43
## Data representation
43
44
@@ -173,7 +174,7 @@ no exception is made, but the cursor is re-scheduled at the last successful loca
173
174
The following example will never stop,
174
175
so it is a good idea to use a process for change streams.
175
176
176
- ```
177
+ ``` elixir
177
178
seeds = [" hostname1.net:27017" , " hostname2.net:27017" , " hostname3.net:27017" ]
178
179
{:ok , top} = Mongo .start_link (database: " my-db" , seeds: seeds, appname: " getting rich" )
179
180
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)
182
183
183
184
An example with a spawned process that sends message to the monitor process:
184
185
185
- ```
186
+ ``` elixir
186
187
def for_ever (top, monitor) do
187
188
cursor = Mongo .watch_collection (top, " users" , [], fn doc -> send (monitor, {:token , doc}) end )
188
189
cursor |> Enum .each (fn doc -> send (monitor, {:change , doc}) end )
@@ -346,7 +347,6 @@ Copyright 2015 Eric Meadows-Jönsson and Justin Wood
346
347
347
348
Copyright 2019 Michael Maier
348
349
349
-
350
350
Licensed under the Apache License, Version 2.0 (the "License");
351
351
you may not use this file except in compliance with the License.
352
352
You may obtain a copy of the License at
0 commit comments