@
judges whether the current node/edge belongs to a given schema, and is often overlaid with property call.
- Expression: @
<schema>
- Operand: string constant
Schema checker exists only in Ultipa filter, and cannot appear as an expression in a UQL clause.
Node
Example: find and return 10 Cards with their properties
find().nodes({@card}) as n
limit 10
return n{*}
Analysis: we can also use another expression {@ == "card"}
, see Conditional Operators ==
.
Edge
Example: find and return 10 @transfer edges with their properties
find().edges({@transfer}) as e
limit 10
return e{*}
Schema & Property
Example: find Cards whose balance is over 500000, return 10 cards with all properties.
find().nodes({@card.balance > 500000}) as n
limit 10
return n{*}
Analysis: this filter can be extended as {@card && balance > 500000}
, see Conditional Operators &&
.