- All Superinterfaces:
Adapter.Contract<T>
,Adapter.Contract.Scalar<T>
- All Known Implementing Classes:
Datetime.TimestampTZ.AsOffsetDateTime
- Enclosing interface:
Datetime
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
TIMESTAMPTZ
type's PostgreSQL semantics: microseconds since
midnight UTC of the PostgreSQL epoch.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A reference implementation that maps toOffsetDateTime
.static interface
Functional interface to obtain information from the PostgreSQL type modifier applied to the type.Nested classes/interfaces inherited from interface org.postgresql.pljava.Adapter.Contract
Adapter.Contract.Array<T,
E, A extends Adapter<E, ?>>, Adapter.Contract.Scalar<T> -
Field Summary
Modifier and TypeFieldDescriptionstatic final OffsetDateTime
The PostgreSQL "epoch" as ajava.time.OffsetDateTime
. -
Method Summary
-
Field Details
-
POSTGRES_EPOCH
The PostgreSQL "epoch" as ajava.time.OffsetDateTime
.
-
-
Method Details
-
construct
Constructs a representation T from the components of the PostgreSQL data type.The argument represents microseconds since midnight UTC on
POSTGRES_EPOCH
.Given any desired local time zone, conversion to/from this value is possible if the rules for that time zone as of the represented date are available.
The argument represents microseconds since
POSTGRES_EPOCH
, unless it is one of the special valuesDT_NOBEGIN
orDT_NOEND
.When constructing a representation that lacks notions of positive or negative "infinity", one option is to simply map the above special values no differently than ordinary ones, and remember the two resulting representations as the "infinite" ones. If that is done without wraparound, the resulting "-infinity" value will precede all other PostgreSQL-representable dates and the resulting "+infinity" will follow them.
The older
java.util.Date
cannot represent those values without wraparound; the two resulting values can still be saved as representing -infinity and +infinity, but will not have the expected ordering with respect to other values. They will both be quite far from the present.
-