private static class PostgresConnection.SqlTypeMapper extends Object
PgDatabaseMetaData.getTypeInfo() as the latter causes N+1 SELECTs, making it very slow on installations
with many custom types.DBZ-899| Modifier and Type | Field and Description |
|---|---|
private Set<String> |
preloadedSqlTypes |
private static String |
SQL_TYPE_DETAILS
Based on org.postgresql.jdbc.TypeInfoCache.getSQLType(String).
|
private Map<String,Integer> |
sqlTypesByPgTypeNames |
private org.postgresql.core.TypeInfo |
typeInfo |
| Modifier | Constructor and Description |
|---|---|
private |
SqlTypeMapper(Connection db,
org.postgresql.core.TypeInfo typeInfo) |
| Modifier and Type | Method and Description |
|---|---|
int |
getSqlType(String typeName) |
private static Map<String,Integer> |
getSqlTypes(Connection db,
org.postgresql.core.TypeInfo typeInfo)
Builds up a map of SQL (JDBC) types by PG type name; contains only values for non-core types.
|
private static final String SQL_TYPE_DETAILS
private final org.postgresql.core.TypeInfo typeInfo
private SqlTypeMapper(Connection db, org.postgresql.core.TypeInfo typeInfo) throws SQLException
SQLExceptionpublic int getSqlType(String typeName) throws SQLException
SQLExceptionprivate static Map<String,Integer> getSqlTypes(Connection db, org.postgresql.core.TypeInfo typeInfo) throws SQLException
SQLExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.