fastcgi++
|
Sub-structure to store shared data for the query. More...
Public Types | |
enum | Flags { FLAG_SINGLE_PARAMETERS = 1, FLAG_SINGLE_RESULTS = 1<<1 } |
Contains the possible flags a query can have set. More... |
Public Member Functions | |
SharedData () | |
Only constructor. | |
~SharedData () | |
Destroys the shared data. | |
void | destroyResults () |
Safely destroys(or doesn't) the result data set. | |
void | destroyParameters () |
Safely destroys(or doesn't) the parameter data set. |
Public Attributes | |
void * | m_parameters |
Pointer to the data object containing the parameters to be passed to the statement. | |
void * | m_results |
Pointer to the data object that should store the results returned from the statement. | |
unsigned long long int * | m_insertId |
Used to return a potential last auto increment insert id. | |
unsigned long long int * | m_rows |
Used to return the number of rows available/affected by the query. | |
Error | m_error |
Contains the error (if any) returned by the query. | |
boost::function< void()> | m_callback |
A callback function to be called when the query completes. | |
boost::mutex | m_callbackMutex |
bool | m_cancel |
If set true the query should cancel when the opportunity arises. | |
unsigned char | m_flags |
flags for the shared data |
|
inline |
|
inline |
Destroys the shared data.
This should obviously only get called when at last all associated QueryPar objects go out of scope.
Definition at line 47 of file query.hpp.
References destroyParameters(), destroyResults(), m_insertId, and m_rows.
|
inline |
Safely destroys(or doesn't) the parameter data set.
This will destroy the parameter set and set the m_parameters pointer to null.
Definition at line 116 of file query.hpp.
References FLAG_SINGLE_PARAMETERS, m_flags, and m_parameters.
Referenced by ~SharedData().
|
inline |
Safely destroys(or doesn't) the result data set.
This will destroy the result set and set the m_results pointer to null.
Definition at line 103 of file query.hpp.
References FLAG_SINGLE_RESULTS, m_flags, and m_results.
Referenced by ~SharedData().
boost::function<void()> ASql::QueryPar::SharedData::m_callback |
bool ASql::QueryPar::SharedData::m_cancel |
Error ASql::QueryPar::SharedData::m_error |
unsigned char ASql::QueryPar::SharedData::m_flags |
flags for the shared data
FLAG_SINGLE_RESULTS: This means that the data pointed to be m_results is a Data::Set and not a Data::SetContainer.
FLAG_SINGLE_RESULTS: This means that the data pointed to be m_parameters is a Data::Set and not a Data::SetContainer.
Definition at line 97 of file query.hpp.
Referenced by destroyParameters(), and destroyResults().
unsigned long long int* ASql::QueryPar::SharedData::m_insertId |
Used to return a potential last auto increment insert id.
Definition at line 71 of file query.hpp.
Referenced by ~SharedData().
void* ASql::QueryPar::SharedData::m_parameters |
Pointer to the data object containing the parameters to be passed to the statement.
This is a void pointer so that it may contain a single row of parameters (Data::Set) or multiple rows of parameters (Data::SetContainer). Multiple rows of parameters is in effect just executing the query multiple times in a single transaction.
Definition at line 61 of file query.hpp.
Referenced by destroyParameters().
void* ASql::QueryPar::SharedData::m_results |
Pointer to the data object that should store the results returned from the statement.
This is a void pointer so that it may contain a single row of results (Data::Set) or multiple rows of results (Data::SetContainer).
Definition at line 68 of file query.hpp.
Referenced by destroyResults().
unsigned long long int* ASql::QueryPar::SharedData::m_rows |
Used to return the number of rows available/affected by the query.
Definition at line 76 of file query.hpp.
Referenced by ~SharedData().