-
Notifications
You must be signed in to change notification settings - Fork 22
Common macros
sdflysha edited this page Feb 10, 2020
·
12 revisions
-
#include
#include<OtherQueryNamespace.OtherQueryId>#include<OtherQueryId>
-
#val
- The query object it self:
#val<>
- The query object it self:
-
#prop
- Return The property name of the query object:
#prop<Id> - Nested object is supported:
#prop<Location.City> - query object support
objectandIDictionary
- Return The property name of the query object:
-
#iif
- `#iif<IsVIP, "VIP", "not VIP">
-
unnamed sqlin#iff<>is also supported:#iif<IsVIP, sql {VIP}, sql {not VIP}>
-
#hasProp
- add content if has property:
#hasProp<PropertyName, sql {content if has prop}>
- add content if has property:
-
#isEmpty
-
#isNotEmpty
- add content if property value is not empty/null:
#isNotEmpty<PropertyName, sql {content if has prop}> - If property value is array, then zero-length array is evaluated as empty.
- If property is not defined, a error will be prompted.
- add content if property value is not empty/null:
-
#isNull
-
#isNotNull
- add content if has property AND property value is not null:
#isNotNull<PropertyName, sql {content if has prop}>
- add content if has property AND property value is not null:
-
#isEqual
sql v1{#isEqual<YourPropertyHere, "TheValueYouWantToCompare", sql { SQL Statement here }> }
-
#isNotEqual
-
#isLike
-
#isNotLike
-
#iterate
- iterate for the query object itself, example:
sql v1{#iterate<',', sql{#prop<Id> #prop<Name>}}
- iterate for the query object itself, example:
-
#each
- iterate for a property for query object, example:
sql v1{#each<A, ',', sql{#prop<Id> #prop<Name>}}
- iterate for a property for query object, example:
See also: