0.6.0 release

This commit is contained in:
George Narroway 2020-01-10 00:00:42 +08:00
parent 9f9e625abc
commit c6004a1156
2 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,7 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
## 0.6.0-SNAPSHOT ## 0.6.0 - 2020-01-10
### Added ### Added
- Support for bulk-write - Support for bulk-write

View file

@ -35,7 +35,7 @@ For Leinengen, add this to your project.clj:
[org.mongodb/mongodb-driver-sync "3.11.2"] [org.mongodb/mongodb-driver-sync "3.11.2"]
;; This wrapper library ;; This wrapper library
[mongo-driver-3 "0.5.0"] [mongo-driver-3 "0.6.0"]
``` ```
## Getting started ## Getting started
@ -142,18 +142,18 @@ except each operation is defined as a 2-tuple rather than a map.
```clojure ```clojure
;; Execute a mix of operations in one go ;; Execute a mix of operations in one go
(bulk-write [[:insert-one {:document {:a 1}}] (,c/bulk-write [[:insert-one {:document {:a 1}}]
[:delete-one {:filter {:a 1}}] [:delete-one {:filter {:a 1}}]
[:delete-many {:filter {:a 1}}] [:delete-many {:filter {:a 1}}]
[:update-one {:filter {:a 1} :update {:$set {:a 2}}}] [:update-one {:filter {:a 1} :update {:$set {:a 2}}}]
[:update-many {:filter {:a 1} :update {:$set {:a 2}}}] [:update-many {:filter {:a 1} :update {:$set {:a 2}}}]
[:replace-one {:filter {:a 1} :replacement {:a 2}}]]) [:replace-one {:filter {:a 1} :replacement {:a 2}}]])
; => a BulkWriteResult ; => a BulkWriteResult
;; Each operation can take the same options as their respective functions ;; Each operation can take the same options as their respective functions
(bulk-write [[:update-one {:filter {:a 1} :update {:$set {:a 2}} :upsert? true}] (mc/bulk-write [[:update-one {:filter {:a 1} :update {:$set {:a 2}} :upsert? true}]
[:update-many {:filter {:a 1} :update {:$set {:a 2}} :upsert? true}] [:update-many {:filter {:a 1} :update {:$set {:a 2}} :upsert? true}]
[:replace-one {:filter {:a 1} :replacement {:a 2} :upsert? true}]]) [:replace-one {:filter {:a 1} :replacement {:a 2} :upsert? true}]])
``` ```
### Using transactions ### Using transactions