Class PostgresTypes

    • Field Detail

      • types

        private final java.util.Map<java.lang.Class<? extends org.postgresql.util.PGobject>,​java.lang.String> types
    • Constructor Detail

      • PostgresTypes

        public PostgresTypes()
    • Method Detail

      • 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​(java.lang.Class<? extends org.postgresql.util.PGobject> clazz,
                                                java.lang.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
      • 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

        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.