Takes a function of two parameters.
Takes a function of two parameters. The first is the current key (which
defaults to this._id
, but may have been overridden by previous
[Flat]$MapFs) and the second is the document itself. The function must
return an array of 2-element arrays, each containing a new key and a new
value.
Performs a sequence of operations, sequentially, merging their results.
Takes a function of two parameters.
Takes a function of two parameters. The first is the current key (which
defaults to this._id
, but may have been overridden by previous
[Flat]$MapFs) and the second is the document itself. The function must
return a 2-element array containing the new key and new value.
TODO: If an $OutF has anything after it, we need to either do
TODO: If an $OutF has anything after it, we need to either do
$seq($out(src, dst), after($read(dst), ...))
or
$Fork(src, List($out(_, dst), after(_, ...)))
The latter seems preferable, but currently the forking semantics are not clear.
Takes a function of two parameters – a key and an array of values.
Takes a function of two parameters – a key and an array of values. The function must return a single value.
Operations that are applied to a completed workflow to produce an executable WorkflowTask.
Operations that are applied to a completed workflow to produce an executable WorkflowTask. NB: when this is applied, information about the the type of plan (i.e. the required MongoDB version) is discarded.
A type for a Workflow
which has had crystallize
applied to it.
Newtype for ops which can appear in aggregation pipeline.
A "newtype" for ops that appear in pipelines, for use mostly after a workflow is constructed, with fixed type that can represent any workflow.
Newtype for ops which preserve the shape of the input.
Newtype for ops which have a single source op.
Newtype for source ops (that is, ops that are themselves sources).
The type for workflows targeting MongoDB 2.6 specifically.
The type for workflows targeting MongoDB 3.2 specifically.
The type for workflows supporting the most advanced capabilities.
Ops that are provided by MongoDB since 3.2.
Ops that are provided by all supported MongoDB versions (since 2.6), or are internal to quasar and supported everywhere.
Provides an extractor for core ops wrapped up in PipelineOp
.
Flattens the sequence of operations like so:
Flattens the sequence of operations like so:
chain( $read(Path.fileAbs("foo")), $match(Selector.Where(Js.Bool(true))), $limit(7))
val read = $read(Path.fileAbs("foo")) val match = $match(Selector.Where(Js.Bool(true))(read) $limit(7)(match)
A Workflow is a graph of atomic operations, with WorkflowOps for the vertices. We crush them down into a WorkflowTask. This
crush
gives us a location to optimize our workflow decisions. EG, A sequence of simple ops may be combined into a single pipeline request, but if one of those operations contains JS, we have to execute that outside of a pipeline, possibly reordering the other operations to avoid having two pipelines with a JS operation in the middle.We also implement the optimizations atomic http://docs.mongodb.org/manual/core/aggregation-pipeline-optimization/ so that we can build others potentially on top of them (including reordering non-pipelines around pipelines, etc.).