How to use @kind graph query? #7437
-
|
I use @kind graph query and got such error: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The query as you have written requires Documentation on the usage of codeql/ruby/ql/test/library-tests/regexp/parse.ql Lines 8 to 27 in 15caaa7 |
Beta Was this translation helpful? Give feedback.


The query as you have written requires
@kind path-problemand not@kind graph.Documentation on the usage of
@kind graphis hard to find, but it seems to work like this:You have
@kind graphas metadata and twoquery predicates. (You don't define anyfrom,where, orselectclause)The first predicate defines the nodes of the graph and the second defines the edges.
The prototype of
nodesisquery predicate nodes(ANY_TYPE node, string attr, string val)and the prototype ofedgesisquery predicate edges(ANY_TYPE pred, ANY_TYPE succ, string attr, string val)See here for some kind of example:
codeql/ruby/ql/test/library-tests/regexp/parse.ql
Lines 8 to 27 in 15caaa7