Interval.Support.EctoType (Interval v1.0.0)

View Source

Implements support for auto-implementing Ecto.Type.

Example

use Interval.Support.EctoTypeType, ecto_type: :numrange

Summary

Functions

Convert a Postgrex.Range to a struct of type module

Returns if Interval was compiled with support for Ecto.Type

Functions

from_postgrex_range(range, module)

Convert a Postgrex.Range to a struct of type module

supported?()

@spec supported?() :: true

Returns if Interval was compiled with support for Ecto.Type

to_postgrex_range(interval, module \\ nil)

Convert an Interval struct to a Postgrex.Range.