Skip to content

Query Engine

lpachecob edited this page Mar 22, 2026 · 3 revisions

🔎 Pro Query Engine: API Search Power

BOUNDLY's Dynamic Repository provides a powerful query engine out of the box. Any entity with a resource in its #[Entity] attribute gets a fully functional GET endpoint.


🔎 Filtering

Add filters directly as URL parameters.

Suffix Operator Example
_like LIKE name_like=Luisi
_gt > price_gt=100
_lt < id_lt=50
_eq = status_eq=1 (Default)
_not != category_not=3
_in IN id_in=1,2,3
GET /api/users?name_like=Luis&age_gt=18

📦 Eager Loading (include)

Use include to fetch relationships defined in your entity.

GET /api/posts?include=author,comments

🔝 Pagination (per_page)

BOUNDLY returns a paginated metadata response by default.

Parameter Default Description
per_page 15 Number of items per page.
page 1 Current page.
GET /api/products?per_page=50&page=2

🔃 Sorting (sort / order)

Parameter Default Description
sort 'id' Column to sort by.
order 'desc' Sort direction (asc or desc).
GET /api/orders?sort=created_at&order=asc

🧪 Combined Example

Get the first 10 public users named "Luis", including their profiles, sorted by registration date.

GET /api/users?name_like=Luis&status_eq=1&include=profile&sort=created_at&order=asc&per_page=10

Next Step: CLI-Commands 🚀

Clone this wiki locally