Skip to main content

Module rsql

Module rsql 

Source
Expand description

RSQL filter and sort parser.

Syntax: field<op>value joined by ; (AND) or , (OR), grouped with ().

Operators: == != =gt= =ge= =lt= =le= =in= =out= =like= =ilike= =contains= =starts= =ends= =between= =null=

Sort: ?sort=-created_at,name (- prefix = descending)

Structs§

SortSpec

Enums§

FilterNode
RsqlOp

Functions§

parse_rsql
Parse an RSQL expression string into a FilterNode tree. Returns AppError::Validation (HTTP 422) on any parse error.
parse_sort
Parse a sort query parameter into a list of SortSpec. Format: field1,-field2,field3 (- prefix = descending). Silently skips empty tokens.