Class PostgresTypes

java.lang.Object
org.jdbi.v3.postgres.PostgresTypes
All Implemented Interfaces:
JdbiConfig<PostgresTypes>

public class PostgresTypes extends Object implements JdbiConfig<PostgresTypes>
Handler for PostgreSQL custom types.
  • Constructor Details

    • PostgresTypes

      public PostgresTypes()
  • Method Details

    • setRegistry

      public void setRegistry(ConfigRegistry registry)
      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 interface JdbiConfig<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 extend PGobject.
      typeName - the Postgres custom type name
    • getLobApi

      public PgLobApi getLobApi()
      Provide access to Large Object streaming via Postgres specific API.
      Returns:
      the postgres large object api
    • createCopy

      public PostgresTypes 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 interface JdbiConfig<PostgresTypes>
      Returns:
      a copy of this configuration object.