GaussDB-java.sql.ResultSet

53 阅读3分钟

GaussDB-java.sql.ResultSet

java.sql.ResultSet是执行结果集接口。

方法名返回值类型支持JDBC4
absolute(int row)BooleanYes
afterLast()voidYes
beforeFirst()voidYes
cancelRowUpdates()voidYes
clearWarnings()voidYes
close()voidYes
deleteRow()voidYes
findColumn(String columnLabel)intYes
first()BooleanYes
getArray(int columnIndex)ArrayYes
getArray(String columnLabel)ArrayYes
getAsciiStream(int columnIndex)InputStreamYes
getAsciiStream(String columnLabel)InputStreamYes
getBigDecimal(int columnIndex)BigDecimalYes
getBigDecimal(String columnLabel)BigDecimalYes
getBinaryStream(int columnIndex)InputStreamYes
getBinaryStream(String columnLabel)InputStreamYes
getBlob(int columnIndex)BlobYes
getBlob(String columnLabel)BlobYes
getBoolean(int columnIndex)BooleanYes
getBoolean(String columnLabel)BooleanYes
getByte(int columnIndex)byteYes
getBytes(int columnIndex)byte[]Yes
getByte(String columnLabel)byteYes
getBytes(String columnLabel)byte[]Yes
getCharacterStream(int columnIndex)ReaderYes
getCharacterStream(String columnLabel)ReaderYes
getClob(int columnIndex)ClobYes
getClob(String columnLabel)ClobYes
getConcurrency()intYes
getCursorName()StringYes
getDate(int columnIndex)DateYes
getDate(int columnIndex, Calendar cal)DateYes
getDate(String columnLabel)DateYes
getDate(String columnLabel, Calendar cal)DateYes
getDouble(int columnIndex)doubleYes
getDouble(String columnLabel)doubleYes
getFetchDirection()intYes
getFetchSize()intYes
getFloat(int columnIndex)floatYes
getFloat(String columnLabel)floatYes
getInt(int columnIndex)intYes
getInt(String columnLabel)intYes
getLong(int columnIndex)longYes
getLong(String columnLabel)longYes
getMetaData()ResultSetMetaDataYes
getObject(int columnIndex)ObjectYes
getObject(int columnIndex, Class type) TYes
getObject(int columnIndex, Map<String,Class<?>> map)ObjectYes
getObject(String columnLabel)ObjectYes
getObject(String columnLabel, Class type) TYes
getObject(String columnLabel, Map<String,Class<?>> map)ObjectYes
getRow()intYes
getShort(int columnIndex)shortYes
getShort(String columnLabel)shortYes
getSQLXML(int columnIndex)SQLXMLYes
getSQLXML(String columnLabel)SQLXMLYes
getStatement()StatementYes
getString(int columnIndex)StringYes
getString(String columnLabel)StringYes
getNString(int columnIndex)StringYes
getNString(String columnLabel)StringYes
getTime(int columnIndex)TimeYes
getTime(int columnIndex, Calendar cal)TimeYes
getTime(String columnLabel)TimeYes
getTime(String columnLabel, Calendar cal)TimeYes
getTimestamp(int columnIndex)TimestampYes
getTimestamp(int columnIndex, Calendar cal)TimestampYes
getTimestamp(String columnLabel)TimestampYes
getTimestamp(String columnLabel, Calendar cal)TimestampYes
getType()intYes
getWarnings()SQLWarningYes
insertRow()voidYes
isAfterLast()BooleanYes
isBeforeFirst()BooleanYes
isClosed()BooleanYes
isFirst()BooleanYes
isLast()BooleanYes
last()BooleanYes
moveToCurrentRow()voidYes
moveToInsertRow()voidYes
next()BooleanYes
previous()BooleanYes
refreshRow()voidYes
relative(int rows)BooleanYes
rowDeleted()BooleanYes
rowInserted()BooleanYes
rowUpdated()BooleanYes
setFetchDirection(int direction)voidYes
setFetchSize(int rows)voidYes
updateArray(int columnIndex, Array x)voidYes
updateArray(String columnLabel, Array x)voidYes
updateAsciiStream(int columnIndex, InputStream x, int length)voidYes
updateAsciiStream(String columnLabel, InputStream x, int length)voidYes
updateBigDecimal(int columnIndex, BigDecimal x)voidYes
updateBigDecimal(String columnLabel, BigDecimal x)voidYes
updateBinaryStream(int columnIndex, InputStream x, int length)voidYes
updateBinaryStream(String columnLabel, InputStream x, int length)voidYes
updateBoolean(int columnIndex, boolean x)voidYes
updateBoolean(String columnLabel, boolean x)voidYes
updateByte(int columnIndex, byte x)voidYes
updateByte(String columnLabel, byte x)voidYes
updateBytes(int columnIndex, byte[] x)voidYes
updateBytes(String columnLabel, byte[] x)voidYes
updateCharacterStream(int columnIndex, Reader x, int length)voidYes
updateCharacterStream(String columnLabel, Reader reader, int length)voidYes
updateDate(int columnIndex, Date x)voidYes
updateDate(String columnLabel, Date x)voidYes
updateDouble(int columnIndex, double x)voidYes
updateDouble(String columnLabel, double x)voidYes
updateFloat(int columnIndex, float x)voidYes
updateFloat(String columnLabel, float x)voidYes
updateInt(int columnIndex, int x)voidYes
updateInt(String columnLabel, int x)voidYes
updateLong(int columnIndex, long x)voidYes
updateLong(String columnLabel, long x)voidYes
updateNull(int columnIndex)voidYes
updateNull(String columnLabel)voidYes
updateObject(int columnIndex, Object x)voidYes
updateObject(int columnIndex, Object x, int scaleOrLength)voidYes
updateObject(String columnLabel, Object x)voidYes
updateObject(String columnLabel, Object x, int scaleOrLength)voidYes
updateRow()voidYes
updateShort(int columnIndex, short x)voidYes
updateShort(String columnLabel, short x)voidYes
updateSQLXML(int columnIndex, SQLXML xmlObject)voidYes
updateSQLXML(String columnLabel, SQLXML xmlObject)voidYes
updateString(int columnIndex, String x)voidYes
updateString(String columnLabel, String x)voidYes
updateTime(int columnIndex, Time x)voidYes
updateTime(String columnLabel, Time x)voidYes
updateTimestamp(int columnIndex, Timestamp x)voidYes
updateTimestamp(String columnLabel, Timestamp x)voidYes
wasNull()BooleanYes

  • 一个Statement不能有多个处于“open”状态的ResultSet。
  • 用于遍历结果集(ResultSet)的游标(Cursor)在被提交后不能保持“open”的状态。

更多详情请参考GaussDB 文档中心:doc.hcs.huawei.com/db/zh-cn/ga…