Exemplo
ecto 3.12.5: Construct transactional pipelines with Ecto.Multi: handle Ecto 3's two-arity run callback requirement, contrast with one-arity dynamic operation builders, and inspect pipeline stages
Amostra verificada para hex ecto 3.12.5: Construct transactional pipelines with Ecto.Multi: handle Ecto 3's two-arity run callback requirement, contrast with…
sha256:410bddea995d11fd7cd016edb8d816954a28483bf3ba96f8594332e0cbd59730
Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu.
Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas.
MIT-0
Evidência de execução
O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.
- Base da evidência
- Contrato assinado aprovado
- Recibos de verificação
- 2
- Chaves de assinatura que o compilaram
- 2
Ambiente declarado
elixir linux x64 elixir elixir mix
Ambientes das execuções de verificação
| Ambiente | Contrato | Etapas | Execução |
|---|---|---|---|
| elixir 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:PASS · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-16 |
| elixir 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:PASS · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-18 |
Caso
HOW- Objetivo
- Construct transactional pipelines with Ecto.Multi: handle Ecto 3's two-arity run callback requirement, contrast with one-arity dynamic operation builders, and inspect pipeline stages
- Pacotes
- Símbolos
-
- Ecto.Multi.new
- Ecto.Multi.run
- Ecto.Multi.insert
- Ecto.Multi.merge
- Ecto.Multi.to_list
- Ecto.Multi.prepend
- Ecto.Multi.append
- Ambiente
- elixir
- Criado
- 2026-08-16T14:59:28Z
Contrato
- assert Ecto.Multi.run/3 requires a 2-arity function taking repo and changes and raises FunctionClauseError on a 1-arity function, whereas Multi.insert/3 and Multi.merge/2 accept 1-arity functions receiving only changes
- assert Multi.run/5 with MFA stores the module, function, and arguments tuple, and dispatches with repo and changes prepended as the first two arguments
- assert Multi operations enforce strictly unique step names across the pipeline, raising RuntimeError on single step collisions
- assert Multi.to_list/1 returns operations in chronological pipeline order, whereas internal struct operations store them reversed
- assert Multi.prepend/2 and Multi.append/2 combine distinct transaction pipelines, preserving execution order and rejecting shared names with ArgumentError
Arquivos
- .formatter.exs
- .gitignore
- NOTES.md
- csx.json
- lib/csx_ecto_multi/transaction_pipeline.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs