W3cubDocs

/Phoenix

Ecto.UUID

An Ecto type for UUIDs strings.

Summary

Types

raw()

A raw binary representation of a UUID.

t()

A hex-encoded UUID string.

Functions

bingenerate()

Generates a version 4 (random) UUID in the binary format.

cast(binary)

Casts to UUID.

cast!(value)

Same as cast/1 but raises Ecto.CastError on invalid arguments.

dump(arg1)

Converts a string representing a UUID into a binary.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

generate()

Generates a version 4 (random) UUID.

load(uuid)

Converts a binary UUID into a string.

Types

raw()

Specs

raw() :: <<_::128>>

A raw binary representation of a UUID.

t()

Specs

t() :: <<_::288>>

A hex-encoded UUID string.

Functions

bingenerate()

Specs

bingenerate() :: raw()

Generates a version 4 (random) UUID in the binary format.

cast(binary)

Specs

cast(t() | raw() | any()) :: {:ok, t()} | :error

Casts to UUID.

cast!(value)

Specs

cast!(t() | raw() | any()) :: t()

Same as cast/1 but raises Ecto.CastError on invalid arguments.

dump(arg1)

Specs

dump(t() | any()) :: {:ok, raw()} | :error

Converts a string representing a UUID into a binary.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

generate()

Specs

generate() :: t()

Generates a version 4 (random) UUID.

load(uuid)

Specs

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