#include <Row.h>
Inheritance diagram for MySQLaux::Row
Public Methods | |
Row (MYSQL_ROW rawData, MYSQL_FIELD *field_info, unsigned long *lengths, unsigned number, GarbageCollector &gc) throw (MissingFeature) | |
Constructor. More... | |
Row (Row const &other) | |
Copy constructor. More... | |
~Row () | |
Destructor. More... | |
Field const& | operator[] (unsigned int index) const throw (NullFieldIndicator, range_error) |
Get constant field. More... | |
Field& | operator[] (unsigned int index) throw (NullFieldIndicator, std::range_error) |
Get variable field. More... | |
template<class T> T const& | value (unsigned int index) const throw (NullFieldIndicator, std::bad_cast, std::range_error) |
Get value of constant field. More... | |
size_t | size () const |
Get size of row (number of fields). More... | |
size_t | size (unsigned int index) const throw (range_error) |
Get size of field value (number of bytes). More... |
Note that there is no intrinsic information of the meaning of the fields besides their sizes.
Definition at line 45 of file Row.h.
|
Constructor. As a garbage collector information, field reference counts are initialized with 1.
|
|
Copy constructor. Field reference counts for the garbage collector are increased by 1.
|
|
Destructor. Field reference counts for the garbage collector are decreased by 1, or deleted if they reach 0. |
|
Get variable field.
|
|
Get constant field.
|
|
Get size of field value (number of bytes).
Definition at line 127 of file Row.h. 00129 { 00130 if (index >= vector<Field *>::size()) 00131 throw range_error("invalid field index for MySQLaux::Row"); 00132 return (*this)[index].size(); 00133 |
|
Get size of row (number of fields).
Definition at line 119 of file Row.h. 00120 { 00121 return vector<Field *>::size(); 00122 |
|
Get value of constant field. This method template replaces ugly constructs like (dynamic_cast<MySQLaux::TypedField<string> const &>((*row)[0])).value().
Definition at line 108 of file Row.h. 00112 { 00113 return (dynamic_cast<MySQLaux::TypedField<T> const &>((*this)[index]).value()); 00114 |