Click or drag to resize
RiakMapReduceQueryMapJs Method
Add a JavaScript map phase to the list of phases.

Namespace:  RiakClient.Models.MapReduce
Assembly:  RiakClient (in RiakClient.dll) Version: f9bb17a3f8ff6940b88010a52f202e3d55fe25c5
Syntax
public RiakMapReduceQuery MapJs(
	Action<RiakFluentActionPhaseJavascript> setup
)

Parameters

setup
Type: SystemActionRiakFluentActionPhaseJavascript
An ActionT that accepts a RiakFluentActionPhaseJavascript, and configures the map phase with it.

Return Value

Type: RiakMapReduceQuery
A reference to this updated instance, for fluent chaining.
Remarks
Configure the phase with a lambda similar to:
.MapJs(m => m.Source(@"function(o) {return [ 1 ];}"))
The above code will run a custom JavaScript function that returns "[1]" for each input in the phase.
See Also