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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddTypesToConnection(org.postgresql.PGConnection connection) Add handler for each registered PostgreSQL custom typeReturns 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.(package private) PostgresTypesvoidsetRegistry(ConfigRegistry registry) The registry will inject itself into the configuration object.
-
Field Details
-
types
-
registry
-
lob
-
-
Constructor Details
-
PostgresTypes
public PostgresTypes() -
PostgresTypes
-
-
Method Details
-
setRegistry
Description copied from interface:JdbiConfigThe 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:
setRegistryin 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
-
setLobApi
-
getLobApi
Provide access to Large Object streaming via Postgres specific API.- Returns:
- the postgres large object api
-
addTypesToConnection
void addTypesToConnection(org.postgresql.PGConnection connection) Add handler for each registered PostgreSQL custom type- Parameters:
connection- connection on which to add all registered PostgreSQL custom types
-
createCopy
Description copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
createCopyin interfaceJdbiConfig<PostgresTypes>- Returns:
- a copy of this configuration object.
-