com.mongodb.casbah.map_reduce

MapReduceCommand

case class MapReduceCommand(input: String = "", map: Imports.JSFunction = "", reduce: Imports.JSFunction = "", output: MapReduceOutputTarget = MapReduceInlineOutput, query: Option[Imports.DBObject] = scala.None, sort: Option[Imports.DBObject] = scala.None, limit: Option[Int] = scala.None, finalizeFunction: Option[Imports.JSFunction] = scala.None, jsScope: Option[Imports.DBObject] = scala.None, verbose: Boolean = false, maxTime: Option[Duration] = scala.None) 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

See also

The MongoDB Map/Reduce Documentation

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

Instance Constructors

  1. new MapReduceCommand(input: String = "", map: Imports.JSFunction = "", reduce: Imports.JSFunction = "", output: MapReduceOutputTarget = MapReduceInlineOutput, query: Option[Imports.DBObject] = scala.None, sort: Option[Imports.DBObject] = scala.None, limit: Option[Int] = scala.None, finalizeFunction: Option[Imports.JSFunction] = scala.None, jsScope: Option[Imports.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[com.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 clone(): AnyRef

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

    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. val finalizeFunction: Option[Imports.JSFunction]

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

  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. val input: String

    the collection name to run the map reduce on

  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val jsScope: Option[Imports.DBObject]

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

  15. val limit: Option[Int]

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

  16. val map: Imports.JSFunction

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

  17. val maxTime: Option[Duration]

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

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

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

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

    Definition Classes
    AnyRef
  21. 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.

  22. val query: Option[Imports.DBObject]

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

  23. val reduce: Imports.JSFunction

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

  24. val sort: Option[Imports.DBObject]

    (optional) the input documents, useful for optimization.

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

    Definition Classes
    AnyRef
  26. def toDBObject: Imports.DBObject

  27. def toString(): String

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

    (optional) include the timing information in the result information

  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped