About substitution keywords
A major mechanism for reducing code in Mongoose is the "substitution keyword", an expression that is
resolved at runtime by the framework, eliminating a wide range of “glue code” which
would otherwise be required. When Mongoose
interprets a substitution keyword, it replaces the keyword and its parameters with a
value.
For example, an event handler of type goto URL can reference C(name) as the URL, and the framework resolves that value and attempts to navigate to the result in the web browser.
About the P and FP keywords
Collections provide the
and keywords for de-referencing the current values of properties. provides the raw property value, and provides the value altered for appropriate use in filter expressions. It must be enclosed in quotes if the data type requires it. If necessary, it must replace an empty string with NULL.The contents of these keywords are related to the scalar binding syntax, shortened by the fact that the primary collection is assumed.
Here are a few examples for the
keyword:- P(propertyName) resolves to the current value of the designated property (propertyName) in the primary collection.
- P(n.propertyName) resolves to the current value of a designated property (propertyName) in a secondary collection (n).
- P(subColProp.propertyname) resolves to the current value of a designated property (propertyName) in a subcollection (subColProp) of the primary collection.
- P(n.subcolprop.propertyname) resolves to the current value of a designated property (propertyName) in a subcollection (subColProp) of a secondary collection (n).