Class DataSizeExpressions
- java.lang.Object
-
- dev.morphia.aggregation.expressions.DataSizeExpressions
-
public final class DataSizeExpressions extends Object
Defines helper methods for the data size expressions- Since:
- 2.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static dev.morphia.aggregation.expressions.impls.Expression
binarySize(dev.morphia.aggregation.expressions.impls.Expression expression)
Returns the size of a given string or binary data value’s content in bytes.static dev.morphia.aggregation.expressions.impls.Expression
bsonSize(dev.morphia.aggregation.expressions.impls.Expression expression)
Returns the size in bytes of a given document (i.e.
-
-
-
Method Detail
-
binarySize
public static dev.morphia.aggregation.expressions.impls.Expression binarySize(dev.morphia.aggregation.expressions.impls.Expression expression)
Returns the size of a given string or binary data value’s content in bytes.- Parameters:
expression
- the binary size expression- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $binarySize
-
bsonSize
public static dev.morphia.aggregation.expressions.impls.Expression bsonSize(dev.morphia.aggregation.expressions.impls.Expression expression)
Returns the size in bytes of a given document (i.e. bsontype Object) when encoded as BSON.- Parameters:
expression
- the bson size expression- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $bsonSize
-
-