I was wondering if there is any way to use more than one vertex set in a SELECT statement. I would think it should be possible because... why not?
For example, say we have this basic query:
CREATE QUERY coolQuery(VERTEX<Foo> foo, String bar, String biz) FOR GRAPH cool_graph SYNTAX v2 {
f = {foo};
x = SELECT i
FROM SomeVertex:i -(PathType1>)- f
y = SELECT i
FROM x:i -(<PathType2)- BarVertex:br
WHERE br.id == bar;
z = SELECT i
FROM y:i -(PathType3>.PathType4>)- BizVertex:bz
WHERE bz.id == biz;
PRINT z;
}
Now, that's all fine and dandy, but what if I know the other vertices whose ids are bar and biz? Can I use more than one known vertex set in a SELECT statement? The goal here is to arrive to the final SomeVertex set as quickly as possible via using the indexed vertex id values.
This is what I'm thinking:
CREATE QUERY coolQuery2(VERTEX<FooVertex> foo, VERTEX<BarVertex> bar, Vertex<BizVertex> biz) FOR GRAPH cool_graph SYNTAX v2 {
f = {foo};
br = {bar};
bz = {biz};
x = SELECT i
FROM SomeVertex:i -(PathType1>)- f
y = SELECT i
FROM x:i -(<PathType2)- br
z = SELECT i
FROM y:i -(PathType3>.PathType4>)- bz
PRINT z;
}
I get syntax errors with this and I can't find anything in the docs that does this type of thing where more than one known vertex set is used in a SELECT statement.