You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "rishabhdaim (via GitHub)" <gi...@apache.org> on 2024/05/22 05:56:34 UTC

[PR] OAK-10823 : replaced db.collection.remove with db.collection.deleteOn… [jackrabbit-oak]

rishabhdaim opened a new pull request, #1477:
URL: https://github.com/apache/jackrabbit-oak/pull/1477

   …e/deleteMany to make it compatible with both mongo & mongosh


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-10823 : replaced db.collection.remove with db.collection.deleteOn… [jackrabbit-oak]

Posted by "stefan-egli (via GitHub)" <gi...@apache.org>.
stefan-egli commented on code in PR #1477:
URL: https://github.com/apache/jackrabbit-oak/pull/1477#discussion_r1609872160


##########
oak-run/src/main/js/oak-mongo.js:
##########
@@ -352,12 +352,12 @@ var oak = (function(global){
      * @param {string} pattern the pattern to match the nodes to be removed.
      */
     api.removeDescendantsAndSelfMatching = function(pattern) {
-        var count = 0;
+        let count = 0;

Review Comment:
   It seems like this change is a no-op? What would make it still useful to have?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-10823 : replaced db.collection.remove with db.collection.deleteOn… [jackrabbit-oak]

Posted by "rishabhdaim (via GitHub)" <gi...@apache.org>.
rishabhdaim commented on code in PR #1477:
URL: https://github.com/apache/jackrabbit-oak/pull/1477#discussion_r1610077563


##########
oak-run/src/main/js/oak-mongo.js:
##########
@@ -352,12 +352,12 @@ var oak = (function(global){
      * @param {string} pattern the pattern to match the nodes to be removed.
      */
     api.removeDescendantsAndSelfMatching = function(pattern) {
-        var count = 0;
+        let count = 0;

Review Comment:
   > the variables defined with `let` are block scoped and hence cause less confusion and are less error-prone. But I agree this can be reverted.
   > 
   > Will remove this.
   
   Removed in https://github.com/apache/jackrabbit-oak/pull/1477/commits/30672ee37040d8d280ade40dddc35a7bab5063f5



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-10823 : replaced db.collection.remove with db.collection.deleteOn… [jackrabbit-oak]

Posted by "rishabhdaim (via GitHub)" <gi...@apache.org>.
rishabhdaim commented on code in PR #1477:
URL: https://github.com/apache/jackrabbit-oak/pull/1477#discussion_r1610073932


##########
oak-run/src/main/js/oak-mongo.js:
##########
@@ -352,12 +352,12 @@ var oak = (function(global){
      * @param {string} pattern the pattern to match the nodes to be removed.
      */
     api.removeDescendantsAndSelfMatching = function(pattern) {
-        var count = 0;
+        let count = 0;

Review Comment:
   the variables defined with `let` are block scoped and hence cause less confusion and are less error-prone. But I agree this can be reverted.
   
   Will remove this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] OAK-10823 : replaced db.collection.remove with db.collection.deleteOn… [jackrabbit-oak]

Posted by "rishabhdaim (via GitHub)" <gi...@apache.org>.
rishabhdaim merged PR #1477:
URL: https://github.com/apache/jackrabbit-oak/pull/1477


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org