Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
3.0.0
Description
The return value of a model::replace_one::upsert is a self-reference, allowing for fluid usage:
replace_one& upsert(bool upsert);
While the return value of an options::update is void:
void upsert(bool upsert);
It'd be nice to have the options object also return a self-reference to allow for inline, ephemeral usage where one is only using the options to request an upsert, which would reduce what's now a 3-line call (declare options, set upsert flag, pass to collection::replace_one() to a one-liner (just do it all inline in the collection::replace_one).