Class DataSizeExpressions
java.lang.Object
dev.morphia.aggregation.expressions.DataSizeExpressions
Defines helper methods for the data size expressions
- Since:
- 2.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
binarySize
(Object value) Returns the size of a given string or binary data value’s content in bytes.static Expression
Returns the size in bytes of a given document (i.e.
-
Method Details
-
binarySize
Returns the size of a given string or binary data value’s content in bytes.- Parameters:
value
- the value to examine- Returns:
- the new value
- Since server release
- 4.4
- MongoDB documentation
- Aggregration Expression: $binarySize
-
bsonSize
Returns the size in bytes of a given document (i.e. bsontype Object) when encoded as BSON.- Parameters:
value
- the value to examine- Returns:
- the new expression
- Since server release
- 4.4
- MongoDB documentation
- Aggregration Expression: $bsonSize
-