|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.ResultSetRow
public abstract class ResultSetRow
Classes that implement this interface represent one row of data from the MySQL server that might be stored in different ways depending on whether the result set was streaming (so they wrap a reusable packet), or whether the result set was cached or via a server-side cursor (so they represent a byte[][]). Notice that no bounds checking is expected for implementors of this interface, it happens in ResultSetImpl.
Field Summary | |
---|---|
protected ExceptionInterceptor |
exceptionInterceptor
|
protected Field[] |
metadata
The metadata of the fields of this result set. |
Constructor Summary | |
---|---|
protected |
ResultSetRow(ExceptionInterceptor exceptionInterceptor)
|
Method Summary | |
---|---|
abstract void |
closeOpenStreams()
Called during navigation to next row to close all open streams. |
abstract java.io.InputStream |
getBinaryInputStream(int columnIndex)
Returns data at the given index as an InputStream with no character conversion. |
abstract int |
getBytesSize()
|
abstract byte[] |
getColumnValue(int index)
Returns the value at the given column (index starts at 0) "raw" (i.e. |
protected java.sql.Date |
getDateFast(int columnIndex,
byte[] dateAsBytes,
int offset,
int length,
ConnectionImpl conn,
ResultSetImpl rs,
java.util.Calendar targetCalendar)
|
abstract java.sql.Date |
getDateFast(int columnIndex,
ConnectionImpl conn,
ResultSetImpl rs,
java.util.Calendar targetCalendar)
|
abstract int |
getInt(int columnIndex)
Returns the value at the given column (index starts at 0) as an int |
abstract long |
getLong(int columnIndex)
Returns the value at the given column (index starts at 0) as a long |
protected java.sql.Date |
getNativeDate(int columnIndex,
byte[] bits,
int offset,
int length,
ConnectionImpl conn,
ResultSetImpl rs,
java.util.Calendar cal)
|
abstract java.sql.Date |
getNativeDate(int columnIndex,
ConnectionImpl conn,
ResultSetImpl rs,
java.util.Calendar cal)
|
protected java.lang.Object |
getNativeDateTimeValue(int columnIndex,
byte[] bits,
int offset,
int length,
java.util.Calendar targetCalendar,
int jdbcType,
int mysqlType,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.lang.Object |
getNativeDateTimeValue(int columnIndex,
java.util.Calendar targetCalendar,
int jdbcType,
int mysqlType,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
protected double |
getNativeDouble(byte[] bits,
int offset)
|
abstract double |
getNativeDouble(int columnIndex)
|
protected float |
getNativeFloat(byte[] bits,
int offset)
|
abstract float |
getNativeFloat(int columnIndex)
|
protected int |
getNativeInt(byte[] bits,
int offset)
|
abstract int |
getNativeInt(int columnIndex)
|
protected long |
getNativeLong(byte[] bits,
int offset)
|
abstract long |
getNativeLong(int columnIndex)
|
protected short |
getNativeShort(byte[] bits,
int offset)
|
abstract short |
getNativeShort(int columnIndex)
|
protected java.sql.Time |
getNativeTime(int columnIndex,
byte[] bits,
int offset,
int length,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.sql.Time |
getNativeTime(int columnIndex,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
protected java.sql.Timestamp |
getNativeTimestamp(byte[] bits,
int offset,
int length,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.sql.Timestamp |
getNativeTimestamp(int columnIndex,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.io.Reader |
getReader(int columnIndex)
|
abstract java.lang.String |
getString(int index,
java.lang.String encoding,
ConnectionImpl conn)
Returns the value at the given column (index starts at 0) as a java.lang.String with the requested encoding, using the given ConnectionImpl to find character converters. |
protected java.lang.String |
getString(java.lang.String encoding,
ConnectionImpl conn,
byte[] value,
int offset,
int length)
Convenience method for turning a byte[] into a string with the given encoding. |
protected java.sql.Time |
getTimeFast(int columnIndex,
byte[] timeAsBytes,
int offset,
int length,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.sql.Time |
getTimeFast(int columnIndex,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
protected java.sql.Timestamp |
getTimestampFast(int columnIndex,
byte[] timestampAsBytes,
int offset,
int length,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract java.sql.Timestamp |
getTimestampFast(int columnIndex,
java.util.Calendar targetCalendar,
java.util.TimeZone tz,
boolean rollForward,
ConnectionImpl conn,
ResultSetImpl rs)
|
abstract boolean |
isFloatingPointNumber(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)? |
abstract boolean |
isNull(int index)
Is the column value at the given index (which starts at 0) NULL? |
abstract long |
length(int index)
Returns the length of the column at the given index (which starts at 0). |
abstract void |
setColumnValue(int index,
byte[] value)
Sets the given column value (only works currently with ByteArrayRowHolder). |
ResultSetRow |
setMetadata(Field[] f)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ExceptionInterceptor exceptionInterceptor
protected Field[] metadata
Constructor Detail |
---|
protected ResultSetRow(ExceptionInterceptor exceptionInterceptor)
Method Detail |
---|
public abstract void closeOpenStreams()
public abstract java.io.InputStream getBinaryInputStream(int columnIndex) throws java.sql.SQLException
columnIndex
- of the column value (starting at 0) to return.
java.sql.SQLException
- if an error occurs while retrieving the value.public abstract byte[] getColumnValue(int index) throws java.sql.SQLException
index
- of the column value (starting at 0) to return.
java.sql.SQLException
- if an error occurs while retrieving the value.protected final java.sql.Date getDateFast(int columnIndex, byte[] dateAsBytes, int offset, int length, ConnectionImpl conn, ResultSetImpl rs, java.util.Calendar targetCalendar) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Date getDateFast(int columnIndex, ConnectionImpl conn, ResultSetImpl rs, java.util.Calendar targetCalendar) throws java.sql.SQLException
java.sql.SQLException
public abstract int getInt(int columnIndex) throws java.sql.SQLException
index
- of the column value (starting at 0) to return.
java.sql.SQLException
- if an error occurs while retrieving the value.public abstract long getLong(int columnIndex) throws java.sql.SQLException
index
- of the column value (starting at 0) to return.
java.sql.SQLException
- if an error occurs while retrieving the value.protected java.sql.Date getNativeDate(int columnIndex, byte[] bits, int offset, int length, ConnectionImpl conn, ResultSetImpl rs, java.util.Calendar cal) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Date getNativeDate(int columnIndex, ConnectionImpl conn, ResultSetImpl rs, java.util.Calendar cal) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Object getNativeDateTimeValue(int columnIndex, byte[] bits, int offset, int length, java.util.Calendar targetCalendar, int jdbcType, int mysqlType, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.lang.Object getNativeDateTimeValue(int columnIndex, java.util.Calendar targetCalendar, int jdbcType, int mysqlType, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
protected double getNativeDouble(byte[] bits, int offset)
public abstract double getNativeDouble(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
protected float getNativeFloat(byte[] bits, int offset)
public abstract float getNativeFloat(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
protected int getNativeInt(byte[] bits, int offset)
public abstract int getNativeInt(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
protected long getNativeLong(byte[] bits, int offset)
public abstract long getNativeLong(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
protected short getNativeShort(byte[] bits, int offset)
public abstract short getNativeShort(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Time getNativeTime(int columnIndex, byte[] bits, int offset, int length, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Time getNativeTime(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Timestamp getNativeTimestamp(byte[] bits, int offset, int length, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Timestamp getNativeTimestamp(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.io.Reader getReader(int columnIndex) throws java.sql.SQLException
java.sql.SQLException
public abstract java.lang.String getString(int index, java.lang.String encoding, ConnectionImpl conn) throws java.sql.SQLException
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
java.sql.SQLException
- if an error occurs while retrieving the value.protected java.lang.String getString(java.lang.String encoding, ConnectionImpl conn, byte[] value, int offset, int length) throws java.sql.SQLException
encoding
- the Java encoding name for the byte[] -> char conversionconn
- the ConnectionImpl that created the result setvalue
- the String value as a series of bytes, encoded using
"encoding"offset
- where to start the decodinglength
- how many bytes to decode
java.sql.SQLException
- if an error occursprotected java.sql.Time getTimeFast(int columnIndex, byte[] timeAsBytes, int offset, int length, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Time getTimeFast(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Timestamp getTimestampFast(int columnIndex, byte[] timestampAsBytes, int offset, int length, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract java.sql.Timestamp getTimestampFast(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward, ConnectionImpl conn, ResultSetImpl rs) throws java.sql.SQLException
java.sql.SQLException
public abstract boolean isFloatingPointNumber(int index) throws java.sql.SQLException
index
- of the column value (starting at 0) to check.
java.sql.SQLException
- if an error occurspublic abstract boolean isNull(int index) throws java.sql.SQLException
index
- of the column value (starting at 0) to check.
java.sql.SQLException
- if an error occurspublic abstract long length(int index) throws java.sql.SQLException
index
- of the column value (starting at 0) for which to return the
length.
java.sql.SQLException
public abstract void setColumnValue(int index, byte[] value) throws java.sql.SQLException
index
- index of the column value (starting at 0) to set.value
- the (raw) value to set
java.sql.SQLException
- if an error occurs, or the concrete RowHolder doesn't support
this operation.public ResultSetRow setMetadata(Field[] f) throws java.sql.SQLException
java.sql.SQLException
public abstract int getBytesSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |