サンプル
ecto 3.14.1: Inspect Ecto parameterized type representation, normalize Ecto.Enum mapped inputs, and distinguish scalar from composite cast failure shapes
検証済みサンプル — hex ecto 3.14.1: Inspect Ecto parameterized type representation, normalize Ecto.Enum mapped inputs, and distinguish scalar from composite cast…
sha256:6c6fb613f0a59efec76da1c4c4b630f16524102c374f9718430edeb1abd1742e
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
elixir 1 linux x64 elixir 1 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-17 |
| 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- ゴール
- Inspect Ecto parameterized type representation, normalize Ecto.Enum mapped inputs, and distinguish scalar from composite cast failure shapes
- パッケージ
- シンボル
-
- Ecto.ParameterizedType
- Ecto.Type.parameterized?
- Ecto.Type.type
- Ecto.Type.cast!
- Ecto.Type.cast
- Ecto.Type.dump
- Ecto.Type.load
- Ecto.Enum.values
- Ecto.Enum.dump_values
- Ecto.Enum.mappings
- Ecto.Changeset.cast
- Ecto.CastError
- 環境
- elixir 1
- 作成日
- 2026-08-17T04:43:50Z
コントラクト
- assert schema type for an Ecto.Enum is a 2-element tuple {:parameterized, {Ecto.Enum, info}} rather than a 3-element tuple, Ecto.Type.parameterized? identifies it, and Ecto.Type.type returns the underlying primitive storage type
- assert casting an Ecto.Enum with mapped values accepts atom keys, string names, and raw mapped integers, while rejecting stringified integers with inclusion metadata
- assert Ecto.Enum reflections distinguish between Elixir value atoms, database dump values, and key-value mappings
- assert Ecto.Type.cast! returns normalized scalar values and raises Ecto.CastError on failure, while invalid composite arrays collapse to :error and changesets omit the failing element index
ファイル
- NOTES.md
- csx.json
- lib/account.ex
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs