#include <QueryParameterList.h>
Public Types | |
using | iterator = CParamVector::iterator |
using | const_iterator = CParamVector::const_iterator |
Public Member Functions | |
void | clear () |
SQueryParameter | find (const String ¶mName) |
void | remove (size_t ndx) |
QueryParameter & | operator[] (size_t index) const |
QueryParameter & | operator[] (const String ¶mName) const |
size_t | size () const |
void | enumerate (CParamVector ¶ms) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
Protected Member Functions | |
void | add (const SQueryParameter &item) |
Friends | |
class | Query |
Query parameters list.
Has internal index to speed up the parameter search by name.
using sptk::QueryParameterList::const_iterator = CParamVector::const_iterator |
Query parameter const iterator
using sptk::QueryParameterList::iterator = CParamVector::iterator |
Query parameter iterator
|
protected |
Adds a parameter to the list
|
inline |
First parameter iterator
|
inline |
First parameter const iterator
void sptk::QueryParameterList::clear | ( | ) |
Removes all the parameters from the list
Releases any allocated resources
|
inline |
End iterator
|
inline |
End const iterator
void sptk::QueryParameterList::enumerate | ( | CParamVector & | params | ) | const |
Returns the parameter pointers
A parameter is included for every parameter position in the query.
params | parameters vector |
Referenced by sptk::DatabaseStatement< Connection, Statement >::enumerateParams().
SQueryParameter sptk::QueryParameterList::find | ( | const String & | paramName | ) |
Returns parameter by name
If the parameter isn't found, returns 0
paramName | parameter name |
QueryParameter & sptk::QueryParameterList::operator[] | ( | const String & | paramName | ) | const |
Parameter access by name
paramName | parameter name |
QueryParameter & sptk::QueryParameterList::operator[] | ( | size_t | index | ) | const |
Parameter access by index
index | parameter index |
void sptk::QueryParameterList::remove | ( | size_t | ndx | ) |
Removes a parameter from the list and from the memory.
ndx | parameter index in the list |
size_t sptk::QueryParameterList::size | ( | ) | const |
Returns parameter count