[SERVER-55967] How to limit the number of document updates? Created: 09/Apr/21  Updated: 12/Dec/22  Resolved: 09/Apr/21

Status: Closed
Project: Core Server
Component/s: Query Language, Querying
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Abolfazl Ziaratban Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Participants:

 Description   

Hi

I want to limit the number of document updates in one command.

for example

db.users.updateMany(
 
    <filter>,
 
    <update>,
 
    {
 
        limit : 100
 
    }
 
);

 

 



 Comments   
Comment by Abolfazl Ziaratban [ 12/Dec/22 ]

https://feedback.mongodb.com/forums/924280-database/suggestions/46072024-how-to-limit-the-number-of-document-updates

Comment by Edwin Zhou [ 21/Nov/22 ]

Hi lijiajia3515@gmail.com,

Thank you for your interest in this ticket. This JIRA project is for bug reports, but you may submit this functionality as a feature request to our MongoDB Feedback Engine.

Best,
Edwin

Comment by jiajia li [ 18/Nov/22 ]

如果不实现我认为是存在问题的,他是不完整的命令,如果不解决建议更新文档
 
If it is not implemented, I think it is a problem to "updateMany" and "deleteMany". If it is not solved, it is recommended to update documents!

Comment by jiajia li [ 18/Nov/22 ]

mysql 8.0 update code
 

UPDATE [LOW_PRIORITY] [IGNORE] table_reference
    SET assignment_list
    [WHERE where_condition]
    [ORDER BY ...]
    [LIMIT row_count]
 
value:
    {expr | DEFAULT}
 
assignment:
    col_name = value
 
assignment_list:
    assignment [, assignment] ... 

Comment by jiajia li [ 18/Nov/22 ]

 

Please open this borad ...

and implement $sort $limit $hint

Comment by Abolfazl Ziaratban [ 03/Jun/21 ]

Please open this board ... 

Comment by Abolfazl Ziaratban [ 23/Apr/21 ]

Hi edwin.zhou

i opened this topic but there seems to be no solution.

i think this is a feature.

Comment by Edwin Zhou [ 09/Apr/21 ]

Hi abolfazl.ziaratban@gmail.com,

Thanks for your report. Please note that the SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to be a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Developer Community Forums.

Best,
Edwin

Generated at Thu Feb 08 05:37:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.