Merge pull request #176 from seancorfield/patch-1

Add $position
This commit is contained in:
Michael Klishin 2018-12-01 03:49:25 +08:00 committed by GitHub
commit b2068fd8bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,6 +184,9 @@
;; (mgcol/update "docs" { :_id oid } { $push { :tags "modifiers" } })
(defoperator $push)
;; $position modifies the behavior of $push per https://docs.mongodb.com/manual/reference/operator/update/position/
(defoperator $position)
;; $each is a modifier for the $push and $addToSet operators for appending multiple values to an array field.
;; Without the $each modifier $push and $addToSet will append an array as a single value.
;; MongoDB 2.4 adds support for the $each modifier to the $push operator.