A read request flows down through the layers and back up:
1.00x
- Query arrives — the API server checks auth and permissions, then resolves the field.
- SQL intent — the query builder turns the selected fields, filter, sorting, and paging into a compiled, adapter-neutral query.
- Dialect — the adapter renders that into its engine's SQL and runs it.
- Decode — the adapter decodes the raw protocol response into keyed records.
- Transform — the response transformer applies the schema-aware mapping into typed objects.
- Respond — the API returns the typed rows plus pagination metadata.
The count and the page come back together. The query builder emits two CTEs, so a single round trip yields both the rows and the total used for PageInfo.