Skip to content

Commit 94265f4

Browse files
committed
update revapi config
1 parent f44995a commit 94265f4

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

config/revapi-filtered.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,15 @@
678678
"code": "java.method.added",
679679
"new": "method dev.morphia.Datastore dev.morphia.Morphia::createDatastore(com.mongodb.client.MongoClient, dev.morphia.config.MorphiaConfig)",
680680
"justification": "experimental API"
681+
},
682+
{
683+
"ignore": true,
684+
"code": "java.method.added",
685+
"new": "method dev.morphia.query.updates.UpdateOperator dev.morphia.query.updates.UpdateOperators::pull(java.lang.String, java.lang.Object)",
686+
"justification": "necessary to fix a bug",
687+
"package": "dev.morphia.query.updates",
688+
"classQualifiedName": "dev.morphia.query.updates.UpdateOperators",
689+
"methodName": "pull"
681690
}
682691
]
683692
}

core/src/main/java/dev/morphia/query/updates/UpdateOperators.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.Map;
77

88
import dev.morphia.query.Query;
9+
import dev.morphia.query.filters.Filter;
910
import dev.morphia.sofia.Sofia;
1011

1112
import static java.util.Collections.singletonList;
@@ -240,6 +241,18 @@ public static PopOperator pop(String field) {
240241
return new PopOperator(field);
241242
}
242243

244+
/**
245+
* The $pull operator removes from an existing array all instances of a value or values that match a specified condition.
246+
*
247+
* @param field the field to update
248+
* @param filter the filter to apply
249+
* @return the update operator
250+
* @update.operator $pull
251+
*/
252+
public static UpdateOperator pull(String field, Filter filter) {
253+
return new PullOperator(field, filter);
254+
}
255+
243256
/**
244257
* The $pull operator removes from an existing array all instances of a value or values that match a specified condition.
245258
*

0 commit comments

Comments
 (0)