I was inspecting some datasets. Wrote a few queries for that.
I got stuck with something really simple, fortunately for a short time.
In the following query I wanted to list all vertex types that comments can have REPLY_TO edges:
SetAccum<STRING> @@types;
OrAccum<BOOL> @has_outgoing;
OrAccum<BOOL> @has_incoming;
tmp =
SELECT c1
FROM Comment:c1 -(REPLY_OF>)- _:c2
ACCUM c1.@has_outgoing += true, c2.@has_incoming += true, @@types += c2.type;
I had no idea how to obtain the vertex type dynamically.
Funny thing is my first try (using .type
attribute) worked, but I was not able to locate related information in the docs… I found items like: Edge/Vertex functions, Data Types, Data type conversions, etc.
Case closed. Just writing this down for anybody who will look for similar information.