#include <sql_query.h>
Inheritance diagram for mysqlpp::SQLQuery:
Public Methods | |
void | reset () |
Reset the query object so that it can be reused. | |
Public Attributes | |
SQLQueryParms | def |
The default template parameters. | |
Protected Methods | |
void | proc (SQLQueryParms &p) |
Process a parameterized query list. |
One uses an object of this class to form queries that can be sent to the database server via the mysqlpp::Connection object.
This class is subclassed from std::stringstream
. This means that you can form a SQL query using C++ stream idioms without having to create your own stringstream
object and then dump that into the query object. And of course, it gets you all the benefits of C++ streams, such as type safety, which sprintf()
and such do not offer. Although you can read from this object as you would any other stream, this is not recommended. It may fail in strange ways, and there is no support offered if you break it by doing so.
If you seek within the stream in any way, be sure to reset the stream pointer to the end before calling any of the SQLQuery-specific methods except for error() and success().
|
Reset the query object so that it can be reused. This erases the query string and the contents of the parameterized query element list. |
|
The default template parameters. Used for filling in parameterized queries. |