public java.io.Reader getCharacterStream(int i) throws SQLException { checkResultSet( i ); if (wasNullFlag) return null; if (((AbstractJdbc2Connection) connection).haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports AsciiStream for all the PG text types //As the spec/javadoc for this method indicate this is to be used for //large text values (i.e. LONGVARCHAR) PG doesn't have a separate //long string datatype, but with toast the text datatype is capable of //handling very large values. Thus the implementation ends up calling //getString() since there is no current way to stream the value from the server return new CharArrayReader(getString(i).toCharArray()); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream Encoding encoding = connection.getEncoding(); InputStream input = getBinaryStream(i); try { return encoding.getDecodingReader(input); } catch (IOException ioe) { throw new PSQLException(GT.tr("Unexpected error while decoding character data from a large object."), PSQLState.UNEXPECTED_ERROR, ioe); } } }
PSQLState.INVALID_PARAMETER_VALUE); } else { bindStringAsVarchar = haveMinimumCompatibleVersion("8.0");
if (connection.haveMinimumCompatibleVersion("8.3")) { allArgTypes = (Long[])allArgTypesArray.getArray(); } else {
public java.io.Reader getCharacterStream(int i) throws SQLException { checkResultSet( i ); if (wasNullFlag) return null; if (((AbstractJdbc2Connection) connection).haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports AsciiStream for all the PG text types //As the spec/javadoc for this method indicate this is to be used for //large text values (i.e. LONGVARCHAR) PG doesn't have a separate //long string datatype, but with toast the text datatype is capable of //handling very large values. Thus the implementation ends up calling //getString() since there is no current way to stream the value from the server return new CharArrayReader(getString(i).toCharArray()); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream Encoding encoding = connection.getEncoding(); InputStream input = getBinaryStream(i); try { return encoding.getDecodingReader(input); } catch (IOException ioe) { throw new PSQLException(GT.tr("Unexpected error while decoding character data from a large object."), PSQLState.UNEXPECTED_ERROR, ioe); } } }
public java.io.Reader getCharacterStream(int i) throws SQLException { checkResultSet( i ); if (wasNullFlag) return null; if (((AbstractJdbc2Connection) connection).haveMinimumCompatibleVersion("7.2")) { //Version 7.2 supports AsciiStream for all the PG text types //As the spec/javadoc for this method indicate this is to be used for //large text values (i.e. LONGVARCHAR) PG doesn't have a separate //long string datatype, but with toast the text datatype is capable of //handling very large values. Thus the implementation ends up calling //getString() since there is no current way to stream the value from the server return new CharArrayReader(getString(i).toCharArray()); } else { // In 7.1 Handle as BLOBS so return the LargeObject input stream Encoding encoding = connection.getEncoding(); InputStream input = getBinaryStream(i); try { return encoding.getDecodingReader(input); } catch (IOException ioe) { throw new PSQLException(GT.tr("Unexpected error while decoding character data from a large object."), PSQLState.UNEXPECTED_ERROR, ioe); } } }
if (connection.haveMinimumCompatibleVersion("8.3")) { allArgTypes = (Long[])allArgTypesArray.getArray(); } else {
PSQLState.INVALID_PARAMETER_VALUE); } else { bindStringAsVarchar = haveMinimumCompatibleVersion("8.0");
if (connection.haveMinimumCompatibleVersion("8.3")) { allArgTypes = (Long[])allArgTypesArray.getArray(); } else {
PSQLState.INVALID_PARAMETER_VALUE); } else { bindStringAsVarchar = haveMinimumCompatibleVersion("8.0");