shortcode v0.5.0 Shortcode.Ecto.UUID View Source

An Ecto type for UUIDs shortcode with prefix.

Link to this section Summary

Types

A raw binary representation of a UUID.

t()

A hex-encoded UUID string.

Link to this section Types

Specs

raw() :: <<_::128>>

A raw binary representation of a UUID.

Specs

t() :: binary()

Specs

uuid() :: <<_::288>>

A hex-encoded UUID string.

Link to this section Functions

Specs

autogenerate(map()) :: t()

Callback implementation for Ecto.ParameterizedType.autogenerate/1.

Specs

cast(uuid() | nil, map()) :: {:ok, t() | nil} | :error

Callback implementation for Ecto.ParameterizedType.cast/2.

Link to this function

dump(data, dumper, params)

View Source

Specs

dump(t() | uuid(), function(), map()) :: {:ok, raw() | nil} | :error

Callback implementation for Ecto.ParameterizedType.dump/3.

Callback implementation for Ecto.ParameterizedType.embed_as/2.

Link to this function

equal?(term1, term2, params)

View Source

Callback implementation for Ecto.ParameterizedType.equal?/3.

Specs

init(keyword()) :: map()

Callback implementation for Ecto.ParameterizedType.init/1.

Specs

load(raw() | nil, function(), map()) :: {:ok, t() | nil} | :error

Callback implementation for Ecto.ParameterizedType.load/3.

Specs

type(any()) :: :uuid

Callback implementation for Ecto.ParameterizedType.type/1.