Package org.postgresql.jdbc
Class ResultWrapper
- java.lang.Object
-
- org.postgresql.jdbc.ResultWrapper
-
public class ResultWrapper extends java.lang.Object
Helper class that storing result info. This handles both the ResultSet and no-ResultSet result cases with a single interface for inspecting and stepping through them.- Author:
- Oliver Jowett (oliver@opencloud.com)
-
-
Constructor Summary
Constructors Constructor Description ResultWrapper(long updateCount, long insertOID, SqlCommandType commandType)
ResultWrapper(java.sql.ResultSet rs, SqlCommandType commandType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultWrapper
append(ResultWrapper newResult)
Append a result to its internal chain of results.long
getInsertOID()
ResultWrapper
getNext()
java.sql.ResultSet
getResultSet()
long
getUpdateCount()
-
-
-
Constructor Detail
-
ResultWrapper
public ResultWrapper(java.sql.ResultSet rs, SqlCommandType commandType)
-
ResultWrapper
public ResultWrapper(long updateCount, long insertOID, SqlCommandType commandType)
-
-
Method Detail
-
getResultSet
public java.sql.ResultSet getResultSet()
-
getUpdateCount
public long getUpdateCount()
-
getInsertOID
public long getInsertOID()
-
getNext
public ResultWrapper getNext()
-
append
public ResultWrapper append(ResultWrapper newResult)
Append a result to its internal chain of results. It has a special behavior forSET
commands asSET
is discarded if there are other results in the chain. If this is aSET
command, thenewResult
is returned has the new head of the chain. If the newResult is aSET
command, it's not appended and this is returned.- Parameters:
newResult
- the result to append- Returns:
- the head of the chain
-
-