Class ByteArrayRow
java.lang.Object
com.mysql.jdbc.ResultSetRow
com.mysql.jdbc.ByteArrayRow
A RowHolder implementation that is for cached results (a-la mysql_store_result()).
-
Field Summary
FieldsFields inherited from class ResultSetRow
exceptionInterceptor, metadata -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayRow(byte[][] internalRowData, ExceptionInterceptor exceptionInterceptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled during navigation to next row to close all open streams.getBinaryInputStream(int columnIndex) Returns data at the given index as an InputStream with no character conversion.intbyte[]getColumnValue(int index) Returns the value at the given column (index starts at 0) "raw" (i.e. as-returned by the server).getDateFast(int columnIndex, MySQLConnection conn, ResultSetImpl rs, Calendar targetCalendar) intgetInt(int columnIndex) Returns the value at the given column (index starts at 0) as an intlonggetLong(int columnIndex) Returns the value at the given column (index starts at 0) as a longgetNativeDate(int columnIndex, MySQLConnection conn, ResultSetImpl rs, Calendar cal) getNativeDateTimeValue(int columnIndex, Calendar targetCalendar, int jdbcType, int mysqlType, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) doublegetNativeDouble(int columnIndex) floatgetNativeFloat(int columnIndex) intgetNativeInt(int columnIndex) longgetNativeLong(int columnIndex) shortgetNativeShort(int columnIndex) getNativeTime(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) getNativeTimestamp(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) getReader(int columnIndex) getString(int index, String encoding, MySQLConnection conn) Returns the value at the given column (index starts at 0) as a java.lang.String with the requested encoding, using the given MySQLConnection to find character converters.getTimeFast(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) getTimestampFast(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs, boolean useGmtMillis, boolean useJDBCCompliantTimezoneShift) booleanisFloatingPointNumber(int index) Could the column value at the given index (which starts at 0) be interpreted as a floating-point number (has +/-/E/e in it)?booleanisNull(int index) Is the column value at the given index (which starts at 0) NULL?longlength(int index) Returns the length of the column at the given index (which starts at 0).voidsetColumnValue(int index, byte[] value) Sets the given column value (only works currently with ByteArrayRowHolder).Methods inherited from class ResultSetRow
getDateFast, getNativeDate, getNativeDateTimeValue, getNativeDouble, getNativeFloat, getNativeInt, getNativeLong, getNativeShort, getNativeTime, getNativeTimestamp, getString, getTimeFast, getTimestampFast, setMetadata
-
Field Details
-
internalRowData
byte[][] internalRowData
-
-
Constructor Details
-
ByteArrayRow
-
-
Method Details
-
getColumnValue
Description copied from class:ResultSetRowReturns the value at the given column (index starts at 0) "raw" (i.e. as-returned by the server).- Specified by:
getColumnValuein classResultSetRow- Parameters:
index- of the column value (starting at 0) to return.- Returns:
- the value for the given column (including NULL if it is)
- Throws:
SQLException- if an error occurs while retrieving the value.
-
setColumnValue
Description copied from class:ResultSetRowSets the given column value (only works currently with ByteArrayRowHolder).- Specified by:
setColumnValuein classResultSetRow- Parameters:
index- index of the column value (starting at 0) to set.value- the (raw) value to set- Throws:
SQLException- if an error occurs, or the concrete RowHolder doesn't support this operation.
-
getString
Description copied from class:ResultSetRowReturns the value at the given column (index starts at 0) as a java.lang.String with the requested encoding, using the given MySQLConnection to find character converters.- Specified by:
getStringin classResultSetRow- Parameters:
index- of the column value (starting at 0) to return.encoding- the Java name for the character encodingconn- the connection that created this result set row- Returns:
- the value for the given column (including NULL if it is) as a String
- Throws:
SQLException- if an error occurs while retrieving the value.
-
isNull
Description copied from class:ResultSetRowIs the column value at the given index (which starts at 0) NULL?- Specified by:
isNullin classResultSetRow- Parameters:
index- of the column value (starting at 0) to check.- Returns:
- true if the column value is NULL, false if not.
- Throws:
SQLException- if an error occurs
-
isFloatingPointNumber
Description copied from class:ResultSetRowCould the column value at the given index (which starts at 0) be interpreted as a floating-point number (has +/-/E/e in it)?- Specified by:
isFloatingPointNumberin classResultSetRow- Parameters:
index- of the column value (starting at 0) to check.- Returns:
- true if the column value at the given index looks like it might be a floating-point number, false if not.
- Throws:
SQLException- if an error occurs
-
length
Description copied from class:ResultSetRowReturns the length of the column at the given index (which starts at 0).- Specified by:
lengthin classResultSetRow- Parameters:
index- of the column value (starting at 0) for which to return the length.- Returns:
- the length of the requested column, 0 if null (clients of this interface should use isNull() beforehand to determine status of NULL values in the column).
- Throws:
SQLException
-
getInt
public int getInt(int columnIndex) Description copied from class:ResultSetRowReturns the value at the given column (index starts at 0) as an int. *- Specified by:
getIntin classResultSetRow- Returns:
- the value for the given column (returns 0 if NULL, use isNull() to determine if the value was actually NULL)
-
getLong
public long getLong(int columnIndex) Description copied from class:ResultSetRowReturns the value at the given column (index starts at 0) as a long. *- Specified by:
getLongin classResultSetRow- Returns:
- the value for the given column (returns 0 if NULL, use isNull() to determine if the value was actually NULL)
-
getTimestampFast
public Timestamp getTimestampFast(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs, boolean useGmtMillis, boolean useJDBCCompliantTimezoneShift) throws SQLException - Specified by:
getTimestampFastin classResultSetRow- Throws:
SQLException
-
getNativeDouble
- Specified by:
getNativeDoublein classResultSetRow- Throws:
SQLException
-
getNativeFloat
- Specified by:
getNativeFloatin classResultSetRow- Throws:
SQLException
-
getNativeInt
- Specified by:
getNativeIntin classResultSetRow- Throws:
SQLException
-
getNativeLong
- Specified by:
getNativeLongin classResultSetRow- Throws:
SQLException
-
getNativeShort
- Specified by:
getNativeShortin classResultSetRow- Throws:
SQLException
-
getNativeTimestamp
public Timestamp getNativeTimestamp(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) throws SQLException - Specified by:
getNativeTimestampin classResultSetRow- Throws:
SQLException
-
closeOpenStreams
public void closeOpenStreams()Description copied from class:ResultSetRowCalled during navigation to next row to close all open streams.- Specified by:
closeOpenStreamsin classResultSetRow
-
getBinaryInputStream
Description copied from class:ResultSetRowReturns data at the given index as an InputStream with no character conversion.- Specified by:
getBinaryInputStreamin classResultSetRow- Parameters:
columnIndex- of the column value (starting at 0) to return.- Returns:
- the value at the given index as an InputStream or null if null.
- Throws:
SQLException- if an error occurs while retrieving the value.
-
getReader
- Specified by:
getReaderin classResultSetRow- Throws:
SQLException
-
getTimeFast
public Time getTimeFast(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) throws SQLException - Specified by:
getTimeFastin classResultSetRow- Throws:
SQLException
-
getDateFast
public Date getDateFast(int columnIndex, MySQLConnection conn, ResultSetImpl rs, Calendar targetCalendar) throws SQLException - Specified by:
getDateFastin classResultSetRow- Throws:
SQLException
-
getNativeDateTimeValue
public Object getNativeDateTimeValue(int columnIndex, Calendar targetCalendar, int jdbcType, int mysqlType, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) throws SQLException - Specified by:
getNativeDateTimeValuein classResultSetRow- Throws:
SQLException
-
getNativeDate
public Date getNativeDate(int columnIndex, MySQLConnection conn, ResultSetImpl rs, Calendar cal) throws SQLException - Specified by:
getNativeDatein classResultSetRow- Throws:
SQLException
-
getNativeTime
public Time getNativeTime(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward, MySQLConnection conn, ResultSetImpl rs) throws SQLException - Specified by:
getNativeTimein classResultSetRow- Throws:
SQLException
-
getBytesSize
public int getBytesSize()- Specified by:
getBytesSizein classResultSetRow
-