Expand description
The write body: decoding it, and lowering it onto the two write paths.
This is the 0.1.0 gap. Op was decoded correctly and the write path never called the decoder,
so {"__op":"Increment","amount":1} was stored as a literal object with an __op key. The
body is a map of parse_rust_core::FieldWrite end to end for that reason: a field is either
a value or an operation, and “the write path forgot about operations” becomes a missing match
arm rather than silence.
The two paths are genuinely different and upstream treats them so. A create flattens each
operation to the value it would produce against an absent field
(flattenUpdateOperatorsForCreate, DatabaseController.js:323-365); an update lowers each to
a storage operation.
Functions§
- as_
plain_ body - The body as plain values, for the checks that run against the raw REST body.
- decode_
write_ body - Decode a JSON request body into fields and operations.
- echo_
response - Build the response body for a write, from the keys the request asked to echo and the row the adapter returned.
- echoed_
keys - The keys whose post-write value the response echoes back.
- enforce_
object_ id_ policy allowCustomObjectId, on the create path only (RestWrite.js:50-65).- flatten_
for_ create - Flatten a write body onto the create path.
- lower_
update - Lower a write body onto the update path.
Type Aliases§
- Write
Body - A decoded write body: ordered, because upstream field order is wire-visible.