Skip to main content

Module batch

Module batch 

Source
Expand description

POST /batch.

Upstream: src/batch.js. The body is {requests: [{method, path, body}, ...]} and the response is the results array itself, not an object wrapping it (batch.js:194).

Sub-requests share one auth, one role expansion and one schema snapshot with the request that carried them, which is upstream’s request.auth = req.auth (batch.js:167) plus the fact that everything downstream takes the schema controller it was handed. Twenty writes in one batch therefore cannot see two different schemas mid-flight.

transaction: true is refused rather than accepted and ignored. Upstream opens a real transactional session for it (batch.js:155-156) and rolls the whole batch back on any error. parse-rust has no transaction support, and a client that asked for all-or-nothing and silently got per-operation semantics is the failure mode this milestone names by name.

Functions§

handle
Run a batch.