public String getBaseTypeName() throws SQLException { buildArrayList(); int elementOID = connection.getTypeInfo().getPGArrayElement(oid); return connection.getTypeInfo().getPGType(elementOID); }
public String getBaseTypeName() throws SQLException { buildArrayList(); int elementOID = connection.getTypeInfo().getPGArrayElement(oid); return connection.getTypeInfo().getPGType(elementOID); }
/** * {@inheritDoc} PostgreSQL doesn't have unsigned numbers */ public boolean isSigned(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().isSigned(_oids[param - 1]); }
public String getParameterClassName(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getJavaClass(_oids[param - 1]); }
public String getParameterTypeName(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getPGType(_oids[param - 1]); }
public int getParameterType(int param) throws SQLException { checkParamIndex(param); return _connection.getTypeInfo().getSQLType(_oids[param - 1]); }
public boolean isSigned(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().isSigned(field.getOID()); }
public boolean isCaseSensitive(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().isCaseSensitive(field.getOID()); }
public void setNull(int parameterIndex, int t, String typeName) throws SQLException { if (typeName == null) { setNull(parameterIndex, t); return; } checkClosed(); TypeInfo typeInfo = connection.getTypeInfo(); int oid = typeInfo.getPGType(typeName); preparedParameters.setNull(parameterIndex, oid); }
public int getScale(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getScale(field.getOID(), field.getMod()); }
public int getScale(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getScale(field.getOID(), field.getMod()); }
public int getColumnDisplaySize(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getDisplaySize(field.getOID(), field.getMod()); }
public int getPrecision(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getPrecision(field.getOID(), field.getMod()); }
public int getColumnDisplaySize(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getDisplaySize(field.getOID(), field.getMod()); }
public int getPrecision(int column) throws SQLException { Field field = getField(column); return connection.getTypeInfo().getPrecision(field.getOID(), field.getMod()); }
public synchronized void updateNull(int columnIndex) throws SQLException { checkColumnIndex(columnIndex); String columnTypeName = connection.getTypeInfo().getPGType(fields[columnIndex - 1].getOID()); updateValue(columnIndex, new NullObject(columnTypeName)); }
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); }
private void setPGobject(int parameterIndex, PGobject x) throws SQLException { String typename = x.getType(); int oid = connection.getTypeInfo().getPGType(typename); if (oid == Oid.UNSPECIFIED) throw new PSQLException(GT.tr("Unknown type {0}.", typename), PSQLState.INVALID_PARAMETER_TYPE); setString(parameterIndex, x.getValue(), oid); }
private <A> void setPrimitiveArray(int parameterIndex, A in) throws SQLException { final PrimitiveArraySupport<A> arrayToString = PrimitiveArraySupport.getArraySupport(in); final TypeInfo typeInfo = connection.getTypeInfo(); final int oid = arrayToString.getDefaultArrayTypeOid(typeInfo); if (arrayToString.supportBinaryRepresentation() && connection.getPreferQueryMode() != PreferQueryMode.SIMPLE) { bindBytes(parameterIndex, arrayToString.toBinaryRepresentation(connection, in), oid); } else { final char delim = typeInfo.getArrayDelimiter(oid); setString(parameterIndex, arrayToString.toArrayString(delim, in), oid); } }
private void setMap(int parameterIndex, Map<?, ?> x) throws SQLException { int oid = connection.getTypeInfo().getPGType("hstore"); if (oid == Oid.UNSPECIFIED) { throw new PSQLException(GT.tr("No hstore extension installed."), PSQLState.INVALID_PARAMETER_TYPE); } if (connection.binaryTransferSend(oid)) { byte[] data = HStoreConverter.toBytes(x, connection.getEncoding()); bindBytes(parameterIndex, data, oid); } else { setString(parameterIndex, HStoreConverter.toString(x), oid); } }