Guide for upgrading GSQL SYNTAX V1 scripts to SYNTAX V2

Is there any guild for upgrading GSQL scripts from SYNTAX V1 to SYNTAX V2


  1. convert vertex sets to vset[vset.att] format

  2. For string concatination in PRINT statements, replace ’ + ’ with ', ’

  3. The Select statement

  1. In V1 (default), each SELECT statement can traverse one hop (from a set of vertices to their adjacent vertices).
  • To write a multi-hop query, you write a sequence of SELECT statements.

  • The traversal action is from left to right, and the notation uses “ASCII art” to depict a connection, either with a rightward facing arrowhead or no arrowhead: Start:s -( Edges:e )-> Target:t or Start:s -( Edges:e )- Target:t

  1. In V2, each SELECT statement can traverse a multi-hop path.
  • The traversal direction is under the control of the query writer, with arrowheads on each edge set to show the direction.

  • There is no arrowhead outside the parentheses:

Start:s -( (ForwardEdge> | <BackwardEdge):e )- Target:t

  • Users can write paths which explicitly show multiple hops, and they can use a Kleene star (*) to indicate repetition. Start:s -(Edge1>:e1)- Middle:m -(<Edge2:e2)- Target:t or Start:s -(Edge*1..3)- Target:t

  • There are rules about which vertex or edge aliases may be used in the WHERE or ACCUM clauses.

@danmccreary there aren’t any guides yet that touch on this topic. It would make a very good blog topic. If you would like to create a blog I can get it published. Or, I can help you co-create one. Or, I can create one if you would like me to?