[SERVER-51362] Ensure that update and delete shell helpers support 'let' variables Created: 05/Oct/20 Updated: 29/Oct/23 Resolved: 09/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Katherine Wu (Inactive) | Assignee: | Katherine Wu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Query 2020-10-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The update command supports let parameters, but the db.collection.update() shell helper does not.
The following update command works: db.runCommand({
But the corresponding command using the shell helper fails with errmsg: “Use of undefined variable: targetTotal”. db.cakeSales.update( |
| Comments |
| Comment by Jason Price [ 12/Oct/20 ] |
|
After a conversation with katherine.wu on Slack, Katherine mentioned that the helper method to get the "let" option will be db.collection.remove(), not the delete helper methods. So, the helper methods to get the "let" option as part of this JIRA are: The doc JIRA is: |
| Comment by Githook User [ 08/Oct/20 ] |
|
Author: {'name': 'Katherine Wu', 'email': 'katherine.wu@mongodb.com', 'username': 'kaywux'}Message: |