Ecto SQL v3.4.0 Tds.Ecto.UUID View Source

An TDS adapter type for UUIDs strings.

If you are using Tds adapter and UUIDs in your project, instead of Ecto.UUID you should use Tds.Ecto.UUID to generate correct bytes that should be stored in database.

Link to this section Summary

Types

A raw binary represenation of a UUID.

t()

A hex-encoded UUID string.

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.

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.

Link to this section Types

Link to this type

raw()

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

A raw binary represenation of a UUID.

A hex-encoded UUID string.

Link to this section Functions

Link to this function

bingenerate()

View Source
bingenerate() :: raw()

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

Link to this function

cast(arg1)

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

Casts to UUID.

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

Link to this function

dump(arg1)

View Source
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.

Link to this function

generate()

View Source
generate() :: t()

Generates a version 4 (random) UUID.

Link to this function

load(uuid)

View Source
load(raw() | any()) :: {:ok, t()} | :error

Converts a binary UUID into a string.