API/DriverDefinition
DriverDefinition
src/types/driver-definition.type.ts3 public methodstype
Per-driver factory bundle
Names the four pieces a driver contributes — request strategy, response
strategy, response-options subclass — so adding a driver is one entry
in DRIVERS instead of three parallel switch cases in the provider
builder.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
id |
Driver |
The driver’s identifier. Duplicates its key in DRIVERS, which test/drivers.spec.ts asserts stays true. Carrying it on the definition lets a driver be passed around on its own — createQubee({ driver: STRAPI_DRIVER }) — while still naming the driver in capability errors. |
Methods
Section titled “Methods”createRequestStrategy()
Section titled “createRequestStrategy()”createRequestStrategy(paginationMode: PaginationModeEnum): IRequestStrategyBuild the request strategy for this driver
Receives the configured PaginationModeEnum; only PostgREST
actually consults it today (RANGE-header mode), other drivers
ignore the argument.
| Parameter | Type | Description |
|---|---|---|
paginationMode |
PaginationModeEnum |
Wire-level pagination mechanism |
Returns — A fresh request strategy instance
createResponseOptions()
Section titled “createResponseOptions()”createResponseOptions(config: PaginationConfig): ResponseOptionsBuild the driver-specific ResponseOptions instance
Honours user-supplied key-path overrides via PaginationConfig.
| Parameter | Type | Description |
|---|---|---|
config |
PaginationConfig |
User-supplied response key overrides |
Returns — A ResponseOptions (or subclass) carrying the resolved defaults
createResponseStrategy()
Section titled “createResponseStrategy()”createResponseStrategy(): IResponseStrategyBuild the response strategy for this driver
Returns — A fresh response strategy instance
