Skip to main content

create

Function create 

Source
pub async fn create(
    pool: &PgPool,
    actor: &Actor,
    input: ChangeInput,
) -> AppResult<Change>
Expand description

Creates a draft change.

ยงInvariants

  • Permission: CAD editor.
  • Locks: the change counter row, held until commit, so concurrent creations get different numbers.
  • Audit: change.create.
  • Notifications / webhooks: none.
  • Atomic: one transaction; the number is stepped in it and is not used up when it fails.