MySQL++ Reference Manual

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# mysqlpp::SQLParseElement Struct Reference

Used within Query to hold elements for parameterized queries. More...

`#include <qparms.h>`

Collaboration diagram for mysqlpp::SQLParseElement:

[legend]
List of all members.

## Public Member Functions
| SQLParseElement (std::string b, char o, signed char n)
| Create object.
## Public Attributes
std::string | before
| string inserted before the parameter
char | option
| the parameter option, or blank if none
signed char | num
| the parameter position to use

## Detailed Description

Used within Query to hold elements for parameterized queries.

Each element has three parts:

The concept behind the `before` variable needs a little explaining. When a template query is parsed, each parameter is parsed into one of these SQLParseElement objects, but the non-parameter parts of the template also have to be stored somewhere. MySQL++ chooses to attach the text leading up to a parameter to that parameter. So, the `before` string is simply the text copied literally into the finished query before we insert a value for the parameter.

The `option` character is currently one of 'q', 'Q', 'r', 'R' or ' '. See the "Template Queries" chapter in the user manual for details.

The position value (`num`) allows a template query to have its parameters in a different order than in the Query method call. An example of how this can be helpful is in the "Template Queries" chapter of the user manual.

## Constructor & Destructor Documentation

mysqlpp::SQLParseElement::SQLParseElement | ( | std::string | b,
|  | char | o,
|  | signed char | n |
| ) |  |  | `[inline]`

Create object.

Parameters:

  | b | the 'before' value
  | o | the 'option' value
  | n | the 'num' value

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

- qparms.h