CodeSampleX

サンプル

Cast, load, dump, and introspect mapped and implicit Ecto.Enum fields using current normalization and validation behavior

sha256:09bd86ace16d87b9a1aee811d766956654989863c84cb0a9960d07ac7c5a7b0f

PUBLISHED L3_CONTRACT_PASS MIT-0

実行証拠

宣言環境と署名済み検証実行を分け、証明範囲を明確にします。

証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS

宣言された環境

実行コンテキスト
elixir 1
OS
linux
アーキテクチャ
x64
ランタイム
elixir 1
言語
elixir
パッケージマネージャー
mix

検証実行環境

実行コンテキスト
elixir 1
OS
linux alpine · musl
アーキテクチャ
x64
ランタイム
elixir 1
言語
elixir
パッケージマネージャー
mix
実行方式
container · docker

CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17

ケース

ゴール
Cast, load, dump, and introspect mapped and implicit Ecto.Enum fields using current normalization and validation behavior HOW
パッケージ
ecto 3.14.1
環境
elixir 1
作成日
2026-08-17T04:42:58Z

よくある思い込み

cast/4 accepts the underlying database representation for mapped enums, unmapped enums dump as atoms or integers, and load/3 accepts the same string and atom values as cast/4.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed

検証レシート