ResultSet Class Reference

A database result set. More...

#include <SQLDatabase.h++>

Collaboration diagram for ResultSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~ResultSet () throw ()
 Destructor.
bool next () throw (SQLException, InterruptedException, TimeoutException)
 Advance to the next result in the ResultSet.
uint_t getColumnCount () throw (SQLException)
 Get the number of columns in the ResultSet.
Variant getColumnValue (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet.
String getColumnName (uint_t column) throw (SQLException)
 Get the unaliased name for the given column in the ResultSet.
String getAliasedColumnName (uint_t column) throw (SQLException)
 Get the aliased name for the given column in the ResultSet.
String getTableName (uint_t column) throw (SQLException)
 Get the name of the table for the given column in the ResultSet.
int getInt (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet, as an integer.
int64_t getInt64 (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet, as a 64-bit integer.
double getDouble (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet, as a double-precision floating point value.
String getString (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet, as a String.
Blob getBlob (uint_t column) throw (SQLException)
 Get the value for the given column in the current row of the ResultSet, as a Blob.

Friends

class PreparedStatement

Detailed Description

A database result set.

The next() method should be called to advance to the first and each subsequent row in the ResultSet.

Author:
Mark Lindner

Constructor & Destructor Documentation

~ResultSet (  )  throw ()

Destructor.


Member Function Documentation

String getAliasedColumnName ( uint_t  column  )  throw (SQLException)

Get the aliased name for the given column in the ResultSet.

Parameters:
column The column number (counting from 1).
Returns:
The aliased column name.
Exceptions:
SQLException If a database error occurs.
Blob getBlob ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet, as a Blob.

Parameters:
column The column number (counting from 1).
Returns:
The value, as a Blob.
Exceptions:
SQLException If a database error occurs.
uint_t getColumnCount (  )  throw (SQLException)

Get the number of columns in the ResultSet.

Exceptions:
SQLException If a database error occurs.
Returns:
The column count.
String getColumnName ( uint_t  column  )  throw (SQLException)

Get the unaliased name for the given column in the ResultSet.

Parameters:
column The column number (counting from 1).
Returns:
The column name.
Exceptions:
SQLException If a database error occurs.
Variant getColumnValue ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet.

Parameters:
column The column number (counting from 1).
Returns:
The value, as a Variant.
Exceptions:
SQLException If a database error occurs.
double getDouble ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet, as a double-precision floating point value.

Parameters:
column The column number (counting from 1).
Returns:
The value, as a double.
Exceptions:
SQLException If a database error occurs.
int getInt ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet, as an integer.

Parameters:
column The column number (counting from 1).
Returns:
The value, as an int.
Exceptions:
SQLException If a database error occurs.
int64_t getInt64 ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet, as a 64-bit integer.

Parameters:
column The column number (counting from 1).
Returns:
The value, as an int64_t.
Exceptions:
SQLException If a database error occurs.
String getString ( uint_t  column  )  throw (SQLException)

Get the value for the given column in the current row of the ResultSet, as a String.

Parameters:
column The column number (counting from 1).
Returns:
The value, as a String.
Exceptions:
SQLException If a database error occurs.
String getTableName ( uint_t  column  )  throw (SQLException)

Get the name of the table for the given column in the ResultSet.

Parameters:
column The column number (counting from 1).
Returns:
The table name.
Exceptions:
SQLException If a database error occurs.
bool next (  )  throw (SQLException, InterruptedException, TimeoutException)

Advance to the next result in the ResultSet.

Exceptions:
SQLException If a database error occurs.
InterruptedException If the operation was interrupted via a call to SQLDatabase::interrupt().
TimeoutException If a timeout occurs while waiting for database locks. The call should be retried in this case.
Returns:
true if successful, or false if there are no more results.

Friends And Related Function Documentation

friend class PreparedStatement [friend]

The documentation for this class was generated from the following files:
Generated on Fri Apr 22 22:14:26 2011 for libcommonc++ by  doxygen 1.6.3