| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final BaseConnection | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private @Nullable PreparedStatement | |
| private final Map | |
| private final ResourceLock | |
| private static final Logger | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private final Map | |
| private static final ConcurrentMap | TYPE_ALIASES
PG maps several alias to real type names. |
| private static final Object[][] | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCoreType(String pgTypeName, Integer oid, Integer sqlType, String javaClass, Integer arrayOid)
Implements org.
|
| public void | addDataType(String type, Class<? extends PGobject> klass)
Implements org.
|
| public void | |
| protected int | Returns: oid of the array's base element or the provided oid (if not array)input oid oid)Return the oid of the array's base element if it's an array, if not return the provided oid. |
| public char | getArrayDelimiter(int
the array type's OID oid)Implements org. Determine the delimiter for the elements of the given array type oid. |
| public int | |
| public int | |
| public String | |
| public int | |
| private PreparedStatement | |
| public int | getPGArrayElement(int
the array type's OID oid)Implements org. Look up the oid of an array's base type given the array's type oid. |
| public int | getPGArrayType(@Nullable String
the base type's elementTypeName)Implements org. Determine the oid of the given base postgresql type's array type. |
| public @Nullable Class | |
| public int | getPGType(String
the server type name to look up pgTypeName)Implements org. Look up the oid for a given postgresql type name. |
| public @Nullable String | getPGType(int
the type's OID oid)Implements org. Look up the postgresql type name for a given oid. |
| public Iterator | |
| public Iterator | |
| public int | |
| public int | |
| public int | getSQLType(String
the server type name to look up pgTypeName)Implements org. Look up the SQL typecode for a given postgresql type name. |
| public int | getSQLType(int
the type's OID typeOid)Implements org. Look up the SQL typecode for a given type oid. |
| private int | |
| private String | |
| public @Nullable String | |
| public long | intOidToLong(int
the (signed) integer oid to convert into a long. oid)Implements org. Java Integers are signed 32-bit integers, but oids are unsigned 32-bit integers. |
| public boolean | |
| public boolean | |
| public int | longOidToInt(long
the oid as a long. oid)Implements org. Java Integers are signed 32-bit integers, but oids are unsigned 32-bit integers. |
| private PreparedStatement | |
| private PreparedStatement | |
| private PreparedStatement | |
| private PreparedStatement | |
| private PreparedStatement | |
| public boolean | |
| public boolean | Returns: true if the type requires quotingsql type as in java.sql.Types sqlType)Implements org. Returns true if particular sqlType requires quoting. |
| arrayOidToDelimiter | back to summary |
|---|---|
| private final Map<Integer, Character> arrayOidToDelimiter | |
| conn | back to summary |
|---|---|
| private final BaseConnection conn | |
| getAllTypeInfoStatement | back to summary |
|---|---|
| private @Nullable PreparedStatement getAllTypeInfoStatement | |
| getArrayDelimiterStatement | back to summary |
|---|---|
| private @Nullable PreparedStatement getArrayDelimiterStatement | |
| getArrayElementOidStatement | back to summary |
|---|---|
| private @Nullable PreparedStatement getArrayElementOidStatement | |
| getNameStatement | back to summary |
|---|---|
| private @Nullable PreparedStatement getNameStatement | |
| getOidStatementComplexArray | back to summary |
|---|---|
| private @Nullable PreparedStatement getOidStatementComplexArray | |
| getOidStatementComplexNonArray | back to summary |
|---|---|
| private @Nullable PreparedStatement getOidStatementComplexNonArray | |
| getOidStatementSimple | back to summary |
|---|---|
| private @Nullable PreparedStatement getOidStatementSimple | |
| getTypeInfoStatement | back to summary |
|---|---|
| private @Nullable PreparedStatement getTypeInfoStatement | |
| javaArrayTypeToOid | back to summary |
|---|---|
| private final Map<String, Integer> javaArrayTypeToOid | |
| lock | back to summary |
|---|---|
| private final ResourceLock lock | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| oidToPgName | back to summary |
|---|---|
| private final Map<Integer, String> oidToPgName | |
| oidToSQLType | back to summary |
|---|---|
| private final Map<Integer, Integer> oidToSQLType | |
| pgArrayToPgType | back to summary |
|---|---|
| private final Map<Integer, Integer> pgArrayToPgType | |
| pgNameToJavaClass | back to summary |
|---|---|
| private final Map<String, String> pgNameToJavaClass | |
| pgNameToOid | back to summary |
|---|---|
| private final Map<String, Integer> pgNameToOid | |
| pgNameToPgObject | back to summary |
|---|---|
| private final Map<String, Class<? extends PGobject>> pgNameToPgObject | |
| pgNameToSQLType | back to summary |
|---|---|
| private final Map<String, Integer> pgNameToSQLType | |
| TYPE_ALIASES | back to summary |
|---|---|
| private static final ConcurrentMap<String, String> TYPE_ALIASES PG maps several alias to real type names. When we do queries against pg_catalog, we must use the real type, not an alias, so use this mapping. Additional values used at runtime (including case variants) will be added to the map. | |
| types | back to summary |
|---|---|
| private static final Object[][] types | |
| unknownLength | back to summary |
|---|---|
| private final int unknownLength | |
| TypeInfoCache | back to summary |
|---|---|
public TypeInfoCache(BaseConnection conn, int unknownLength)
| |
| addCoreType | back to summary |
|---|---|
| public void addCoreType(String pgTypeName, Integer oid, Integer sqlType, String javaClass, Integer arrayOid) Implements org.
| |
| addDataType | back to summary |
|---|---|
| public void addDataType(String type, Class<? extends PGobject> klass) throws SQLException Implements org.
| |
| cacheSQLTypes | back to summary |
|---|---|
| public void cacheSQLTypes() throws SQLException | |
| convertArrayToBaseOid | back to summary |
|---|---|
| protected int convertArrayToBaseOid(int oid) Return the oid of the array's base element if it's an array, if not return the provided oid. This doesn't do any database lookups, so it's only useful for the originally provided type mappings. This is fine for it's intended uses where we only have intimate knowledge of types that are already known to the driver.
| |
| getArrayDelimiter | back to summary |
|---|---|
| public char getArrayDelimiter(int oid) throws SQLException Implements org. Doc from org. Determine the delimiter for the elements of the given array type oid.
| |
| getDisplaySize | back to summary |
|---|---|
| public int getDisplaySize(int oid, int typmod) Implements org.
| |
| getJavaArrayType | back to summary |
|---|---|
| public int getJavaArrayType(String className) throws SQLException Implements org.
| |
| getJavaClass | back to summary |
|---|---|
| public String getJavaClass(int oid) throws SQLException Implements org.
| |
| getMaximumPrecision | back to summary |
|---|---|
| public int getMaximumPrecision(int oid) Implements org.
| |
| getOidStatement | back to summary |
|---|---|
| private PreparedStatement getOidStatement(String pgTypeName) throws SQLException | |
| getPGArrayElement | back to summary |
|---|---|
| public int getPGArrayElement(int oid) throws SQLException Implements org. Doc from org. Look up the oid of an array's base type given the array's type oid.
| |
| getPGArrayType | back to summary |
|---|---|
| public int getPGArrayType(@Nullable String elementTypeName) throws SQLException Implements org. Doc from org. Determine the oid of the given base postgresql type's array type.
| |
| getPGobject | back to summary |
|---|---|
| public @Nullable Class Implements org.
| |
| getPGType | back to summary |
|---|---|
| public int getPGType(String pgTypeName) throws SQLException Implements org. Doc from org. Look up the oid for a given postgresql type name. This is the inverse of
| |
| getPGType | back to summary |
|---|---|
| public @Nullable String getPGType(int oid) throws SQLException Implements org. Doc from org. Look up the postgresql type name for a given oid. This is the inverse of
| |
| getPGTypeNamesWithSQLTypes | back to summary |
|---|---|
| public Iterator Implements org.
| |
| getPGTypeOidsWithSQLTypes | back to summary |
|---|---|
| public Iterator Implements org.
| |
| getPrecision | back to summary |
|---|---|
| public int getPrecision(int oid, int typmod) Implements org.
| |
| getScale | back to summary |
|---|---|
| public int getScale(int oid, int typmod) Implements org.
| |
| getSQLType | back to summary |
|---|---|
| public int getSQLType(String pgTypeName) throws SQLException Implements org. Doc from org. Look up the SQL typecode for a given postgresql type name.
| |
| getSQLType | back to summary |
|---|---|
| public int getSQLType(int typeOid) throws SQLException Implements org. Doc from org. Look up the SQL typecode for a given type oid.
| |
| getSQLTypeFromQueryResult | back to summary |
|---|---|
| private int getSQLTypeFromQueryResult(ResultSet rs) throws SQLException | |
| getSQLTypeQuery | back to summary |
|---|---|
| private String getSQLTypeQuery(boolean typoidParam) | |
| getTypeForAlias | back to summary |
|---|---|
| public @Nullable String getTypeForAlias(@Nullable String alias) Implements org.
| |
| intOidToLong | back to summary |
|---|---|
| public long intOidToLong(int oid) Implements org. Doc from org. Java Integers are signed 32-bit integers, but oids are unsigned 32-bit integers. We must therefore first map the (internal) integer representation to a positive long value before sending it to postgresql, or we would be unable to correctly handle the upper half of the oid space because these negative values are disallowed as OID values.
| |
| isCaseSensitive | back to summary |
|---|---|
| public boolean isCaseSensitive(int oid) Implements org.
| |
| isSigned | back to summary |
|---|---|
| public boolean isSigned(int oid) Implements org.
| |
| longOidToInt | back to summary |
|---|---|
| public int longOidToInt(long oid) throws SQLException Implements org. Doc from org. Java Integers are signed 32-bit integers, but oids are unsigned 32-bit integers. We therefore read them as positive long values and then force them into signed integers (wrapping around into negative values when required) or we'd be unable to correctly handle the upper half of the oid space. This function handles the mapping of uint32-values in the long to java integers, and throws for values that are out of range.
| |
| prepareGetAllTypeInfoStatement | back to summary |
|---|---|
| private PreparedStatement prepareGetAllTypeInfoStatement() throws SQLException | |
| prepareGetArrayDelimiterStatement | back to summary |
|---|---|
| private PreparedStatement prepareGetArrayDelimiterStatement() throws SQLException | |
| prepareGetArrayElementOidStatement | back to summary |
|---|---|
| private PreparedStatement prepareGetArrayElementOidStatement() throws SQLException | |
| prepareGetNameStatement | back to summary |
|---|---|
| private PreparedStatement prepareGetNameStatement() throws SQLException | |
| prepareGetTypeInfoStatement | back to summary |
|---|---|
| private PreparedStatement prepareGetTypeInfoStatement() throws SQLException | |
| requiresQuoting | back to summary |
|---|---|
| public boolean requiresQuoting(int oid) throws SQLException Implements org.
| |
| requiresQuotingSqlType | back to summary |
|---|---|
| public boolean requiresQuotingSqlType(int sqlType) throws SQLException Implements org. Returns true if particular sqlType requires quoting. This method is used internally by the driver, so it might disappear without notice.
| |