Skip to content

Instantly share code, notes, and snippets.

View technicalcapt's full-sized avatar

TheAnh technicalcapt

View GitHub Profile
defmodule MyApp.TimestampRange do
@behaviour Ecto.Type
def type, do: :tsrange
def cast([lower, upper]) do
{:ok, [lower, upper]}
end
def cast(_), do: :error