sptk2 logo
SPTK Home Page

sptk::CQueryGuard Class Reference
[Database Support]

Service class to use with CQuery. More...

#include <CQueryGuard.h>

List of all members.

Public Member Functions

 CQueryGuard (sptk::CQuery &query)
 Constructor.
 ~CQueryGuard ()
 Destructor.
void open ()
 Opens managed query object.
void exec ()
 Executes managed query object.
void fetch ()
 Fetches next data row from the managed query object.
bool eof () const
 Returns true if there is no more data rows to read.
sptk::CParamparam (const char *paramName)
 Allows to set query parameter by name.
sptk::CParamparam (uint32_t paramIndex)
 Allows to set query parameter by parameter index.
sptk::CFieldoperator[] (const char *fieldName)
 Returns query field by the field name.
sptk::CFieldoperator[] (uint32_t fieldIndex)
 Returns query field by field index.
 operator sptk::CQuery & ()
 Returns managed query object.


Detailed Description

Service class to use with CQuery.

Manages the external CQuery object to make sure that it's automatically closed when it leaves the scope.


Constructor & Destructor Documentation

sptk::CQueryGuard::CQueryGuard ( sptk::CQuery query  )  [inline]

Constructor.

Parameters:
query sptk::CQuery, query to manage


Member Function Documentation

sptk::CField& sptk::CQueryGuard::operator[] ( uint32_t  fieldIndex  )  [inline]

Returns query field by field index.

Parameters:
fieldIndex uint32_t, field index

sptk::CField& sptk::CQueryGuard::operator[] ( const char *  fieldName  )  [inline]

Returns query field by the field name.

Parameters:
fieldName const char*, field name

sptk::CParam& sptk::CQueryGuard::param ( uint32_t  paramIndex  )  [inline]

Allows to set query parameter by parameter index.

Parameters:
paramIndex uint32_t, parameter index

References sptk::CQuery::param().

sptk::CParam& sptk::CQueryGuard::param ( const char *  paramName  )  [inline]

Allows to set query parameter by name.

Parameters:
paramName const char*, parameter name

References sptk::CQuery::param().


The documentation for this class was generated from the following file:

Mon Mar 5 11:56:08 2012: SPTK 3.5.7