#include <coldata.h>
Collaboration diagram for mysqlpp::ColData_Tmpl< Str >:
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. |
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.