View Source Ecto.UUID (Ecto v3.9.1)
An Ecto type for UUID strings.
Link to this section Summary
Functions
Generates a random, version 4 UUID in the binary format.
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
Casts to a UUID.
Same as dump/1
but raises Ecto.ArgumentError
on invalid arguments.
Converts a string representing a UUID into a raw binary.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Generates a random, version 4 UUID.
Same as load/1
but raises Ecto.ArgumentError
on invalid arguments.
Converts a binary UUID into a string.
Link to this section Types
@type raw() :: <<_::128>>
A raw binary representation of a UUID.
@type t() :: <<_::288>>
A hex-encoded UUID string.
Link to this section Functions
@spec bingenerate() :: raw()
Generates a random, version 4 UUID in the binary format.
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
Casts to a UUID.
Same as dump/1
but raises Ecto.ArgumentError
on invalid arguments.
Converts a string representing a UUID into a raw binary.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
@spec generate() :: t()
Generates a random, version 4 UUID.
Same as load/1
but raises Ecto.ArgumentError
on invalid arguments.
Converts a binary UUID into a string.