MySQL++  3.3.0
Public Types | Public Member Functions | Friends | List of all members
mysqlpp::SQLQueryParms Class Reference

This class holds the parameter values for filling template queries.
More...

#include <qparms.h>

Inheritance diagram for mysqlpp::SQLQueryParms:
Inheritance graph
[legend]
Collaboration diagram for mysqlpp::SQLQueryParms:
Collaboration graph
[legend]

Public Types

typedef const SQLTypeAdaptersta
 Abbreviation so some of the declarations below don't span many lines.
 

Public Member Functions

 SQLQueryParms ()
 Default constructor.
 
 SQLQueryParms (Query *p)
 Create object. More...
 
bool bound ()
 Returns true if we are bound to a query object. More...
 
void clear ()
 Clears the list.
 
size_t escape_string (std::string *ps, const char *original=0, size_t length=0) const
 Indirect access to Query::escape_string()
 
size_t escape_string (char *escaped, const char *original, size_t length) const
 Indirect access to Query::escape_string() More...
 
SQLTypeAdapteroperator[] (size_type n)
 Access element number n.
 
const SQLTypeAdapteroperator[] (size_type n) const
 Access element number n.
 
SQLTypeAdapteroperator[] (const char *str)
 Access the value of the element with a key of str.
 
const SQLTypeAdapteroperator[] (const char *str) const
 Access the value of the element with a key of str.
 
SQLQueryParmsoperator<< (const SQLTypeAdapter &str)
 Adds an element to the list.
 
SQLQueryParmsoperator+= (const SQLTypeAdapter &str)
 Adds an element to the list.
 
SQLQueryParms operator+ (const SQLQueryParms &other) const
 Build a composite of two parameter lists. More...
 
void set (sta a, sta b, sta c, sta d, sta e, sta f, sta g, sta h, sta i, sta j, sta k, sta l)
 Set the template query parameters. More...
 

Friends

class Query
 

Detailed Description

This class holds the parameter values for filling template queries.

Constructor & Destructor Documentation

◆ SQLQueryParms()

mysqlpp::SQLQueryParms::SQLQueryParms ( Query p)
inline

Create object.

Parameters
ppointer to the query object these parameters are tied to

Member Function Documentation

◆ bound()

bool mysqlpp::SQLQueryParms::bound ( )
inline

Returns true if we are bound to a query object.

Basically, this tells you which of the two ctors were called.

◆ escape_string()

size_t mysqlpp::SQLQueryParms::escape_string ( char *  escaped,
const char *  original,
size_t  length 
) const

Indirect access to Query::escape_string()

See also
escape_string(std::string*, const char*, size_t)
Query::escape_string(const char*, const char*, size_t)

◆ operator+()

SQLQueryParms mysqlpp::SQLQueryParms::operator+ ( const SQLQueryParms other) const

Build a composite of two parameter lists.

If this list is (a, b) and other is (c, d, e, f, g), then the returned list will be (a, b, e, f, g). That is, all of this list's parameters are in the returned list, plus any from the other list that are in positions beyond what exist in this list.

If the two lists are the same length or this list is longer than the other list, a copy of this list is returned.

◆ set()

void mysqlpp::SQLQueryParms::set ( sta  a,
sta  b,
sta  c,
sta  d,
sta  e,
sta  f,
sta  g,
sta  h,
sta  i,
sta  j,
sta  k,
sta  l 
)
inline

Set the template query parameters.

Sets parameter 0 to a, parameter 1 to b, etc. There are overloaded versions of this function that take anywhere from one to a dozen parameters.


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