#include <qparms.h>
Collaboration diagram for mysqlpp::SQLParseElement:
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 |
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.
mysqlpp::SQLParseElement::SQLParseElement | ( | std::string | b, | |
char | o, | |||
signed char | n | |||
) | [inline] |
Create object.
b | the 'before' value | |
o | the 'option' value | |
n | the 'num' value |