Skip to main content

parse_mutation_row

Function parse_mutation_row 

Source
pub fn parse_mutation_row<S: BuildHasher>(
    row: &HashMap<String, Value, S>,
) -> Result<MutationOutcome>
Expand description

Parse a mutation_response row into a MutationOutcome.

Deserializes typed columns directly — no string parsing. Rejects the illegal combination succeeded=false AND state_changed=true (the builder refuses to construct such a row; defense in depth here so a hand-written SQL path cannot slip a partial-failure row past the parser).

error_detail (not metadata) feeds the executor’s error-field projection so downstream consumers remain untouched: metadata carries observability only and must not be used as an error-data carrier.

§Errors

Returns FraiseQLError::Validation if:

  • the row fails to deserialize into MutationResponse;
  • http_status is outside 100..=599;
  • succeeded=false with state_changed=true (illegal per the semantics table);
  • succeeded=false with error_class missing.