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

# manip.h File Reference

Declares `std::ostream` manipulators useful with SQL syntax. More...

`#include "defs.h"`
`#include "datetime.h"`
`#include "myset.h"`
`#include "sql_string.h"`
`#include <mysql.h>`
`#include <iostream>`

Include dependency graph for manip.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | mysqlpp

## Detailed Description

Declares `std::ostream` manipulators useful with SQL syntax.

These manipulators let you automatically quote elements or escape characters that are special in SQL when inserting them into an `std::ostream`. Since mysqlpp::Query is an ostream, these manipulators make it easier to build syntactically-correct SQL queries.

This file also includes `operator<<` definitions for ColData_Tmpl, one of the MySQL++ string-like classes. When inserting such items into a stream, they are automatically quoted and escaped as necessary unless the global variable dont_quote_auto is set to true. These operators are smart enough to turn this behavior off when the stream is `cout` or `cerr`, however, since quoting and escaping are surely not required in that instance.