Predicates
The last two examples in the previous section uses relationship rules with comparisons. These are also called predicates, an affirmation of the way a relation works between view elements. Predicates appear in parentheses. For example, you might specify that the size of a view is at least 50 points by using the following format:
[view1(>=50)]
This predicate relates to a single view. Notice that it is included within the view’s square brackets rather than as part of a connection between views. You’re not limited to a single request. For example, you might use a similar approach to let a view’s size range between 50 and 70 points. When adding compound predicates, separate the parts of your rule with commas:
[view1(>=50, <=70)]
Relative ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access