Skip to content

Commit

Permalink
mongodb 支持$pull
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Jan 9, 2025
1 parent 552816d commit 75f444c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/objectql/src/driver/meteorMongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class SteedosMeteorMongoDriver implements SteedosDriver {
const options = { $set: {} };
const keys = _.keys(data);
_.each(keys, function (key) {
if (_.include(['$inc', '$min', '$max', '$mul', '$push', '$addToSet'], key)) {
if (_.include(['$inc','$min','$max','$mul', '$push', '$addToSet', '$pop', '$pull', '$pullAll'], key)) {
options[key] = data[key];
} else {
options.$set[key] = data[key];
Expand Down
2 changes: 1 addition & 1 deletion packages/objectql/src/driver/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export class SteedosMongoDriver implements SteedosDriver {
const options = {$set: {}, $unset: {}};
const keys = _.keys(data);
_.each(keys, function(key){
if(_.include(['$inc','$min','$max','$mul', '$push', '$addToSet'], key)){
if(_.include(['$inc','$min','$max','$mul', '$push', '$addToSet', '$pop', '$pull', '$pullAll'], key)){
options[key] = data[key];
}else{
if (null === data[key]) {
Expand Down

0 comments on commit 75f444c

Please sign in to comment.