sptk2 logo
SPTK Home Page
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
sptk::QueryParameterList Class Reference

#include <QueryParameterList.h>

Public Types

using iterator = CParamVector::iterator
 
using const_iterator = CParamVector::const_iterator
 

Public Member Functions

void clear ()
 
SQueryParameter find (const String &paramName)
 
void remove (size_t ndx)
 
QueryParameteroperator[] (size_t index) const
 
QueryParameteroperator[] (const String &paramName) const
 
size_t size () const
 
void enumerate (CParamVector &params) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 

Protected Member Functions

void add (const SQueryParameter &item)
 

Friends

class Query
 

Detailed Description

Query parameters list.

Has internal index to speed up the parameter search by name.

See also
CQuery
CParam

Member Typedef Documentation

◆ const_iterator

using sptk::QueryParameterList::const_iterator = CParamVector::const_iterator

Query parameter const iterator

◆ iterator

using sptk::QueryParameterList::iterator = CParamVector::iterator

Query parameter iterator

Member Function Documentation

◆ add()

void sptk::QueryParameterList::add ( const SQueryParameter &  item)
protected

Adds a parameter to the list

◆ begin() [1/2]

iterator sptk::QueryParameterList::begin ( )
inline

First parameter iterator

◆ begin() [2/2]

const_iterator sptk::QueryParameterList::begin ( ) const
inline

First parameter const iterator

◆ clear()

void sptk::QueryParameterList::clear ( )

Removes all the parameters from the list

Releases any allocated resources

◆ end() [1/2]

iterator sptk::QueryParameterList::end ( )
inline

End iterator

◆ end() [2/2]

const_iterator sptk::QueryParameterList::end ( ) const
inline

End const iterator

◆ enumerate()

void sptk::QueryParameterList::enumerate ( CParamVector params) const

Returns the parameter pointers

A parameter is included for every parameter position in the query.

Parameters
paramsparameters vector

Referenced by sptk::DatabaseStatement< Connection, Statement >::enumerateParams().

◆ find()

SQueryParameter sptk::QueryParameterList::find ( const String paramName)

Returns parameter by name

If the parameter isn't found, returns 0

Parameters
paramNameparameter name
Returns
parameter pointer, or 0 if not found

◆ operator[]() [1/2]

QueryParameter & sptk::QueryParameterList::operator[] ( const String paramName) const

Parameter access by name

Parameters
paramNameparameter name

◆ operator[]() [2/2]

QueryParameter & sptk::QueryParameterList::operator[] ( size_t  index) const

Parameter access by index

Parameters
indexparameter index

◆ remove()

void sptk::QueryParameterList::remove ( size_t  ndx)

Removes a parameter from the list and from the memory.

Parameters
ndxparameter index in the list

◆ size()

size_t sptk::QueryParameterList::size ( ) const

Returns parameter count


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

Fri Oct 14 2022 09:58:44: SPTK 5.4.1