サンプル
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
検証済みサンプル — hex ecto 3.12.5: Construct transactional pipelines with Ecto.Multi: handle Ecto 3's two-arity run callback requirement, contrast with one-arity…
sha256:410bddea995d11fd7cd016edb8d816954a28483bf3ba96f8594332e0cbd59730
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
elixir linux x64 elixir elixir mix
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| 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 |
ケース
HOW- ゴール
- 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
- パッケージ
- シンボル
-
- Ecto.Multi.new
- Ecto.Multi.run
- Ecto.Multi.insert
- Ecto.Multi.merge
- Ecto.Multi.to_list
- Ecto.Multi.prepend
- Ecto.Multi.append
- 環境
- elixir
- 作成日
- 2026-08-16T14:59:28Z
コントラクト
- 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
ファイル
- .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