apiargs-MongoDBCollection-common-option.yaml 3.08 KB
Newer Older
1
arg_name: option
2 3 4
name: arrayFilters
type: array
description: |
5 6
   An array of filter documents that determines which array elements to modify
   for an update operation on an array field.
7 8 9

   This is not supported for server versions prior to 3.6 and will result in an
   exception at execution time if used.
10 11 12 13 14
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
15 16 17 18 19
name: bypassDocumentValidation
type: boolean
description: |
   If ``true``, allows the write operation to circumvent document level
   validation. Defaults to ``false``.
20 21 22

   This option is available in MongoDB 3.2+ and is ignored for older server
   versions, which do not support document level validation.
23 24 25 26 27 28 29 30 31 32 33 34 35
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: collation
type: array|object
description: |
   :manual:`Collation </reference/collation>` allows users to specify
   language-specific rules for string comparison, such as rules for lettercase
   and accent marks. When specifying collation, the ``locale`` field is
   mandatory; all other collation fields are optional. For descriptions of the
   fields, see :manual:`Collation Document
36
   </reference/collation/#collation-document>`.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

   If the collation is unspecified but the collection has a default collation,
   the operation uses the collation specified for the collection. If no
   collation is specified for the collection or for the operation, MongoDB uses
   the simple binary comparison used in prior versions for string comparisons.

   This option is available in MongoDB 3.4+ and will result in an exception at
   execution time if specified for an older server version.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readConcern
type: :php:`MongoDB\\Driver\\ReadConcern <class.mongodb-driver-readconcern>`
description: |
   :manual:`Read concern </reference/read-concern>` to use for the operation.
   Defaults to the collection's read concern.
55 56 57

   This is not supported for server versions prior to 3.2 and will result in an
   exception at execution time if used.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readPreference
type: :php:`MongoDB\\Driver\\ReadPreference <class.mongodb-driver-readpreference>`
description: |
   :manual:`Read preference </reference/read-preference>` to use for the
   operation. Defaults to the collection's read preference.
interface: phpmethod
operation: ~
optional: true
---
source:
  file: apiargs-common-option.yaml
  ref: typeMap
replacement:
  parent: "collection"
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
   :manual:`Write concern </reference/write-concern>` to use for the operation.
   Defaults to the collection's write concern.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: upsert
type: boolean
description: |
   If set to ``true``, creates a new document when no document matches the query
   criteria. The default value is ``false``, which does not insert a new
   document when no match is found.
interface: phpmethod
operation: ~
optional: true
...