Prefix keyword is used at the beginning of a chain query statement or the whole UQL to help extend the query function or realize operational functions other than query. Below prefixes are supported:
Prefix Keyword | Explanation |
Scope |
---|---|---|
TRY | Verify the result of current creation of graphset, schema and property. Do not prompt system error in case of failure (see examples in GraphSet|Schema|Property) | Current create() command |
OPTIONAL | Verify the result of each sub-query of current chain query. For any sub-query that finds no result, return null as node/edge (see examples of each query command) |
Current chain query |
EXPLAIN | Not execute the UQL, only return the operational logic of statements. | The whole UQL |
PROFILE | Execute the UQL, return the operational logic of statements, as well as their time_cost. | The whole UQL |
DEBUG | Execute the UQL, return the call_time and time_cost of each execution phase | The whole UQL |
EXEC TASK | Execute the UQL by sending it to the analytic server (see Task - Analytics Server for detail) | The whole UQL |
Prefix keywords are all case insensitive.
EXPLAIN
explain n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths
group by movies.genre
return movies.genre, count(movies)
PROFILE
profile n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths
group by movies.genre
return movies.genre, count(movies)
DEBUG
debug n({@movie} as movies).e({@filmedIn}).n({@country.name == "US"}) as paths
group by movies.genre
return movies.genre, count(movies)