-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.9.0, 2.9.1
-
Component/s: API
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Any chance you could consider changing the signature of the aggregate
helper method to a single vararg argument, or adding an overloaded
signature that takes List<DBObject>? I assume the reason that the
first op was modelled as a separate argument was to make it clear to
users that at least one operation was required. I actually think
that's adequately clear as just a vararg argument, and having the
first argument separate makes it more complex when you already have
the pipeline as a list or array.
That is, from:
public AggregationOutput aggregate( DBObject firstOp, DBObject ... additionalOps)
to:
public AggregationOutput aggregate( DBObject ... ops)
or add:
public AggregationOutput aggregate( List<DBObject> ops)
The particular case I'm looking at is the run method in the class
below. I'm currently using a workaround that splits the first op and
the remainder before passing them to the helper method.
- duplicates
-
JAVA-860 Allow pipeline arguments to the aggregation framework to be specified in a List
-
- Closed
-