CarobNS::ResultAndWarnings Class Reference

Container that holds XXXexecute() and XXXexecuteUpdate result (update count or result list) and the eventual associated warnings. More...

#include <ResultAndWarnings.hpp>

List of all members.

Public Member Functions

 ResultAndWarnings ()
 Empty constructor.
 ResultAndWarnings (int uc, SQLWarning *warnsPtr)
 Constructs a ResultAndWarning that will hold an updateCount and the given SQLWarnings.
 ResultAndWarnings (std::list< ResultSetOrUpdateCount > reslist, SQLWarning *warnsPtr)
 Constructs a ResultAndWarning that will hold a resultList and the given SQLWarnings.
 ResultAndWarnings (const ResultAndWarnings &cp)
 Copy constructor.
ResultAndWarningsoperator= (const ResultAndWarnings &cp)
 Assignement operator.
bool isUpdateCount () const
 Tells whether this object holds an updateCount.
bool isResultList () const
 Tells whether this object holds a resultList.
SQLWarninggetWarnings () const
 Gets the warning chain pointer associated to the result.
int getUpdateCount () const
 Gets the updateCount.
std::list< ResultSetOrUpdateCountgetResultList () const
 Gets the ResultList.


Detailed Description

Container that holds XXXexecute() and XXXexecuteUpdate result (update count or result list) and the eventual associated warnings.

Note that XXXexecuteQuery result and warnings are held by DriverResultSet class


Constructor & Destructor Documentation

CarobNS::ResultAndWarnings::ResultAndWarnings ( int  uc,
SQLWarning warnsPtr 
) [inline]

Constructs a ResultAndWarning that will hold an updateCount and the given SQLWarnings.


This constructor will typically be called by XXXexecuteUpdate() functions

Parameters:
uc the update count
warnsPtr pointer to the warnings to set, can be null

CarobNS::ResultAndWarnings::ResultAndWarnings ( std::list< ResultSetOrUpdateCount reslist,
SQLWarning warnsPtr 
) [inline]

Constructs a ResultAndWarning that will hold a resultList and the given SQLWarnings.


This constructor will typically be called by XXXexecute() functions

Parameters:
reslist list of results
warnsPtr pointer to the warnings to set, can be null


Member Function Documentation

ResultAndWarnings& CarobNS::ResultAndWarnings::operator= ( const ResultAndWarnings cp  )  [inline]

Assignement operator.

Deletes the previous warnings and replaces it with the one from the right value

Parameters:
cp the right value

bool CarobNS::ResultAndWarnings::isUpdateCount (  )  const [inline]

Tells whether this object holds an updateCount.

Returns:
true if the result is an updateCount

bool CarobNS::ResultAndWarnings::isResultList (  )  const [inline]

Tells whether this object holds a resultList.

Returns:
true if the result is an resultList

SQLWarning* CarobNS::ResultAndWarnings::getWarnings (  )  const [inline]

Gets the warning chain pointer associated to the result.

Returns:
a SQLWarning pointer or null if no warnings

int CarobNS::ResultAndWarnings::getUpdateCount (  )  const [inline]

Gets the updateCount.

Note: if the held value is a resultList (ie. if isUpdateCount() returns false), then the returned value is not specified

Returns:
the updateCount value

std::list<ResultSetOrUpdateCount> CarobNS::ResultAndWarnings::getResultList (  )  const [inline]

Gets the ResultList.

Note: if the held value is an udpateCount (ie. if isResultList() returns false), then the returned value is not specified

Returns:
the updateCount value


The documentation for this class was generated from the following file:
Generated on Tue Oct 24 09:05:38 2006 for Carob by  doxygen 1.5.0