apiargs-MongoDBCollection-method-aggregate-option.yaml 2.12 KB
Newer Older
1 2 3 4
arg_name: option
name: allowDiskUse
type: boolean
description: |
5
  Enables writing to temporary files. When set to ``true``, aggregation stages
6 7
  can write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. The
  default is ``false``.
8
interface: phpmethod
9
operation: ~
10 11 12 13 14 15
optional: true
---
arg_name: option
name: batchSize
type: integer
description: |
16 17 18 19 20 21 22 23
  Specifies the initial batch size for the cursor. A batchSize of ``0`` means an
  empty first batch and is useful for quickly returning a cursor or failure
  message without doing significant server-side work.

  .. note::

     This is not supported for inline aggregation results (i.e. ``useCursor``
     option is ``false`` or the server version is < 2.6).
24
interface: phpmethod
25
operation: ~
26 27 28
optional: true
---
source:
29
  file: apiargs-MongoDBCollection-common-option.yaml
30
  ref: bypassDocumentValidation
31
post: |
32
  This only applies when using the :ref:`$out <agg-out>` stage.
33 34 35

  Document validation requires MongoDB 3.2 or later: if you are using an earlier
  version of MongoDB, this option will be ignored.
36 37 38
---
source:
  file: apiargs-common-option.yaml
39
  ref: maxTimeMS
40 41
---
source:
42
  file: apiargs-MongoDBCollection-common-option.yaml
43
  ref: readConcern
44 45
---
source:
46
  file: apiargs-MongoDBCollection-common-option.yaml
47
  ref: readPreference
48 49
---
source:
50
  file: apiargs-MongoDBCollection-common-option.yaml
51
  ref: typeMap
52
---
53
arg_name: option
54 55 56
name: useCursor
type: boolean
description: |
57 58
  Indicates whether the command will request that the server provide results
  using a cursor. The default is ``true``.
59

60 61
  For MongoDB version 2.6 or later, ``useCursor`` allows users to turn off
  cursors if necessary to aid in replica set or shard cluster upgrades.
62

63 64
  ``useCursor`` is ignored for MongoDB versions prior to 2.6 as aggregation
  cursors are not available.
65
interface: phpmethod
66
operation: ~
67
optional: true
68 69 70 71 72
---
source:
  file: apiargs-MongoDBCollection-common-option.yaml
  ref: writeConcern
post: |
73
  This only applies when the :ref:`$out <agg-out>` stage is specified.
74 75 76

  This is not supported for server versions prior to 3.4 and will result in an
  exception at execution time if used.
77
...