Ecto.Atom (helper v1.0.1) View Source

An Ecto type for ULID (Universally Unique Lexicographically Sortable Identifier) bitstring. This format is binary compatible with UUID, but also provides lexicographic sorting capability. The spec for ULID can be found here

Link to this section Summary

Functions

Ecto.Type.cast/1 callback implementation

Ecto.Type.dump/1 callback implementation

Ecto.Type.embed_as/1 callback implementation

Ecto.Type.equal?/2 callback implementation

Ecto.Type.load/1 callback implementation

Ecto.Type.type/0 callback implementation

Link to this section Functions

Specs

cast(atom()) :: {:ok, atom()} | :error

Ecto.Type.cast/1 callback implementation

Specs

dump(atom()) :: {:ok, binary()} | :error

Ecto.Type.dump/1 callback implementation

Specs

embed_as(atom()) :: :self

Ecto.Type.embed_as/1 callback implementation

Examples

iex> embed_as(:any)
:self

Specs

equal?(t1, t2) :: boolean() when t1: binary() | atom(), t2: t1

Ecto.Type.equal?/2 callback implementation

Specs

load(binary()) :: {:ok, atom()}

Ecto.Type.load/1 callback implementation

Specs

type() :: :string

Ecto.Type.type/0 callback implementation

Examples

iex> type()
:string