The clause find().nodes() retrieves nodes from the graphset that meet specified conditions.
Clause alias: NODE type; default alias is nodes
Method | Param Type | Param Spec | Required | Description | Alias |
|---|---|---|---|---|---|
nodes() | Filter | / | Yes | The conditions of nodes to be retrieved | N/A |
limit() | Integer | ≥-1 | No | Number of results to return for each subquery, -1 signifies returning all | N/A |

Run these UQLs row by row in an empty graphset to create this graph:
UQLcreate().node_schema("professor").node_schema("student").edge_schema("mentor").edge_schema("assist") create().node_property(@*, "age", int32).node_property(@*, "email", string).edge_property(@*, "year", int32)Click to expand
UQLfind().nodes() as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| P002 | 2 | professor | 27 | [email protected] |
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
| S002 | 4 | student | 20 | [email protected] |
| S003 | 5 | student | 25 | [email protected] |
UQLfind().nodes({_id == "S001"}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
UQLfind().nodes({_id in ["P001", "P002"]}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| P002 | 2 | professor | 27 | [email protected] |
UQLfind().nodes(1) as n return n{*}
NOTEThe filter
{_uuid == 1}can be simplified to1.
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
UQLfind().nodes([1,3]) as n return n{*}
NOTEThe filter
{_uuid in [1,3]}can be simplified to[1,3].
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
UQLfind().nodes({@student}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
| S002 | 4 | student | 20 | [email protected] |
| S003 | 5 | student | 25 | [email protected] |
UQLfind().nodes({@student || @professor}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| P002 | 2 | professor | 27 | [email protected] |
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
| S002 | 4 | student | 20 | [email protected] |
| S003 | 5 | student | 25 | [email protected] |
UQLfind().nodes({age > 30}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
UQLfind().nodes({@student.age > 25}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
UQLfind().nodes().limit(1) return nodes{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
UQLfind().nodes().limit(3) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| P002 | 2 | professor | 27 | [email protected] |
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| S001 | 3 | student | 27 | [email protected] |
UQLuncollect [53, 55, 57] as value optional find().nodes({age == value}) as n return n{*}
Result:
| _id | _uuid | Schema | age | email |
|---|---|---|---|---|
| P001 | 1 | professor | 53 | [email protected] |
| _id | _uuid | Schema |
|---|---|---|
| null | null | null |
| null | null | null |
If the prefix OPTIONAL is not used, null results will not be returned.