public int getSqlType(String typeName) throws SQLException { boolean isCoreType = preloadedSqlTypes.contains(typeName); // obtain core types such as bool, int2 etc. from the driver, as it correctly maps these types to the JDBC // type codes. Also those values are cached in TypeInfoCache. if (isCoreType) { return typeInfo.getSQLType(typeName); } if (typeName.endsWith("[]")) { return Types.ARRAY; } // get custom type mappings from the map which was built up with a single query else { try { return sqlTypesByPgTypeNames.get(typeName); } catch(Exception e) { LOGGER.warn("Failed to obtain SQL type information for type {} via custom statement, falling back to TypeInfo#getSQLType()", typeName, e); return typeInfo.getSQLType(typeName); } } }
public int getParameterType(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getSQLType(_oids[param - 1]); }
public int getBaseType() throws SQLException { return connection.getTypeInfo().getSQLType(getBaseTypeName()); }
public int getBaseType() throws SQLException { return connection.getTypeInfo().getSQLType(getBaseTypeName()); }
protected int getSQLType( int column ) throws SQLException { return connection.getTypeInfo().getSQLType(fields[column - 1].getOID()); }
public int getParameterType(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getSQLType(_oids[param-1]); }
protected int getSQLType(int columnIndex) throws SQLException { return connection.getTypeInfo().getSQLType(getField(columnIndex).getOID()); }
protected int getSQLType(int columnIndex) throws SQLException { return connection.getTypeInfo().getSQLType(getField(columnIndex).getOID()); }
for (Iterator<String> i = connection.getTypeInfo().getPGTypeNamesWithSQLTypes(); i.hasNext(); ) { String pgType = i.next(); int sqlType = connection.getTypeInfo().getSQLType(pgType); sqlwhen.append(" when typname = ").append(escapeQuotes(pgType)).append(" then ").append(sqlType);
int sqlType = connection.getTypeInfo().getSQLType(pgType); sql += " when typname = " + escapeQuotes(pgType) + " then " + sqlType;
private void initSqlType(Field field) throws SQLException { if (field.isTypeInitialized()) { return; } TypeInfo typeInfo = connection.getTypeInfo(); int oid = field.getOID(); String pgType = typeInfo.getPGType(oid); int sqlType = typeInfo.getSQLType(pgType); field.setSQLType(sqlType); field.setPGType(pgType); }
.encodeString(Integer.toString(java.sql.DatabaseMetaData.procedureColumnReturn)); tuple[5] = connection .encodeString(Integer.toString(connection.getTypeInfo().getSQLType(returnType))); tuple[6] = connection.encodeString(connection.getTypeInfo().getPGType(returnType)); tuple[7] = null; connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(argOid))); tuple[6] = connection.encodeString(connection.getTypeInfo().getPGType(argOid)); tuple[7] = null; .encodeString(Integer.toString(java.sql.DatabaseMetaData.procedureColumnResult)); tuple[5] = connection .encodeString(Integer.toString(connection.getTypeInfo().getSQLType(columnTypeOid))); tuple[6] = connection.encodeString(connection.getTypeInfo().getPGType(columnTypeOid)); tuple[7] = null;
tuple[1] = rs.getBytes("attname"); tuple[2] = connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(typeOid))); tuple[3] = connection.encodeString(connection.getTypeInfo().getPGType(typeOid)); tuple[4] = connection.encodeString(Integer.toString(columnSize));
sqlType = Types.VARCHAR; } else { sqlType = connection.getTypeInfo().getSQLType(typeOid); tuple[21] = baseTypeOid == 0 ? null : connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(baseTypeOid))); // SOURCE_DATA_TYPE
tuple[1] = connection.encodeString("ctid"); tuple[2] = connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType("tid"))); tuple[3] = connection.encodeString("tid"); tuple[4] = null;
tuple[2] = connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType("tid"))); tuple[3] = connection.encodeString("tid"); tuple[4] = null;
sqlType = Types.DISTINCT; } else { sqlType = connection.getTypeInfo().getSQLType(typeOid); tuple[19] = null; // SCOPE_SCHEMA tuple[20] = null; // SCOPE_TABLE tuple[21] = baseTypeOid == 0 ? null : connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(baseTypeOid))); // SOURCE_DATA_TYPE
tuple[2] = connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(typeOid))); tuple[3] = connection.encodeString(connection.getTypeInfo().getPGType(typeOid)); tuple[4] = connection.encodeString(Integer.toString(columnSize));
int sqlType = connection.getTypeInfo().getSQLType(typname); tuple[1] = connection.encodeString(Integer.toString(sqlType));
tuple[1] = connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(typname))); tuple[2] = connection.encodeString(Integer.toString(connection.getTypeInfo().getMaximumPrecision(typeOid)));