public class PostgresPlugin extends Object implements JdbiPlugin
InetAddress (including Inet4Address and Inet6Address)LocalDateLocalTimeLocalDateTimeOffsetDateTimeDuration (see notes below)Period (see notes below)Map<String, String> (for HSTORE columns)UUID
The following qualified types have Beta support for binding and mapping:
@MacAddr java.lang.String (for MACADDR columns)@HStore Map<String, String> (for HSTORE columns)Also sets up SQL array support for the following types:
A note about the mapping between the Postgres interval type and the Java Period and
Duration types:
The Java library authors are much more strict about the temporal amounts representable by Periods and Durations than
Postgres is with its interval type. The argument factories and column mapper factories implemented in this
package respect this spirit of unambiguous strictness. Consequently:
Periods can be mapped to intervals.Durations can be mapped to intervals.intervals can be mapped to Periods.intervals can be mapped to Durations.DurationArgumentFactory,
PeriodColumnMapperFactory, and DurationColumnMapperFactory.
In addition, some potentially unexpected implicit conversions can occur by virtue of the Postgres server logic. For example, at the time of writing, storing a Period of -3 years, 2 months, and -1 days results in an interval (and consequently, a column-mapped Period) of -2 years, -10 months, and -1 days.
| Constructor and Description |
|---|
PostgresPlugin() |
| Modifier and Type | Method and Description |
|---|---|
Handle |
customizeHandle(Handle handle) |
void |
customizeJdbi(Jdbi jdbi) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomizeConnectionpublic void customizeJdbi(Jdbi jdbi)
customizeJdbi in interface JdbiPluginpublic Handle customizeHandle(Handle handle)
customizeHandle in interface JdbiPluginCopyright © 2019. All rights reserved.