Statement find().nodes()
can apply filters on nodes and return those that meet the requirement. This is very similar to table query in traditional database.
Syntax:
- Statement alias: supported (NODE)
- Optional parameters:
Parameter | Type | Specification | Description | Structure of Custom Alias |
---|---|---|---|---|
limit() |
Int | -1 or >=0 | Number of results to return for each subquery, -1 means to return all results | Not supported |
An alias nodes will be automatically defined by system when there is no manually defined alias at the end of the node query statement; in this case user cannot use nodes to define alias for other data in the subsequent UQL statement, otherwise error of duplicated name will be triggered.
Unconditional
Example: Find 10 nodes, return all node properties
find().nodes() as n
limit 10
return n{*}
ID
Example: Find nodes whose ID equals CA001, return all node properties
find().nodes({_id == "CA001"})
return nodes{*}
UUID
Example: Find cards 1, 2 and 3, return all node properties
find().nodes([1,2,3]) as n
return n{*}
Schema
Example: Find 10 @card, return all node properties
find().nodes({@card}) as n
limit 10
return n{*}
Property
Example: Find 10 nodes at level 1 and above, return all node properties
find().nodes({level > 1}) as n
limit 10
return n{*}
Schema & Property
Example: Find 10 @card at level 1 and above, return all node properties
find().nodes({@card.level > 1}) as n
limit 10
return n{*}
Default Statement Alias
Example: Find 10 nodes, return all node properties
find().nodes()
limit 10
return nodes{*}