Query Params Integration
Criteria can be constructed directly from URL query parameters, making it perfect for REST APIs.Basic Usage
Query Parameter Format
Filters follow the pattern:field:operator=value
Supported Parameters
| Parameter | Format | Example |
|---|---|---|
| Filter | field:operator=value | age:greaterThan=18 |
| Ordering | orderBy=field:direction | orderBy=createdAt:desc |
| Multiple orders | orderBy=field1:dir,field2:dir | orderBy=featured:desc,price:asc |
| Page | page=number | page=2 |
| Limit | limit=number | limit=20 |
| Search | search=query | search=laptop |
| Search fields | searchFields=field1,field2 | searchFields=name,description |
Complete URL Example
Value Parsing
Values are automatically parsed to their correct types:Nested Fields in Query Params
Quantifiers in Query Params
Use@quantifier suffix for array field quantifiers:
Field Adapters
Adapters map domain field names to database column names, allowing you to maintain clean API contracts while using different database schemas.Why Use Adapters?
Creating an Adapter
Using an Adapter
Nested Field Adapters
Map nested paths to different structures:Adapter with Prefix Matching
Adapters support prefix matching for nested paths:Getting the Adapter
Serialization
toJSON()
Convert criteria to a plain object:fromObject()
Reconstruct criteria from a plain object:Use Cases for Serialization
API Transport
Send criteria from frontend to backend
Caching
Cache query configurations
Saved Filters
Store user’s saved filter presets
Logging
Log query configurations for debugging