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

$append modifier

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Gone away
    • Affects Version/s: 1.3.3
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None

      Description

      Appends a string to a string field.
      If the string field does not exist in the document, it just sets it.

      db.collection.insert({_id: "test", message: "Mongo"}); //message is now "Mongo"

      db.colection.update({_id: "test"}, {$append:

      {message: "DB"}

      , false, false}; //message is now "MongoDB"

      db.colection.update({_id: "test"}, {$append:

      {anotherMessage: "NoSQL"}

      , false, false}; //anotherMessage is now "NoSQL"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              dabreaka Slavi Pantaleev
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: