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

mysqlpp::SQLQuery Class Reference

The base class for mysqlpp::Query. More...

#include <sql_query.h>

Inheritance diagram for mysqlpp::SQLQuery:

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

Collaboration graph
[legend]
List of all members.

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.


Detailed Description

The base class for mysqlpp::Query.

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().


Member Function Documentation

void mysqlpp::SQLQuery::reset  
 

Reset the query object so that it can be reused.

This erases the query string and the contents of the parameterized query element list.


Member Data Documentation

SQLQueryParms mysqlpp::SQLQuery::def
 

The default template parameters.

Used for filling in parameterized queries.


The documentation for this class was generated from the following files:
Generated on Thu May 5 05:31:34 2005 for MySQL++ by doxygen1.2.18