Declares the Query stream manipulators and operators. More...
Go to the source code of this file.
Functions | |
SQLQueryParms & | mysqlpp::operator<< (escape_type2 p, SQLTypeAdapter &in) |
Inserts a SQLTypeAdapter into a stream, escaping special SQL characters. More... | |
ostream & | mysqlpp::operator<< (escape_type1 o, const SQLTypeAdapter &in) |
Inserts anything that can be converted to SQLTypeAdapter into a stream, escaping special SQL characters as needed. | |
Declares the Query stream manipulators and operators.
These manipulators let you automatically quote elements or escape characters that are special in SQL when inserting them into a Query stream. They make it easier to build syntactically-correct SQL queries.
This file also includes special operator<<
definitions for a few key MySQL++ data types, since we know when to do automatic quoting and escaping for these types. This only works with Query streams, not regular std::ostreams, since we're only concerned with making correct SQL, not with presentation matters.
test/test_manip.cpp exercises the mechanisms defined here.