feat: writes, procedures, Fastify and Express adapters, documentation

This commit is contained in:
2026-11-02 01:25:49 +01:00
parent 4b276f21e3
commit 6801f257fb
35 changed files with 3109 additions and 182 deletions
+2 -1
View File
@@ -32,8 +32,9 @@ export function keyFilter(resource: Resource, id: string): Filter {
/** GET on a collection, or on one row when id is given. */
export async function readRows(db: Dialect, tx: Tx, resource: Resource, request: RestRequest<unknown>, limits: Limits,
scope: (r: Resource) => Filter[], id?: string): Promise<RestResponse> {
scope: (r: Resource) => Filter[], id?: string, extra: Filter[] = []): Promise<RestResponse> {
const plan = parseRead(resource, request.query, limits);
plan.where.push(...extra);
if (id !== undefined) {
plan.where.unshift(keyFilter(resource, id));
plan.limit = 1;