apiargs-MongoDBCollection-method-mapReduce-param.yaml 1.29 KB
Newer Older
1 2 3 4 5 6
arg_name: param
name: $map
type: :php:`MongoDB\\BSON\\Javascript <mongodb-bson-javascript>`
description: |
  A JavaScript function that associates or "maps" a value with a key and emits
  the key and value pair.
7 8 9 10 11

  .. note::

     Passing a Javascript instance with a scope is deprecated. Put all scope
     variables in the ``scope`` option of the MapReduce operation.
12 13 14 15 16 17 18 19 20 21
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $reduce
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`
description: |
  A JavaScript function that "reduces" to a single object all the values
  associated with a particular key.
22 23 24 25 26

  .. note::

     Passing a Javascript instance with a scope is deprecated. Put all scope
     variables in the ``scope`` option of the MapReduce operation.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $out
type: string|document
description: |
  Specifies where to output the result of the map-reduce operation. You can
  either output to a collection or return the result inline. On a primary member
  of a replica set you can output either to a collection or inline, but on a
  secondary, only inline output is possible.
interface: phpmethod
operation: ~
optional: false
---
source:
  file: apiargs-common-param.yaml
  ref: $options
...