An Ecto type for UUIDs strings.
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.
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.
raw() :: <<_::128>>
A raw binary representation of a UUID.
t() :: <<_::288>>
A hex-encoded UUID string.
bingenerate() :: raw()
Generates a version 4 (random) UUID in the binary format.
cast(t() | raw() | any()) :: {:ok, t()} | :error
Casts to UUID.
cast!(t() | raw() | any()) :: t()
Same as cast/1
but raises Ecto.CastError
on invalid arguments.
dump(t() | any()) :: {:ok, raw()} | :error
Converts a string representing a UUID into a binary.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
generate() :: t()
Generates a version 4 (random) UUID.
load(raw() | any()) :: {:ok, t()} | :error
Converts a binary UUID into a string.
© 2013 Plataformatec
© 2020 Dashbit
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Ecto.UUID.html