IRequestStrategy
Strategy interface for building request URIs
Each driver implements this interface to produce URIs in the format expected by the corresponding backend.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
capabilities |
StrategyCapabilities |
Capability flags declared by this driver Read by NgQubeeService to gate feature methods (e.g. addFilter) without hardcoding DriverEnum checks. Each strategy returns a static, immutable capability map. |
Methods
Section titled “Methods”buildPaginationHeaders()
Section titled “buildPaginationHeaders()”buildPaginationHeaders(state: QueryBuilderState): Record<string, string> | nullCompute HTTP request headers carrying pagination metadata
Honoured only by drivers that support header-based pagination (the
PostgREST driver configured with PaginationModeEnum.RANGE). All
other drivers should return null — which is also the default when
a driver does not override this method.
When the method returns a non-null object, NgQubeeService.buildUri
is expected to have already omitted URL-level pagination params for
that request; the consumer then merges these headers into the HTTP
call so the server knows the requested range.
| Parameter | Type | Description |
|---|---|---|
state |
QueryBuilderState |
The current query builder state |
Returns — A map of header name → value, or null when not applicable
buildUri()
Section titled “buildUri()”buildUri(state: QueryBuilderState, options: QueryBuilderOptions): stringBuild a URI string from the given query builder state
| Parameter | Type | Description |
|---|---|---|
state |
QueryBuilderState |
The current query builder state |
options |
QueryBuilderOptions |
The query parameter key name configuration |
Returns — The composed URI string
validateLimit()
Section titled “validateLimit()”validateLimit(limit: number): voidAssert that the given limit value is valid for this driver
Validation is driver-scoped because the accepted range differs by
backend: nestjs-paginate treats -1 as a “fetch all” sentinel, while
other backends (Laravel, Spatie, JSON:API) require a positive integer.
| Parameter | Type | Description |
|---|---|---|
limit |
number |
The limit value to validate |
