View Source Interval.Support.EctoType (Interval v0.3.3)

Implements support for auto-implementing Ecto.Type.

example

Example

use Interval.Support.EctoTypeType, ecto_type: :numrange

Link to this section Summary

Functions

Convert a Postgrex.Range to a struct of type module

Returns if Interval was compiled with support for Ecto.Type

Link to this section Functions

Link to this function

from_postgrex_range(range, module)

View Source

Convert a Postgrex.Range to a struct of type module

@spec supported?() :: boolean()

Returns if Interval was compiled with support for Ecto.Type

Link to this function

to_postgrex_range(interval, module \\ nil)

View Source

Convert an Interval struct to a Postgrex.Range.