EctoLtree.LabelTree (EctoLtree v0.4.0) View Source

This module defines the LabelTree struct. Implements the Ecto.Type behaviour.

Fields

  • labels

Link to this section Summary

Functions

Provides custom casting rules from external data to internal representation.

From internal representation to database.

Callback implementation for Ecto.Type.embed_as/1.

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

From database to internal representation.

Returns the underlying schema type.

Link to this section Types

Specs

t() :: %EctoLtree.LabelTree{labels: [String.t()]}

Link to this section Functions

Specs

cast(String.t()) :: {:ok, t()} | :error

Provides custom casting rules from external data to internal representation.

Specs

decode(t()) :: String.t()

Specs

dump(t()) :: {:ok, String.t()} | :error

From internal representation to database.

Callback implementation for Ecto.Type.embed_as/1.

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

Specs

load(String.t()) :: {:ok, t()} | :error

From database to internal representation.

Specs

type() :: :ltree

Returns the underlying schema type.