-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Write Ops
-
Labels:None
-
Query Optimization
In pipeline update specification it is common to check if a field doesn't exist and the way to tell if you're doing an upsert would be to check if _id doesn't exist. I'm proposing a shorthand syntax expression $onInsert or ifUpsert (exact work TBD) which would be short for:
{$eq:[ {$type:"$_id"}, "missing" ] }