PgRanges.TstzRange (PgRanges v1.1.0) View Source
Wraps a Postgrex.Range
and casts to a PostgreSQL tstzrange
type.
Link to this section 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.
Link to this section Types
Specs
t() :: %PgRanges.TstzRange{ lower: DateTime.t(), lower_inclusive: boolean(), upper: DateTime.t(), upper_inclusive: boolean() }
Link to this section Functions
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Specs
new(any(), any(), keyword()) :: t()
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