Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-130

array $pull operator

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9.7
    • Affects Version/s: None
    • Component/s: Usability
    • Labels:
      None

      I believe adding a $pull modifier - the opposite of $push - would be a
      powerful addition to the MongoDB features.

      For example:

      db.group.insert({_id:1,text:'user group 1',users:[1,2,3]});

      // add another user - atomic
      db.blogs.update({_id:1},{ $push :

      { users : 4 }

      } );

      // remove a user - atomic
      db.blogs.update({_id:1},{ $pull :

      { users : 2 }

      });

            Assignee:
            aaron Aaron Staple
            Reporter:
            eliot Eliot Horowitz (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: