java.lang.Object
net.pincette.mongo.Match
You can match JSON objects with MongoDB queries using this
class. The following operators are not supported:
$jsonSchema, $text,
$where and the geospatial operators. The operator $expr should contain
only expressions which yield a boolean or aggregation expressions. The operator $all
doesn't work with the $elemMatch operator.
If you wrap an expression in the $trace operator then tracing will be done for it
in the logger "net.pincette.mongo.expressions" at level INFO.
- Since:
- 1.2
- Author:
- Werner Donné
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Loggerlogger()If you set the log level to FINEST you will get a trace.static Predicate<JsonObject>predicate(JsonObject expression) Constructs a predicate withexpression.static Predicate<JsonObject>predicate(JsonObject expression, Features features) Constructs a predicate withexpression.static Predicate<JsonObject>Constructs a predicate withexpression.static Predicate<JsonObject>Constructs a predicate withexpression.predicateValue(JsonObject expression, Features features) Constructs a predicate to test a JSON value.
-
Method Details
-
logger
If you set the log level to FINEST you will get a trace.- Returns:
- The logger with the name "net.pincette.mongo.expression".
- Since:
- 1.3
-
predicate
Constructs a predicate withexpression.- Parameters:
expression- the MongoDB query.- Returns:
- The predicate, which is stateless.
- Since:
- 1.2
-
predicate
Constructs a predicate withexpression.- Parameters:
expression- the MongoDB query.features- extra features. It may benull.- Returns:
- The predicate, which is stateless.
- Since:
- 2.0
-
predicate
Constructs a predicate withexpression.- Parameters:
expression- the MongoDB query.- Returns:
- The predicate, which is stateless.
- Since:
- 1.2
-
predicate
Constructs a predicate withexpression.- Parameters:
expression- the MongoDB query.features- extra features. It may benull.- Returns:
- The predicate, which is stateless.
- Since:
- 2.0
-
predicateValue
Constructs a predicate to test a JSON value.- Parameters:
expression- the MongoDB query.features- extra features. It may benull.- Returns:
- The predicate, which is stateless.
- Since:
- 2.0
-