表示数据库结果集的数据表,通过NpsPreparedStatement执行查询数据库的语句生成。
目前还不支持大对象(CLOB、BLOB、LONG)、数组。
样例代码:
var pstmt = session.PrepareStatement("select sysdate from dual");
var rs = pstmt.ExecuteQuery();
while(rs.Next())
{
out.Info(rs.GetDate(1));
}
| boolean |
First() throws Exception 将指针移动到此 ResultSet 对象的第一行。 如果指针位于有效行,则返回 true;如果结果集中不存在任何行,则返回 false |
| boolean |
Last() throws Exception 将指针移动到此 ResultSet 对象的最后一行。 如果指针位于有效行,则返回 true;如果结果集中不存在任何行,则返回 false |
| boolean |
Previous() throws Exception 将指针移动到此 ResultSet 对象的上一行。 如果指针位于有效行上,则返回 true;如果它不在结果集中,则返回 false |
| boolean |
Next() throws Exception 将指针从当前位置下移一行。ResultSet 指针最初位于第一行之前;第一次调用 next 方法使第一行成为当前行;第二次调用使第二行成为当前行,依此类推。 如果新的当前行有效,则返回 true;如果不存在下一行,则返回 false |
| void |
Close() 立即释放此 ResultSet 对象的数据库资源。 |
| void |
DeleteRow() throws Exception 从此 ResultSet 对象和底层数据库中删除当前行。 |
| void |
InsertRow() throws Exception 将插入行的内容插入到此 ResultSet 对象和数据库中。 |
| int |
GetInt(int columnIndex) throws Exception 获取指定列的int值。columnIndex从1开始计数。 |
| int |
GetIntByName(String columnName) throws Exception 获取指定列名的int值。columnName为字段名。 |
| String |
GetString(int columnIndex) throws Exception 获取指定列的String值。columnIndex从1开始计数。 |
| String |
GetStringByName(String columnName) throws Exception 获取指定列名的String值。columnName为字段名。 |
| double |
GetDouble(int columnIndex) throws Exception 获取指定列的double值。columnIndex从1开始计数。 |
| double |
GetDoubleByName(String columnName) throws Exception 获取指定列名的double值。columnName为字段名。 |
| Date |
GetDate(int columnIndex) throws Exception 获取指定列的Date值。columnIndex从1开始计数。 |
| Date |
GetDateByName(String columnName) throws Exception 获取指定列名的Date值。columnName为字段名。 |
| String |
GetClob(int columnIndex) throws Exception 获取指定列名的Clob值。columnIndex从1开始计数。 |
| String |
GetClobByName(String columnName) throws Exception 获取指定列名的Clob值。columnName为字段名。 |
| boolean |
IsFirst() throws Exception 当前是否位于第一行。 如果指针位于第一行,则返回 true;否则返回 false |
| boolean |
IsLast() throws Exception 当前是否位于最后一行。 如果指针位于最后一行,则返回 true;否则返回 false |
| boolean |
IsAfterLast() throws Exception 检索指针是否位于最后一行之后。 如果指针位于最后一行之后,则返回 true;如果指针位于任何其他位置或者结果集不包含任何行,则返回 false |
| boolean |
IsBeforeFirst() throws Exception 检索指针是否位于此 ResultSet 对象的第一行之前。 如果指针位于第一行之前,则返回 true;如果指针位于任何其他位置或者结果集不包含任何行,则返回 false |
| void |
UpdateDate(int columnIndex, Object d) throws Exception 用 Date 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnIndex从1开始计数 |
| void |
UpdateDateByName(String columnName, Object d) throws Exception 用 Date 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnName为字段名 |
| void |
UpdateDouble(int columnIndex, double x) throws Exception 用 double 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnIndex从1开始计数 |
| void |
UpdateDoubleByName(String columnName, double x) throws Exception 用 double 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnName为字段名 |
| void |
UpdateInt(int columnIndex, int x) throws Exception 用 int 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnIndex从1开始计数 |
| void |
UpdateIntByName(String columnName, int x) throws Exception 用 int 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnName为字段名 |
| void |
UpdateString(int columnIndex, String x) throws Exception 用 String 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnIndex从1开始计数 |
| void |
UpdateStringByName(String columnName, String x) throws Exception 用 String 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnName为字段名 |
| void |
UpdateNull(int columnIndex) throws Exception 用 Null 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnIndex从1开始计数 |
| void |
UpdateNullByName(String columnName) throws Exception 用 Null 值更新指定列。更新方法用于更新当前行或插入行中的列值,并不会更新底层数据库;更新数据库要调用 updateRow 或 insertRow 方法。 columnName为字段名 |
| void |
UpdateRow() throws Exception 将当前行的新内容更新底层数据库。 |
| boolean |
RowDeleted() throws Exception 检索是否已删除某行。 如果删除了行并且检测到删除,则返回 true;否则返回 false |
| boolean |
RowInserted() throws Exception 检索当前行是否已有插入。 如果行已有插入并且检测到插入,则返回 true;否则返回 false |
| boolean |
RowUpdated() throws Exception 检索是否已更新当前行。 如果 (1)所有者或其他人已对行进行可见更新 (2)可以检测到更新都成立,则返回 true |
| void |
SetFetchDirection(int direction) throws Exception 设置此 ResultSet 对象中行的处理方向。获取方向可以在任何时间更改。 1000表示前进方向,1001表示回退方向 |
| void |
RefreshRow() throws Exception 用数据库中的最近值刷新当前行。 |