All Projects → OvermindDL1 → ecto_interval

OvermindDL1 / ecto_interval

Licence: other
Interval type for Ecto, currently only implemented for PostgreSQL, other database PR's are welcome.

Programming Languages

elixir
2628 projects

EctoInterval

Interval type for Ecto, currently only implemented for PostgreSQL, PR's to support others are welcome.

Installation

Available in Hex, the package can be installed by adding ecto_interval to your list of dependencies in mix.exs:

    {:ecto_interval, "~> 0.2.4"},

Usage

Just use EctoInterval as a field type, like:

    field :renewal_period, EctoInterval, default: %{months: 0, days: 0, secs: 0}

Contributors

  • Special thanks to @ibarchenkov for updating to latest implementation!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].