Package org.jdbi.v3.postgres
Class PostgresTypes
java.lang.Object
org.jdbi.v3.postgres.PostgresTypes
- All Implemented Interfaces:
JdbiConfig<PostgresTypes>
Handler for PostgreSQL custom types.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this configuration object.Provide access to Large Object streaming via Postgres specific API.registerCustomType
(Class<? extends org.postgresql.util.PGobject> clazz, String typeName) Register a Postgres custom type.void
setRegistry
(ConfigRegistry registry) The registry will inject itself into the configuration object.
-
Constructor Details
-
PostgresTypes
public PostgresTypes()
-
-
Method Details
-
setRegistry
Description copied from interface:JdbiConfig
The registry will inject itself into the configuration object. This can be useful if you need to look up dependencies. You will get a new registry after being copied.- Specified by:
setRegistry
in interfaceJdbiConfig<PostgresTypes>
- Parameters:
registry
- the registry that owns this configuration object
-
registerCustomType
public PostgresTypes registerCustomType(Class<? extends org.postgresql.util.PGobject> clazz, String typeName) Register a Postgres custom type.- Parameters:
clazz
- the class implementing the Java representation of the custom type; must extendPGobject
.typeName
- the Postgres custom type name
-
getLobApi
Provide access to Large Object streaming via Postgres specific API.- Returns:
- the postgres large object api
-
createCopy
Description copied from interface:JdbiConfig
Returns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
createCopy
in interfaceJdbiConfig<PostgresTypes>
- Returns:
- a copy of this configuration object.
-