shortcode v0.4.0 Shortcode.Ecto.UUID

An Ecto type for UUIDs shortcode with prefix.

Link to this section Summary

Types

A hex-encoded UUID string.

Link to this section Types

Link to this type

uuid_string()

Specs

uuid_string() :: <<_::288>>

A hex-encoded UUID string.

Link to this section Functions

Link to this function

autogenerate(params)

Specs

autogenerate(map()) :: binary()

Callback implementation for Ecto.ParameterizedType.autogenerate/1.

Link to this function

cast(uuid, params)

Specs

cast(binary(), map()) :: {:ok, uuid_string()} | :error

Callback implementation for Ecto.ParameterizedType.cast/2.

Link to this function

dump(uuid, _, _)

Specs

dump(any(), function(), map()) :: {:ok, uuid_string() | 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)

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

Specs

init(keyword()) :: map()

Callback implementation for Ecto.ParameterizedType.init/1.

Link to this function

load(uuid, _, params)

Specs

load(uuid_string(), function(), map()) :: {:ok, binary() | nil}

Callback implementation for Ecto.ParameterizedType.load/3.

Specs

type(any()) :: :uuid

Callback implementation for Ecto.ParameterizedType.type/1.