DADQL — Damn Another Data Query Language

Query languages are everywhere — from logs to complex softwares.

PocketBase has its own, and since Grroxy uses PocketBase, we updated its filter expression.

DADQL is an updated fork of fexpr.

DADQL overview DADQL filter
DADQL results

What's changed in this fork?

  • Filter map/json data in SQL style
  • Filter any data in Go using filter — works with any datatype
  • Regex search — use / to enclose the pattern
  • Added NOT operator
  • Use AND OR instead of && || for readability
  • Comment syntax changed to # (instead of //) — more similar to YAML/Python

Basic Syntax

Operators

OperatorDescription
=Equals
!=Not equals
~Contains
!~Does not contain
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal

Fields

Top-level

FieldTypeDescription
idstringRecord ID (e.g. ____________1.9)
hoststringFull host URL
portstringPort number
indexnumberRequest index
index_minornumberMinor index (sub-request)
is_httpsbooleanWhether the request uses HTTPS
has_paramsbooleanWhether the URL has query parameters
is_req_editedbooleanWhether the request was edited
is_resp_editedbooleanWhether the response was edited
createdstringTimestamp of capture

Request (req.*)

FieldTypeDescription
req.methodstringHTTP method (GET, POST, etc.)
req.urlstringFull request URL path with query
req.pathstringURL path only
req.querystringQuery string
req.lengthnumberRequest body length
req.has_cookiesbooleanWhether request has cookies
req.rawstringRaw request body
req.headers.*stringRequest header value (e.g. req.headers.Host)

Response (resp.*)

FieldTypeDescription
resp.statusnumberHTTP status code
resp.mimestringResponse MIME type
resp.titlestringPage title extracted from response
resp.lengthnumberResponse body length
resp.rawstringRaw response body
resp.headers.*stringResponse header value (e.g. resp.headers.Content-Type)

Edited versions

req_edited.* and resp_edited.* have the same fields as req.* and resp.*, containing the modified versions when a request or response has been edited via the interceptor.

Examples

Combining Filters

Use AND and OR to combine conditions:

Using with grxp

DADQL works with the grxp CLI tool:

URL Parser (grxp)

The grxp CLI tool parses and filters URLs:

Options:

  • -j — JSON output
  • -f — Filter with DADQL
  • -a — Probe URLs (check if alive)
  • -r — Filter responses
  • -c — Concurrency (default: 50)