View Source PgRanges.TstzRange (PgRanges v1.1.1)
Wraps a Postgrex.Range
and casts to a PostgreSQL tstzrange
type.
Summary
Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Creates a new Elixir.PgRanges.TstzRange
struct. It expects the lower and upper
attributes to be DateTime
s.
Types
@type t() :: %PgRanges.TstzRange{ lower: DateTime.t(), lower_inclusive: boolean(), upper: DateTime.t(), upper_inclusive: boolean() }
Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
@spec new(any(), any(), keyword()) :: t()
@spec new(DateTime.t(), DateTime.t(), keyword()) :: t()
Creates a new Elixir.PgRanges.TstzRange
struct. It expects the lower and upper
attributes to be DateTime
s.
This will convert the date time structs to UTC time.
Options
lower_inclusive
: should the range be lower inclusive? Default istrue
upper_inclusive
: should the range be upper inclusive? Default isfalse