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

mysqlpp::ColData_Tmpl< Str > Class Template Reference

Base class for auto-converting column data. Do not use directly. More...

#include <coldata.h>

Collaboration diagram for mysqlpp::ColData_Tmpl< Str >:

Collaboration graph
[legend]
List of all members.

Public Methods

mysql_type_info type ()
 Get this object's current MySQL type.

bool quote_q () const
 Returns true if data of this type should be quoted, false otherwise.

bool escape_q () const
 Returns true if data of this type should be escaped, false otherwise.


Detailed Description

template<class Str>
class mysqlpp::ColData_Tmpl< Str >

Base class for auto-converting column data. Do not use directly.

A smart string. It will automatically convert itself to any of the basic C types.

When used with binary operators it will automatically convert itself to the type used on the other side of the operator if it is a basic type. However, be careful when using it like this:

ColData("12.86") + 2 

will return 14 because 2 is an integer. To get the result you wanted, you must say:

ColData("12.86") + 2.0 

If this type of thing scares you, define the micro NO_BINARY_OPERS to disable this behavior.

This class also has some basic information about the type of data stored in it.

Do not use this class directly. Use the typedef ColData or MutableColData instead.


The documentation for this class was generated from the following file:
Generated on Sat Apr 30 07:30:44 2005 for MySQL++ by doxygen1.2.18