Skip to content

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

Notifications You must be signed in to change notification settings

ibarchenkov/ecto_interval

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EctoInterval

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

Installation

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

def deps do
  [{:ecto_interval, "~> 0.1.0"}]
end

Usage

Just use EctoInterval as a field type, like:

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%