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

Support 'let' variables in update command

    • Fully Compatible
    • Query 2020-05-04

      Replace the 'runtimeConstants' support with the new 'let' syntax from the aggregate command in the update command. Similar to how that works, we should support both a top-level 'let' parameter to the update request and also a parameter for each update in the batch request. For now, let's stick with the name 'c' for the constants for each update in the batch, though we may revisit this name later.

      Note that we will have to preserve support for 'runtimeConstants' for compatibility during upgrade. There will be a problem where an internal update request built on behalf of $merge will need to specify variables. This is done here. It's important for those variables/constants to be serialized as runtimeConstants, again for compatibility during upgrade. I would recommend making this work as part of this ticket, but if it becomes obvious how to split it into follow-up work we should do that.

      For this work, focus only on unsharded deployments.

            Assignee:
            katherine.wu@mongodb.com Katherine Wu (Inactive)
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: