Skip to content

Brief query DSL research

Ionel Cristian Mărieș edited this page Mar 15, 2020 · 2 revisions

Currently hunter has a pretty verbose query api (what you put in PYTHONHUNTER env var or via hunter-cli):

  • it requires string quoting
  • it requires all sorts of characters like: (),
  • composition is very lispy instead of being more natural like sql, eg: Q(something) | ~Q(otherthing) vs something or not otherthing

What could the new DSL be?

Verbose API Brief DSL
Q(module="foobar") module=foobar
Q(module="foobar", action=Something) if module=foobar then something
Clone this wiki locally