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

array $pull operator

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.9.7
    • Usability
    • None

    Description

      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 }

      });

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: