- All Implemented Interfaces:
Adapter.Contract<LocalTime>
,Adapter.Contract.Scalar<LocalTime>
,Datetime.Time<LocalTime>
- Enclosing interface:
Datetime.Time<T>
LocalTime
.
While PostgreSQL allows 24:00:00 as a valid time, LocalTime
maxes out at the preceding nanosecond. That is still a value that
can be distinguished, because PostgreSQL's time resolution is only
to microseconds, so the PostgreSQL 24:00:00 value will be mapped
to that.
In the other direction, nanoseconds will be rounded to microseconds,
so any value within the half-microsecond preceding HOUR24
will become the PostgreSQL 24:00:00 value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.postgresql.pljava.Adapter.Contract
Adapter.Contract.Array<T,
E, A extends Adapter<E, ?>>, Adapter.Contract.Scalar<T> Nested classes/interfaces inherited from interface org.postgresql.pljava.adt.Datetime.Time
Datetime.Time.AsLocalTime, Datetime.Time.Modifier<T>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LocalTime
LocalTime
representing the 24:00:00 time that PostgreSQL accepts butLocalTime
does not.static final Datetime.Time.AsLocalTime
-
Method Summary
Modifier and TypeMethodDescriptionconstruct
(long microsecondsSinceMidnight) Constructs a representation T from the components of the PostgreSQL data type.<T> T
store
(LocalTime t, Datetime.Time<T> f)
-
Field Details
-
INSTANCE
-
HOUR24
LocalTime
representing the 24:00:00 time that PostgreSQL accepts butLocalTime
does not.This
LocalTime
represents the immediately preceding nanosecond. That is still distinguishable from any other PostgreSQL time, because those have only microsecond resolution.
-
-
Method Details
-
construct
Description copied from interface:Datetime.Time
Constructs a representation T from the components of the PostgreSQL data type.The argument represents microseconds since midnight, nonnegative and not exceeding
USECS_PER_DAY
.PostgreSQL does allow the value to exactly equal
USECS_PER_DAY
. 24:00:00 is considered a valid value. That may need extra attention if the representation to be constructed doesn't allow that.- Specified by:
construct
in interfaceDatetime.Time<LocalTime>
-
store
-