Expand description
The read and write pipelines.
Generic over StorageAdapter rather than taking a dyn, so the storage boundary costs
nothing at runtime and a future Postgres adapter drops in by type rather than by trait object.
Every entry point takes a SchemaSnapshot and an AclScope and runs the stages in
upstream’s order. The read order is DatabaseController.js:1418-1598:
load the schema, once per request; resolve the class, a missing one behaving as empty;
validate the sort, dropping unknown keys; the CLP gate; $relatedTo with its authorization;
relation-field constraints; pointer permissions; protected fields; the deny check; the ACL
clause; query validation; dispatch; raise the ACL and filter sensitive data.
Two orderings differ from a naive reading and both are upstream’s. denyProtectedFields runs
in RestQuery.execute before the CLP gate (RestQuery.js:284-288), so a query naming a
protected field reports that rather than the CLP denial. And canAddField runs before the
per-operation gate on a write (DatabaseController.js:526-536), so an unauthorized field
addition is reported ahead of an unauthorized create.
Structs§
- Create
Response - What a create returns:
{objectId, createdAt}, plus the post-write value of any operation the request carried. - Ctx
- Everything one request carries into every stage.
- Find
Options - Everything about a read that is not a constraint.
- Update
Response - What an update returns:
{updatedAt}, plus the same operation echo.
Constants§
- SESSION_
CLASS - The class sessions live in.
- USER_
CLASS - The class users live in.