The abstract base class for the SimpleDB types. More...
#include <Column.h>
Classes | ||||
class | UnboundException | |||
Exception class. More... | ||||
Public Member Functions | ||||
virtual bool | isNull () const | |||
Tests if the current value is NULL
| ||||
virtual std::ostream & | oStream (std::ostream &oStream)=0 | |||
Function called to write a column value to the output stream. | ||||
virtual | ~Column () | |||
A virtual destructor that can be overridden if required. | ||||
Column () | ||||
Constructor used to set initial value of columnBound variable. | ||||
void | value () const | |||
This method is to be called by all derived classes to make sure the column was bound. | ||||
Protected Member Functions | ||||
PimplData & | getPimplData () | |||
Used for children to get the pimplData. | ||||
virtual void | doBind (QueryPimplData &queryPimplData, int columnNumber)=0 | |||
This abstract function is called by Query when the Query.bind function is invoked. | ||||
Friends | ||||
class | Query | |||
Query is a friend so it can call the doBind function, but so that the doBind function can be hidden from outside (for encapsulation). |
The abstract base class for the SimpleDB types.
This type contains the actual data as well as meta-data.
complete.cpp, and simple.cpp.
virtual SimpleDB::Column::~Column | ( | ) | [virtual] |
A virtual destructor that can be overridden if required.
This can be used, for example, to deallocate memory.
virtual void SimpleDB::Column::doBind | ( | QueryPimplData & | queryPimplData, | |
int | columnNumber | |||
) | [protected, pure virtual] |
This abstract function is called by Query when the Query.bind function is invoked.
This function has an implementation that handles making sure columns are bound. This function should be called by any derived objects.
queryPimplData | The implementation data from the query object | |
columnNumber | The column number to bind this column to.. |
Implemented in SimpleDB::StringColumn, SimpleDB::BigintColumn, SimpleDB::IntColumn, SimpleDB::LongColumn, SimpleDB::DoubleColumn, and SimpleDB::BoolColumn.
PimplData& SimpleDB::Column::getPimplData | ( | ) | [protected] |
Used for children to get the pimplData.
virtual bool SimpleDB::Column::isNull | ( | ) | const [virtual] |
Tests if the current value is NULL
UnboundException | if the column hasn't been bound. |
virtual std::ostream& SimpleDB::Column::oStream | ( | std::ostream & | oStream | ) | [pure virtual] |
Function called to write a column value to the output stream.
This function is implemented by each column type to write the value in a suitable form to the output stream.
oStream | Output stream object. |
Implemented in SimpleDB::StringColumn, SimpleDB::BigintColumn, SimpleDB::IntColumn, SimpleDB::LongColumn, SimpleDB::DoubleColumn, and SimpleDB::BoolColumn.
void SimpleDB::Column::value | ( | ) | const |
This method is to be called by all derived classes to make sure the column was bound.
It will cause an exception to be thrown if the column wasn't bound.
Reimplemented in SimpleDB::StringColumn, SimpleDB::BigintColumn, SimpleDB::IntColumn, SimpleDB::LongColumn, SimpleDB::DoubleColumn, and SimpleDB::BoolColumn.