Package com.sas.rio

# Class MVADualResultSet

java.lang.Object
com.sas.rio.MVAResultSet
com.sas.rio.MVADualResultSet

All Implemented Interfaces:
  `com.sas.sql.DualResultSet`, `AutoCloseable`, `ResultSet`, `Wrapper`

public class MVADualResultSet extends MVAResultSet implements ResultSet, com.sas.sql.DualResultSet
A dual result set provides simultaneous access to unformatted and server-side formatted data. This behavior is different from the standard `ResultSet`, in which the JDBC driver does the conversion when a String representation is requested on a non-Sting data type.

Note, a dual result set can only be created by direct access to a SAS data set; a dual result set can not be formed by a SQL SELECT query.

Calling `#getString` returns the server-side formatted value. All other getters, including `#getObject`, return the unformatted value.

The following example shows how to create a `MVADualResultSet` given an open `MVAStatement`:

       MVADualResultSet mvaResultSet = mvaStatement.createDualResultSet(
          "WORK", "TESTDS", null, null);
       String s = mvaResultSet.getString(1); // get server side formatted value
       double d = mvaResultSet.getDouble(1); // get field as double precision

Since:
  9.4

- ## Field Summary

  ### Fields inherited from class com.sas.rio.MVAResultSet

  `_concurrency, _type, _warnings, _wasNull, CHARACTER, DATE, DATETIME, initialFetchSize, INTEGER, m_columnCount, m_maxRows, m_rowCache, m_statement, MAX_FIELD_SIZE, MAYBE_INTEGER, NOSUBTYPE, NUMERIC, TIME`

  ### Fields inherited from interface java.sql.ResultSet

  `CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.sas.MissingValues`
  `getMissingValue(int columnIndex)`
  Retrieves the value of the designated column in the current row of this `MVADualResultSet` object as an official official SAS missing value.
  `String`
  `getString(int columnIndex)`
  Gets the value of a column in the current row as a Java String.
  `String`
  `getString(String columnLabel)`
  Gets the value of a column in the current row as a Java String.

  ### Methods inherited from class com.sas.rio.MVAResultSet

  `absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCache, getCharacterStream, getCharacterStream, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowCache, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertMultipleRows, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isWrapperFor, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, unwrap, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.sql.ResultSet

  `absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull`

  ### Methods inherited from interface java.sql.Wrapper

  `isWrapperFor, unwrap`

- ## Method Details

  - ### getMissingValue

    public com.sas.MissingValues getMissingValue(int columnIndex) throws SQLException
    Retrieves the value of the designated column in the current row of this `MVADualResultSet` object as an official official SAS missing value.

    This routine supports both numeric and character MissingValues.

    If the field is not a SAS missing value, then null is returned.

    Specified by:
      `getMissingValue` in interface `com.sas.sql.DualResultSet`
    Parameters:
      `columnIndex` - the first column is 1, the second is 2, ...
    Returns:
      the MissingValues representation of the field
    Throws:
      `SQLException`

  - ### getString

    public String getString(int columnIndex) throws SQLException
    Description copied from class: `MVAResultSet`
    Gets the value of a column in the current row as a Java String.
    Specified by:
      `getString` in interface `com.sas.sql.DualResultSet`
    Specified by:
      `getString` in interface `ResultSet`
    Overrides:
      `getString` in class `MVAResultSet`
    Parameters:
      `columnIndex` - The first column is 1, the second is 2, and so on.
    Returns:
      The column value. If the value is SQL NULL, the result is null.
    Throws:
      `SQLException` - This exception is thrown if the column value is not valid.

  - ### getString

    public String getString(String columnLabel) throws SQLException
    Description copied from class: `MVAResultSet`
    Gets the value of a column in the current row as a Java String.
    Specified by:
      `getString` in interface `com.sas.sql.DualResultSet`
    Specified by:
      `getString` in interface `ResultSet`
    Overrides:
      `getString` in class `MVAResultSet`
    Parameters:
      `columnLabel` - The name of the column that is returned by the ResultSetMetaData object.
    Returns:
      The column value. If the value is SQL NULL, then the result is NULL.
    Throws:
      `SQLException` - This exception is thrown if the column value is not valid.