description: Functions for creating new size or has expression.
View source on GitHub
|
Functions for creating new size or has expression.
Given a field "foo.bar",
root = size(expr, path.Path(["foo","bar"]), "bar_size")
creates a new expression root that has an optional field "foo.bar_size", which is always present, and contains the number of bar in a particular foo.
root_2 = has(expr, path.Path(["foo","bar"]), "bar_has")
creates a new expression root that has an optional field "foo.bar_has", which is always present, and is true if there are one or more bar in foo.
class SizeExpression: Size of the given expression.
has(...): Get the has of a field as a new sibling field.
size(...): Get the size of a field as a new sibling field.
size_anonymous(...): Calculate the size of a field, and store it as an anonymous sibling.
View source on GitHub