All Packages Class Hierarchy This Package Previous Next Index
Class postgresql.ResultSet
java.lang.Object
|
+----postgresql.ResultSet
- public abstract class ResultSet
- extends Object
This class implements the common internal methods used by both JDBC 1 and
JDBC 2 specifications.
-
ResultSet(Connection, Field[], Vector, String, int)
- Create a new ResultSet - Note that we create ResultSets to
represent the results of everything.
-
append(ResultSet)
- This following method allows us to add a ResultSet object
to the end of the current chain.
-
close()
- This is part of the JDBC API, but is required by postgresql.Field
-
getColumnCount()
- getColumnCount returns the number of columns
-
getColumnOID(int)
- returns the OID of a field.
It is used internally by the driver.
-
getNext()
- Since ResultSets can be chained, we need some method of
finding the next one in the chain.
-
getResultCount()
- If we are just a place holder for results, we still need
to get an updateCount.
-
getStatusString()
- Returns the status message from the backend.
It is used internally by the driver.
-
getString(int)
-
-
getTupleCount()
- We also need to provide a couple of auxiliary functions for
the implementation of the ResultMetaData functions.
-
next()
-
-
reallyResultSet()
- We at times need to know if the resultSet we are working
with is the result of an UPDATE, DELETE or INSERT (in which
case, we only have a row count), or of a SELECT operation
(in which case, we have multiple fields) - this routine
tells us.
ResultSet
public ResultSet(Connection conn,
Field fields[],
Vector tuples,
String status,
int updateCount)
- Create a new ResultSet - Note that we create ResultSets to
represent the results of everything.
- Parameters:
- fields - an array of Field objects (basically, the
ResultSet MetaData)
- tuples - Vector of the actual data
- status - the status string returned from the back end
- updateCount - the number of rows affected by the operation
- cursor - the positioned update/delete cursor name
reallyResultSet
public boolean reallyResultSet()
- We at times need to know if the resultSet we are working
with is the result of an UPDATE, DELETE or INSERT (in which
case, we only have a row count), or of a SELECT operation
(in which case, we have multiple fields) - this routine
tells us.
- Returns:
- true if we have tuples available
getNext
public ResultSet getNext()
- Since ResultSets can be chained, we need some method of
finding the next one in the chain. The method getNext()
returns the next one in the chain.
- Returns:
- the next ResultSet, or null if there are none
append
public void append(ResultSet r)
- This following method allows us to add a ResultSet object
to the end of the current chain.
- Parameters:
- r - the resultset to add to the end of the chain.
getResultCount
public int getResultCount()
- If we are just a place holder for results, we still need
to get an updateCount. This method returns it.
- Returns:
- the updateCount
getTupleCount
public int getTupleCount()
- We also need to provide a couple of auxiliary functions for
the implementation of the ResultMetaData functions. In
particular, we need to know the number of rows and the
number of columns. Rows are also known as Tuples
- Returns:
- the number of rows
getColumnCount
public int getColumnCount()
- getColumnCount returns the number of columns
- Returns:
- the number of columns
getStatusString
public String getStatusString()
- Returns the status message from the backend.
It is used internally by the driver.
- Returns:
- the status string from the backend
getColumnOID
public int getColumnOID(int field)
- returns the OID of a field.
It is used internally by the driver.
- Parameters:
- field - field id
- Returns:
- the oid of that field's type
close
public abstract void close() throws SQLException
- This is part of the JDBC API, but is required by postgresql.Field
next
public abstract boolean next() throws SQLException
getString
public abstract String getString(int i) throws SQLException
All Packages Class Hierarchy This Package Previous Next Index