Add $position

Modifier for $push
This commit is contained in:
Sean Corfield 2018-08-31 17:48:25 -07:00 committed by GitHub
parent f093322a09
commit f6e5ff75ce
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" } }) ;; (mgcol/update "docs" { :_id oid } { $push { :tags "modifiers" } })
(defoperator $push) (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. ;; $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. ;; 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. ;; MongoDB 2.4 adds support for the $each modifier to the $push operator.