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. Syntax

Prefix

Overview

UQL support the following prefix keywords for a clause or the entire UQL statement:

Prefix Keyword
Description
Scope
TRYUsed to create new graphsets, schemas and properties without returning an error message in case of failure. Successful creations are unaffected. If not using TRY, creation failure will return an error message, such as duplicated names.Current create() clause
OPTIONALUsed to verify if each subquery within a query has returns. If a subquery finds no results, null values are returned in place of nodes and/or edges. If not using OPTIONAL, subquery with no results will have no return.Current query clause
EXPLAINReturn the operation plan of the entire UQL statement without executing it.Entire UQL statement
PROFILEReturn the operation plan of the entire UQL statement and the time cost for each step during its execution.Entire UQL statement
DEBUGReturn the number of calls and time cost for each step in the operation plan of the entire UQL statement during its execution.Entire UQL statement
EXEC TASKSend the entire UQL statement to the analytics node (algo node) of the cluster for executionEntire UQL statement
NOTE

Prefix keywords are all case insensitive.

Examples

EXPLAIN

UQL
explain n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths  
group by  movies.genre 
return movies.genre, count(movies)

PROFILE

UQL
profile n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths  
group by  movies.genre 
return movies.genre, count(movies)

DEBUG

UQL
debug n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths  
group by  movies.genre 
return movies.genre, count(movies)