Ecto v3.2.1 Ecto.UUID View Source
An Ecto type for UUIDs strings.
Link to this section Summary
Functions
Generates a version 4 (random) UUID in the binary format.
Casts to UUID.
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
Converts a string representing a UUID into a binary.
Dictates how the type should be treated inside embeds.
Checks if two terms are semantically equal.
Generates a version 4 (random) UUID.
Converts a binary UUID into a string.
Link to this section Types
raw()
View Source
raw() :: <<_::128>>
raw() :: <<_::128>>
A raw binary representation of a UUID.
t()
View Source
t() :: <<_::288>>
t() :: <<_::288>>
A hex-encoded UUID string.
Link to this section Functions
bingenerate()
View Source
bingenerate() :: raw()
bingenerate() :: raw()
Generates a version 4 (random) UUID in the binary format.
cast(binary) View Source
Casts to UUID.
cast!(value) View Source
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
dump(arg1) View Source
Converts a string representing a UUID into a binary.
embed_as(_) View Source
Dictates how the type should be treated inside embeds.
By default, the type is sent as itself, without calling
dumping to keep the higher level representation. But
it can be set to :dump
to it is dumped before encoded.
Callback implementation for Ecto.Type.embed_as/1
.
equal?(term1, term2) View Source
Checks if two terms are semantically equal.
Callback implementation for Ecto.Type.equal?/2
.
generate()
View Source
generate() :: t()
generate() :: t()
Generates a version 4 (random) UUID.
load(uuid) View Source
Converts a binary UUID into a string.