SqLite DBResultSet implementation. More...
#include <DBSqLite.h>
Public Member Functions | |
SqLiteResultSet () | |
virtual | ~SqLiteResultSet () |
virtual int | forEach (CycleBase &pCycle) |
Batch operation using a CycleBase of derived class. | |
virtual int | forEach (ExecuteFunctionType pFunction) |
Batch operation using a stateless function. | |
string | getString (string &pNameRef) |
Returns the value associated to the provided pNameRef key. | |
string | getString (int pPosition) |
Returns the value located in the pPosition order within the provided query. | |
size_t | size () |
The quantity of stored rows. | |
bool | isLast () |
When traversing the data set, indicates if there are more rows to read. | |
void | getMetadata (DBMetadata &pMetadataRef) |
Fills the provided pMetadataRef instance with the query specific metadata values. | |
Public Member Functions inherited from HSEPData::DBResultSet | |
DBResultSet () | |
virtual | ~DBResultSet () |
virtual string | getString (const char *pName) |
Returns the value associated to the provided pName key. | |
virtual void | destroyMetadata (DBMetadata &pMetadataRef) |
Given the pMetadataRef, releases the previously returned metadata values. | |
Public Member Functions inherited from HSEP::HSEPObject | |
string & | lastErrorRef () |
Returns a reference to the last stored error message. | |
ErrorCode | lastCode () |
Returns the last stored code. | |
bool | valid () |
Permits to know if the object has a valid internal state. | |
string & | typeRef () |
Permits to know the type of this particular object. | |
Friends | |
class | SqLiteStatement |
Additional Inherited Members | |
Protected Member Functions inherited from HSEP::HSEPObject | |
HSEPObject (const char *pType) | |
Constructor, providing the base for the state controlling instance. | |
virtual | ~HSEPObject () |
void | setLastError (string &pErrorMsgRef) |
Assigns an error message text to the last executed operation. | |
void | setLastError (const string &pErrorMsgRef) |
Assigns an error message text to the last executed operation. | |
void | setLastError (const char *pErrorMsg) |
Assigns an error message text to the last executed operation. | |
void | setValid () |
Defines that the object has a valid state. | |
void | setInvalid () |
Defines that the object has an invalid state. | |
void | setLastCode (const ErrorCode pErrorCode) |
Defines the internal result code for the object. | |
SqLite DBResultSet implementation.
Definition at line 46 of file DBSqLite.h.
HSEPDataSqLite::SqLiteResultSet::SqLiteResultSet | ( | ) |
Definition at line 175 of file DBSqLite.cpp.
|
virtual |
Definition at line 179 of file DBSqLite.cpp.
|
virtual |
Batch operation using a CycleBase of derived class.
pCycleRef |
Implements HSEPData::DBResultSet.
Definition at line 205 of file DBSqLite.cpp.
References HSEPData::CycleBase::execute(), HSEP::Array< T >::forEach(), HSEPDataSqLite::SQLResultData::isFirst(), HSEPDataSqLite::SQLResultData::isLast(), HSEPDataSqLite::SQLResultData::next(), and HSEPDataSqLite::SQLResultData::table().
|
virtual |
Batch operation using a stateless function.
When using a lambda function it is possible to "capture" surrounding variables, that would permit to the reentrant lambda function to perform state-related operations very similar to what a Cycle will do. However, when the complexity is high, it is recomended to use a particular Cycle type instead.
pFunction |
Implements HSEPData::DBResultSet.
Definition at line 222 of file DBSqLite.cpp.
References HSEP::Array< T >::forEach(), HSEPDataSqLite::SQLResultData::isFirst(), HSEPDataSqLite::SQLResultData::isLast(), HSEPDataSqLite::SQLResultData::next(), and HSEPDataSqLite::SQLResultData::table().
|
virtual |
Fills the provided pMetadataRef instance with the query specific metadata values.
It is very important that when the metadata won't be used anymore, a destroyMetadata be performed for not to produce memory leaks.
pMetadataRef |
Implements HSEPData::DBResultSet.
Definition at line 197 of file DBSqLite.cpp.
References HSEPDataSqLite::SQLResultData::getMetadata().
|
virtual |
Returns the value associated to the provided pNameRef key.
pNameRef |
Implements HSEPData::DBResultSet.
Definition at line 239 of file DBSqLite.cpp.
References HSEPDataSqLite::SQLResultData::getString().
|
virtual |
Returns the value located in the pPosition order within the provided query.
pPosition |
Implements HSEPData::DBResultSet.
Definition at line 249 of file DBSqLite.cpp.
References HSEPDataSqLite::SQLResultData::getString().
|
virtual |
When traversing the data set, indicates if there are more rows to read.
Implements HSEPData::DBResultSet.
Definition at line 184 of file DBSqLite.cpp.
|
virtual |
The quantity of stored rows.
Implements HSEPData::DBResultSet.
Definition at line 191 of file DBSqLite.cpp.
|
friend |
Definition at line 63 of file DBSqLite.h.