View Source Ecto.ShortUUID (ecto_shortuuid v0.2.0)
An Ecto type for Short UUID strings.
Summary
Functions
Casts the given input to ShortUUID
Dumps the given string representing a ShortUUID or UUID into a binary.
Ecto v3 callback Dictates how the type should be treated inside embeds.
Ecto v3 callback Checks if two terms are semantically equal.
Generates a ShortUUID string based on a version 4 (random) UUID.
Loads a binary UUID into a ShortUUID string.
The Ecto type.
Types
@type raw() :: <<_::128>>
A raw binary representation of a UUID.
@type shortuuid57() :: <<_::176>>
A base57 ShortUUID string.
@type uuid() :: <<_::288>>
A hex-encoded UUID string.
Functions
@spec cast(shortuuid57() | uuid() | any()) :: {:ok, shortuuid57()} | :error
Casts the given input to ShortUUID
@spec dump(shortuuid57() | uuid() | any()) :: {:ok, raw()} | :error
Dumps the given string representing a ShortUUID or UUID into a binary.
Ecto v3 callback Dictates how the type should be treated inside embeds.
Ecto v3 callback Checks if two terms are semantically equal.
Generates a ShortUUID string based on a version 4 (random) UUID.
Loads a binary UUID into a ShortUUID string.
The Ecto type.