Statement find().edges()
can apply filters on edges and return those that meet the requirement. This is very similar to table query in traditional database.
Syntax:
- Statement alias: supported (EDGE)
- 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 edges will be automatically defined by system when there is no manually defined alias at the end of the edge query statement; in this case user cannot use edges to define alias for other data in the subsequent UQL statement, otherwise error of duplicated name will be triggered.
Unconditional
Example: Find 10 edges, return all edge properties
find().edges() as e
limit 10
return e{*}
UUID
Example: Find edges 1, 2, 3, return all edge properties
find().edges([1,2,3]) as e
return e{*}
FROM
Example: Find 10 edges from a node whose UUID is 1, return all edge properties
find().edges({_from_uuid == 1}) as e
limit 10
return e{*}
Example: Find 10 @transaction from Card CA001, return all edge properties
find().edges({_from == "CA001"}) as e
limit 10
return e{*}
TO
Example: Find 10 edges to a node whose UUID is 1, return all edge properties
find().edges({_to_uuid == 1}) as e
limit 10
return e{*}
Example: Find 10 @transaction to Card CA001, return transaction number
find().edges({_to == "CA001"}) as e
limit 10
return e{*}
Schema
Example: Find 10 @transfer, return all edge properties
find().edges({@transfer}) as e
limit 10
return e{*}
Property
Example: Find 10 edges with their time greater than 2022-04-02 0:0:0, return all edge properties
find().edges({time > "2022-04-02 0:0:0"}) as e
limit 10
return e{*}
Schema & Property
Example: Find 10 edges with their @transfer time greater than 2022-04-02 0:0:0, return all edge properties
find().edges({@transfer.time > "2022-04-02 0:0:0"}) as e
limit 10
return e{*}
Default Statement Alias
Example: Find 10 edges, return all edge properties
find().edges() as e
limit 10
return e{*}