Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 758 Bytes

Queries.md

File metadata and controls

37 lines (25 loc) · 758 Bytes

Some example queries

  • List all modules:

    g.V().hasLabel('module').valueMap().unfold()
    
  • List all functions:

    g.V().hasLabel('function').valueMap().unfold()
  • Count all the instructions:

    g.V().hasLabel('instruction').groupCount().by('opcode').unfold()
  • List the types:

    g.V().hasLabel('type').valueMap().unfold()
  • List function names that take 'x' as an argument:

    g.V().has('argument', 'name', 'x').out('function').valueMap('name')
  • List struct type members:

    g.V().has('type', 'typeID', 'struct').outE('elementType').project('order', 'type').by('order').by(__.inV().values('typeID'))