Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members

# query.h File Reference

Defines the user-facing Query class, which is used to build up SQL queries, and execute them. More...

`#include "defs.h"`
`#include "coldata.h"`
`#include "connection.h"`
`#include "result.h"`
`#include "sql_query.h"`
`#include <mysql.h>`

Include dependency graph for query.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | mysqlpp
## Defines
#define | mysql_query_define1(RETURN, FUNC)
| Used to define many similar member functions in class Query.
#define | mysql_query_define2(FUNC)
| Used to define many similar member functions in class Query.

## Detailed Description

Defines the user-facing Query class, which is used to build up SQL queries, and execute them.

This class is used in one of two main fashions.

First, it has several member functions that can build specific query types. For instance, insert() allows you to build an INSERT statement for a Specialized SQL Structure.

Second, one of its base classes is std::stringstream, so you may build an SQL query in the same way as you'd build up any other string with C++ streams.

One does not generally create Query objects directly. Instead, call mysqlpp::Connection::query() to get one tied to that connection.

## Define Documentation

#define mysql_query_define1 | ( | RETURN,
|  | FUNC |  | ) |

| Value:
    RETURN FUNC (const char* str); \
      RETURN FUNC (parms &p);\
      mysql_query_define0(RETURN,FUNC) \
Used to define many similar member functions in class Query.

#define mysql_query_define2 | ( | FUNC |  | ) |

| Value:
    template <class T1> void FUNC (T1 &con, const char* str); \
      template <class T1> void FUNC (T1 &con, parms &p, query_reset r = RESET_QUERY);\
      template <class T1> void FUNC (T1 &con, ss a)\
            {FUNC (con, parms() << a);}\
      template <class T1> void FUNC (T1 &con, ss a, ss b)\
            {FUNC (con, parms() << a << b);}\
      template <class T1> void FUNC (T1 &con, ss a, ss b, ss c)\
            {FUNC (con, parms() << a << b << c);}\
      template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d)\
            {FUNC (con, parms() << a << b << c << d);}\
      template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e)\
            {FUNC (con, parms() << a << b << c << d << e);} \
      template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e, ss f)\
            {FUNC (con, parms() << a << b << c << d << e << f);}\
      template <class T1> void FUNC (T1 &con,ss a,ss b,ss c,ss d,ss e,ss f,ss g)\
            {FUNC (con, parms() << a << b << c << d << e << f << g);}\
      template <class T1> void FUNC (T1 &con,ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h)\
            {FUNC (con, parms() << a << b << c << d << e << f << g << h);}\
      template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h, ss i)\
            {FUNC (con, parms() << a << b << c << d << e << f << g << h << i);}\
      template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j)\
            {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j);}\
      template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k)\
            {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k);}\
      template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k,\
                               ss l)\
            {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k <<l);}\
Used to define many similar member functions in class Query.