kronos_ecto v0.1.0 Kronos.Ecto.Timestamp

Custom Type for Kronos.t

Summary

Functions

Handle casting to Kronos.Ecto.Timestamp

Load to the native Ecto representation

Load from the native Ecto representation

Returns the underlying schema type for the custom type

Functions

cast(raw_value)

Handle casting to Kronos.Ecto.Timestamp

dump(input)

Load to the native Ecto representation

load(output)

Load from the native Ecto representation

type()

Returns the underlying schema type for the custom type.

For example, if you want to provide your own date structures, the type function should return :date.

Note this function is not required to return Ecto primitive types, the type is only required to be known by the adapter.

Callback implementation for Ecto.Type.type/0.