com.mongodb.casbah.map_reduce

MapReduceCommand

case class MapReduceCommand(input: String, map: JSFunction, reduce: JSFunction, output: MapReduceOutputTarget, query: Option[DBObject], sort: Option[DBObject], limit: Option[Int], finalizeFunction: Option[JSFunction], jsScope: Option[DBObject], verbose: Boolean, maxTime: Option[Duration]) extends Product with Serializable

Case class for invoking MongoDB mapReduces.

This wrapper class is used in it's place, and passed directly to a db.runCommand call.

input

the collection name to run the map reduce on

map

the map function (JSFunction is just a type alias for String)

reduce

the reduce function (JSFunction is just a type alias for String)

output

(optional) the location of the result of the map-reduce operation, defaults to inline. You can output to a collection, output to a collection with an action, or output inline.

query

(optional) the selection criteria for the documents input to the map function.

sort

(optional) the input documents, useful for optimization.

limit

(optional) the maximum number of documents to return from the collection before map reduce

finalizeFunction

(optional) the finalize function (JSFunction is just a type alias for String)

jsScope

(optional) global variables that are accessible in the map, reduce and finalize functions

verbose

(optional) include the timing information in the result information

maxTime

(optional) the maximum duration that the server will allow this operation to execute before killing it

Source
MapReduceCommand.scala
See also

The MongoDB Map/Reduce Documentation

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MapReduceCommand
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MapReduceCommand(input: String = "", map: JSFunction = "", reduce: JSFunction = "", output: MapReduceOutputTarget = MapReduceInlineOutput, query: Option[DBObject] = scala.None, sort: Option[DBObject] = scala.None, limit: Option[Int] = scala.None, finalizeFunction: Option[JSFunction] = scala.None, jsScope: Option[DBObject] = scala.None, verbose: Boolean = false, maxTime: Option[Duration] = scala.None)

    input

    the collection name to run the map reduce on

    map

    the map function (JSFunction is just a type alias for String)

    reduce

    the reduce function (JSFunction is just a type alias for String)

    output

    (optional) the location of the result of the map-reduce operation, defaults to inline. You can output to a collection, output to a collection with an action, or output inline.

    query

    (optional) the selection criteria for the documents input to the map function.

    sort

    (optional) the input documents, useful for optimization.

    limit

    (optional) the maximum number of documents to return from the collection before map reduce

    finalizeFunction

    (optional) the finalize function (JSFunction is just a type alias for String)

    jsScope

    (optional) global variables that are accessible in the map, reduce and finalize functions

    verbose

    (optional) include the timing information in the result information

    maxTime

    (optional) the maximum duration that the server will allow this operation to execute before killing it

    Attributes
    protected[mongodb]

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def canEqual(arg0: Any): Boolean

    Definition Classes
    MapReduceCommand → Equals
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    MapReduceCommand → Equals → AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. val finalizeFunction: Option[JSFunction]

    (optional) the finalize function (JSFunction is just a type alias for String)

  13. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    MapReduceCommand → AnyRef → Any
  15. val input: String

    the collection name to run the map reduce on

  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. val jsScope: Option[DBObject]

    (optional) global variables that are accessible in the map, reduce and finalize functions

  18. val limit: Option[Int]

    (optional) the maximum number of documents to return from the collection before map reduce

  19. val map: JSFunction

    the map function (JSFunction is just a type alias for String)

  20. val maxTime: Option[Duration]

    (optional) the maximum duration that the server will allow this operation to execute before killing it

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. val output: MapReduceOutputTarget

    (optional) the location of the result of the map-reduce operation, defaults to inline.

    (optional) the location of the result of the map-reduce operation, defaults to inline. You can output to a collection, output to a collection with an action, or output inline.

  25. def productArity: Int

    Definition Classes
    MapReduceCommand → Product
  26. def productElement(arg0: Int): Any

    Definition Classes
    MapReduceCommand → Product
  27. def productIterator: Iterator[Any]

    Definition Classes
    Product
  28. def productPrefix: String

    Definition Classes
    MapReduceCommand → Product
  29. val query: Option[DBObject]

    (optional) the selection criteria for the documents input to the map function.

  30. val reduce: JSFunction

    the reduce function (JSFunction is just a type alias for String)

  31. val sort: Option[DBObject]

    (optional) the input documents, useful for optimization.

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toDBObject: DBObject

  34. def toString(): String

    Definition Classes
    MapReduceCommand → AnyRef → Any
  35. val verbose: Boolean

    (optional) include the timing information in the result information

  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any