UltipaDocs
Try Playground
  • Introduction
  • Terminologies
    • Reserved Words
    • Data Types
    • Alias
    • Operators
    • Expression
    • Filter
    • Prefix
    • Node and Edge Templates
    • Homologous and Heterologous Data
    • Clause Execution Times
    • Graphset
    • Schema
    • Property
    • Insert
    • Overwrite
    • Upsert
    • Update
    • Delete
    • Find Nodes
    • Find Edges
      • AB
      • Autonet
      • Spread
      • Path Template
      • K-Hop
      • K-Hop Template
    • Find Subgraphs
    • GROUP BY
    • ORDER BY
    • SKIP
    • LIMIT
    • WHERE
    • RETURN
    • WITH
    • UNCOLLECT
    • UNION
    • UNION ALL
    • CALL
    • BATCH
      • Schema Checker
      • Equal
      • Not Equal
      • Less Than
      • Greater Than
      • Less Than or Equal
      • Greater Than or Equal
      • Between
      • Between or Equal
      • Beong to
      • Not Belong To
      • CONTAINS | String
      • CONTAINS | Full-Text
      • Regular Match
      • IS NULL
      • IS NOT NULL
      • And
      • Or
      • Not
      • Exclusive OR
      • DISTINCT
      • toString()
      • toInteger()
      • toFloat()
      • toDouble()
      • toDecimal()
      • toSet()
      • castToRaw()
      • now()
      • dateAdd()
      • dateDiff()
      • year()
      • month()
      • day()
      • dayOfWeek()
      • dateFormat()
      • point()
      • distance()
      • pointInPolygon()
      • lower()
      • upper()
      • reverse()
      • startsWith()
      • endsWith()
      • JSON_decode()
      • JSON_merge()
      • trim()
      • ltrim()
      • rtrim()
      • left()
      • right()
      • substring()
      • replace()
      • split()
      • intersection()
      • difference()
      • listUnion()
      • size()
      • head()
      • reduce()
      • listContains()
      • append()
      • pi()
      • pow()
      • sqrt()
      • abs()
      • floor()
      • ceil()
      • round()
      • sin()
      • cos()
      • tan()
      • cot()
      • asin()
      • acos()
      • atan()
      • length()
      • pnodes()
      • pedges()
      • count()
      • sum()
      • max()
      • min()
      • avg()
      • stddev()
      • collect()
      • dedup()
      • CASE
      • table()
      • coalesce()
      • ifnull()
    • Acceleration
    • Index
    • Full-text
    • LTE
    • Real-time Process
    • Backend Task
    • Analytics Node
    • Server Statistics
    • Server Backup
    • Privilege
    • Policy
    • User
  • Trigger
  1. Docs
  2. /
  3. UQL
  4. /
  5. Path Functions

pedges()

Function pedges() collects the EDGEs of a path into a list, and return this list.

Arguments:

  • Path <path>

Returns:

  • EDGE list <list>

Sample graph: (to be used for the following examples)

Run below UQLs one by one in an empty graphset to create graph data: ```customlang___fold__lang_uql create().node_schema("firm").node_schema("human").edge_schema("hold") create().edge_property(@hold, "portion", double) insert().into(@firm).nodes([{_id:"F001", _uuid:1}, {_id:"F002", _uuid:2}]) insert().into(@human).nodes([{_id:"H001", _uuid:3}, {_id:"H002", _uuid:4}]) insert().into(@hold).edges([{_uuid:1, _from_uuid:3, _to_uuid:1, portion:0.3}, {_uuid:2, _from_uuid:2, _to_uuid:1, portion:0.7}, {_uuid:3, _from_uuid:3, _to_uuid:2, portion:0.4}, {_uuid:4, _from_uuid:4, _to_uuid:2, portion:0.6}]) ```

Common Usage

Example: Calculate the share holding path of each UBO from F001, return the EDGE list of each path

UQL
n({_id == "F001"}).le()[:5].n({@human} as UBO) as p
return pedges(p)
Result
[{"uuid":"1","from":"H001","to":"F001","from_uuid":"3","to_uuid":"1","schema":"hold","values":{"portion":"0.3"}}]
[{"uuid":"2","from":"F002","to":"F001","from_uuid":"2","to_uuid":"1","schema":"hold","values":{"portion":"0.7"}},{"uuid":"3","from":"H001","to":"F002","from_uuid":"3","to_uuid":"2","schema":"hold","values":{"portion":"0.4"}}]
[{"uuid":"2","from":"F002","to":"F001","from_uuid":"2","to_uuid":"1","schema":"hold","values":{"portion":"0.7"}},{"uuid":"4","from":"H002","to":"F002","from_uuid":"4","to_uuid":"2","schema":"hold","values":{"portion":"0.6"}}]