Skip to main content

add_result

Function add_result 

Source
pub async fn add_result(
    pool: &PgPool,
    actor: &Actor,
    revision_id: Uuid,
    input: ResultInput,
) -> AppResult<SimulationResult>
Expand description

Adds a result value to a simulation revision checked out by the actor.

ยงInvariants

  • Permission: CAD editor in the project group, revision of a simulation item (400 otherwise), in work and checked out by the actor (403 / 409); a hidden revision is a 404.
  • Locks: the simulation revision (FOR UPDATE).
  • Data: at most 2000 result values per revision (400); the same name and load case twice gets a 409.
  • Audit: simulation.result.add.
  • Notifications: none.
  • Webhooks: simulation.result_added, emitted in the same transaction.
  • Atomic: one transaction.