Ecto.UUID (Ecto v3.6.0) 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.
Same as dump/1
but raises Ecto.ArgumentError
on invalid arguments.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Generates a version 4 (random) UUID.
Converts a binary UUID into a string.
Same as load/1
but raises Ecto.ArgumentError
on invalid arguments.
Link to this section Types
Specs
raw() :: <<_::128>>
A raw binary representation of a UUID.
Specs
t() :: <<_::288>>
A hex-encoded UUID string.
Link to this section Functions
Specs
bingenerate() :: raw()
Generates a version 4 (random) UUID in the binary format.
Specs
Casts to UUID.
Specs
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
Specs
Converts a string representing a UUID into a binary.
Specs
Same as dump/1
but raises Ecto.ArgumentError
on invalid arguments.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Specs
generate() :: t()
Generates a version 4 (random) UUID.
Specs
Converts a binary UUID into a string.
Specs
Same as load/1
but raises Ecto.ArgumentError
on invalid arguments.