shorthand syntax for checking if _id value is missing

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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" ] } 

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Asya Kamsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: