View Source Crontab.CronExpression.Ecto.Type (crontab v1.1.14)

Provides a type for Ecto usage.

The underlying data type should be a map.

Migration Example

create table(:my_table) do
  add :schedule, :map
end

Schema Example

schema "my_table" do
  field :schedule, Crontab.CronExpression.Ecto.Type
end

Summary

Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

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

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.

Types

Functions

@spec cast(any()) :: {:ok, Crontab.CronExpression.t()} | :error

Callback implementation for Ecto.Type.cast/1.

@spec dump(any()) :: {:ok, Crontab.CronExpression.t()} | :error

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

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

@spec load(any()) :: {:ok, Crontab.CronExpression.t()} | :error

Callback implementation for Ecto.Type.load/1.

@spec type() :: :map

Callback implementation for Ecto.Type.type/0.