Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.55 KB

File metadata and controls

52 lines (33 loc) · 1.55 KB

description: Functions for creating new size or has expression.

Module: expression_impl.size

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.

Classes

class SizeExpression: Size of the given expression.

Functions

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.