Open bchamberlain-forbes opened 4 years ago
The formatting changes can likely be ignored
IMHO...
Except they're drowning out the actual changes (I presume the majority of the 254/605 lines removed are such formatting - nearly half the changes .)
If you really want to overhaul the formatting, I'd suggest putting it in a separate PR, rather than doubling up on what the major thrust of this one is supposed to be.
But it's purely up to @ikkez of course...
That's neat. Probably a useful feature to add support for the aggregation framework.
Regarding the mapper adjustments, I'm just wondering if a magic __call that links to this->collection would be more appropriate than adding multiple simple methods that just copy the behaviour like findOneAndUpdate
, updateMany
and insertMany
etc.
I built out these modifications because we needed to use MongoDB Aggregations for dealing with complex data and utilize Collations for more efficient searching. Our models extend the Mapper class and use Aggregation as a standalone helper.
Aggregations can be built via distinct steps such as:
The formatting changes can likely be ignored, the existing formatting drives me crazy and is borderline unreadable ;)