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

# mysqlpp Namespace Reference

## Compounds
class | BadConversion
| Exception thrown when a bad type conversion is attempted. More...
class | BadFieldName
| Exception thrown when a requested named field doesn't exist. More...
class | BadNullConversion
| Exception thrown when you attempt to convert a SQL null to an incompatible type. More...
class | BadQuery
| Exception thrown when MySQL encounters a problem while processing your query. More...
class | ColData_Tmpl
| Template for string data that can convert itself to any standard C data type. More...
class | Connection
| Manages the connection to the MySQL database. More...
class | const_string
| Wrapper for `const char*` to make it behave in a way more useful to MySQL++. More...
class | const_subscript_container
| A base class that one derives from to become a random access container, which can be accessed with subscript notation. More...
struct | cstr_equal_to
| Function object that returns true if one const char* is equal to another. More...
struct | cstr_greater
| Function object that returns true if one const char* is lexically "greater than" another. More...
struct | cstr_greater_equal
| Function object that returns true if one const char* is lexically "greater than or equal to" another. More...
struct | cstr_less
| Function object that returns true if one const char* is lexically "less than" another. More...
struct | cstr_less_equal
| Function object that returns true if one const char* is lexically "less than or equal to" another. More...
struct | cstr_not_equal_to
| Function object that returns true if one const char* is not equal to another. More...
struct | Date
| Holds MySQL dates. More...
struct | DateTime
| A combination of the Date and Time classes for holding MySQL DateTimes. More...
struct | DTbase
| Base class template for MySQL++ date and time classes. More...
struct | equal_list_b
| Same as equal_list_ba, plus the option to have some elements of the equals clause suppressed. More...
struct | equal_list_ba
| Holds two lists of items, typically used to construct a SQL "equals clause". More...
class | FieldNames
| Holds a list of SQL field names. More...
class | Fields
| A container similar to `std::vector` for holding mysqlpp::Field records. More...
class | FieldTypes
| A vector of SQL field types. More...
struct | mysql_date
| Base class of Date. More...
struct | mysql_dt_base
| Base class for mysql_date and mysql_time. More...
struct | mysql_time
| Base class of Time. More...
class | mysql_type_info
| Holds basic type information for ColData. More...
class | MysqlCmp
| Template for making function objects that can compare something against a Row element. More...
class | MysqlCmpCStr
| const char* specialization of MysqlCmp More...
class | Null
| Class for holding data from a SQL column with the NULL attribute. More...
class | null_type
| The type of the global mysqlpp::null object. More...
struct | NullisBlank
| Class for objects that define SQL null as a blank C string. More...
struct | NullisNull
| Class for objects that define SQL null in terms of MySQL++'s null_type. More...
struct | NullisZero
| Class for objects that define SQL null as 0. More...
class | Query
| A class for building and executing SQL queries. More...
class | ResNSel
| Holds the information on the success of queries that don't return any results. More...
class | Result
| This class manages SQL result sets. More...
class | ResUse
| A basic result set class, for use with "use" queries. More...
class | Row
| Manages rows from a result set. More...
class | RowTemplate
| Base class for class Row. More...
class | Set
| A special std::set derivative for holding MySQL data sets. More...
struct | SQLParseElement
| Used within SQLQuery to hold elements for parameterized queries. More...
class | SQLQuery
| The base class for mysqlpp::Query. More...
class | SQLQueryNEParms
| Exception thrown when not enough parameters are provided. More...
class | SQLQueryParms
| This class holds the parameter values for filling template queries. More...
class | SQLString
| A specialized `std::string` that will convert from any valid MySQL type. More...
class | subscript_iterator
| Iterator that can be subscripted. More...
struct | Time
| Holds MySQL times. More...
class | tiny_int
| Class for holding an SQL `tiny_int` object. More...
struct | value_list_b
| Same as value_list_ba, plus the option to have some elements of the list suppressed. More...
struct | value_list_ba
| Holds a list of items, typically used to construct a SQL "value list". More...
## Typedefs
typedef ColData_Tmpl< const_string > | ColData
| The type that is returned by constant rows.
typedef ColData_Tmpl< std::string > | MutableColData
| The type that is returned by mutable rows.
typedef std::binary_function< const char *, const char *, bool > | bin_char_pred
| Base class for the other predicate types defined in compare.h.
typedef unsigned long long | ulonglong
| unsigned 64-bit integer type for GCC-based systems
typedef long long | longlong
| signed 64-bit integer type for GCC-based systems
typedef MYSQL_FIELD | Field
| Alias for MYSQL_FIELD.
typedef const char | cchar
| Contraction for 'const char*'.
typedef unsigned int | uint
| Contraction for 'unsigned int'.
## Enumerations
enum | sql_cmp_type
| Appears to be unused! Remove?
enum | quote_type0 { quote }
enum | quote_only_type0 { quote_only }
enum | quote_double_only_type0 { quote_double_only }
enum | escape_type0
enum | do_nothing_type0 { do_nothing }
enum | ignore_type0 { ignore }
enum | query_reset
| Used for indicating whether a query object should auto-reset or not.
## Functions
template<class BinaryPred, class CmpType> MysqlCmp< BinaryPred, CmpType > | mysql_cmp (uint i, const BinaryPred &func, const CmpType &cmp2)
| Template for function objects that compare any two objects, as long as they can be converted to SQLString.
template<class BinaryPred> MysqlCmpCStr< BinaryPred > | mysql_cmp_cstr (uint i, const BinaryPred &func, const char *cmp2)
| Template for function objects that compare any two things that can be converted to `const char*`.
std::ostream & | operator<< (std::ostream &o, const const_string &str)
| Inserts a const_string into a C++ stream.
int | compare (const const_string &lhs, const const_string &rhs)
| Calls lhs.compare(), passing rhs.
bool | operator== (const_string &lhs, const_string &rhs)
| Returns true if lhs is the same as rhs.
bool | operator!= (const_string &lhs, const_string &rhs)
| Returns true if lhs is not the same as rhs.
bool | operator< (const_string &lhs, const_string &rhs)
| Returns true if lhs is lexically less than rhs.
bool | operator<= (const_string &lhs, const_string &rhs)
| Returns true if lhs is lexically less or equal to rhs.
bool | operator> (const_string &lhs, const_string &rhs)
| Returns true if lhs is lexically greater than rhs.
bool | operator>= (const_string &lhs, const_string &rhs)
| Returns true if lhs is lexically greater than or equal to rhs.
std::ostream & | operator<< (std::ostream &s, const Date &d)
| Inserts a Date object into a C++ stream in a MySQL-compatible format.
std::ostream & | operator<< (std::ostream &s, const Time &d)
| Inserts a Time object into a C++ stream in a MySQL-compatible format.
std::ostream & | operator<< (std::ostream &s, const DateTime &d)
| Inserts a DateTime object into a C++ stream in a MySQL-compatible format.
SQLQueryParms & | operator<< (quote_type2 p, SQLString &in)
| Inserts a SQLString into a stream, quoted and escaped.
template<> ostream & | operator<< (quote_type1 o, const string &in)
| Inserts a C++ string into a stream, quoted and escaped.
template<> ostream & | operator<< (quote_type1 o, const char *const &in)
| Inserts a C string into a stream, quoted and escaped.
template<class Str> ostream & | _manip (quote_type1 o, const ColData_Tmpl< Str > &in)
| Utility function used by operator<<(quote_type1, ColData).
template<> ostream & | operator<< (quote_type1 o, const ColData_Tmpl< string > &in)
| Inserts a ColData into a stream, quoted and escaped.
template<> ostream & | operator<< (quote_type1 o, const ColData_Tmpl< const_string > &in)
| Inserts a ColData with const string into a stream, quoted and escaped.
ostream & | operator<< (ostream &o, const ColData_Tmpl< string > &in)
| Inserts a ColData into a stream.
ostream & | operator<< (ostream &o, const ColData_Tmpl< const_string > &in)
| Inserts a ColData with const string into a stream.
SQLQuery & | operator<< (SQLQuery &o, const ColData_Tmpl< string > &in)
| Insert a ColData into a SQLQuery.
SQLQuery & | operator<< (SQLQuery &o, const ColData_Tmpl< const_string > &in)
| Insert a ColData with const string into a SQLQuery.
SQLQueryParms & | operator<< (quote_only_type2 p, SQLString &in)
| Inserts a SQLString into a stream, quoting it unless it's data that needs no quoting.
template<> ostream & | operator<< (quote_only_type1 o, const ColData_Tmpl< string > &in)
| Inserts a ColData into a stream, quoted.
template<> ostream & | operator<< (quote_only_type1 o, const ColData_Tmpl< const_string > &in)
| Inserts a ColData with const string into a stream, quoted.
SQLQueryParms & | operator<< (quote_double_only_type2 p, SQLString &in)
| Inserts a SQLString into a stream, double-quoting it (") unless it's data that needs no quoting.
template<> ostream & | operator<< (quote_double_only_type1 o, const ColData_Tmpl< string > &in)
| Inserts a ColData into a stream, double-quoted (").
template<> ostream & | operator<< (quote_double_only_type1 o, const ColData_Tmpl< const_string > &in)
| Inserts a ColData with const string into a stream, double-quoted (").
SQLQueryParms & | operator<< (escape_type2 p, SQLString &in)
| Inserts a SQLString into a stream, escaping special SQL characters.
template<> std::ostream & | operator<< (escape_type1 o, const std::string &in)
| Inserts a C++ string into a stream, escaping special SQL characters.
template<> ostream & | operator<< (escape_type1 o, const char *const &in)
| Inserts a C string into a stream, escaping special SQL characters.
template<class Str> ostream & | _manip (escape_type1 o, const ColData_Tmpl< Str > &in)
| Utility function used by operator<<(escape_type1, ColData).
template<> std::ostream & | operator<< (escape_type1 o, const ColData_Tmpl< std::string > &in)
| Inserts a ColData into a stream, escaping special SQL characters.
template<> std::ostream & | operator<< (escape_type1 o, const ColData_Tmpl< const_string > &in)
| Inserts a ColData with const string into a stream, escaping special SQL characters.
template<class T> std::ostream & | operator<< (escape_type1 o, const T &in)
| Inserts any type T into a stream that has an operator<< defined for it.
template<> std::ostream & | operator<< (escape_type1 o, char *const &in)
| Inserts a C string into a stream, escaping special SQL characters.
template<class Container> std::ostream & | operator<< (std::ostream &s, const Set< Container > &d)
| Inserts a Set object into a C++ stream.
template<class Type, class Behavior> std::ostream & | operator<< (std::ostream &o, const Null< Type, Behavior > &n)
| Inserts null-able data into a C++ stream if it is not actually null. Otherwise, insert something appropriate for null data.
void | swap (ResUse &x, ResUse &y)
| Swaps two ResUse objects.
void | swap (Result &x, Result &y)
| Swaps two Result objects.
template<class Strng, class T> Strng | stream2string (const T &object)
| Converts a stream-able object to any type that can be initialized from an `std::string`.
void | strip (std::string &s)
| Strips blanks at left and right ends.
void | escape_string (std::string &s)
| C++ equivalent of mysql_escape_string().
void | str_to_upr (std::string &s)
| Changes case of string to upper.
void | str_to_lwr (std::string &s)
| Changes case of string to lower.
void | strip_all_blanks (std::string &s)
| Removes all blanks.
void | strip_all_non_num (std::string &s)
| Removes all non-numerics.
bool | operator== (const mysql_type_info &a, const mysql_type_info &b)
| Returns true if two mysql_type_info objects are equal.
bool | operator!= (const mysql_type_info &a, const mysql_type_info &b)
| Returns true if two mysql_type_info objects are not equal.
bool | operator== (const std::type_info &a, const mysql_type_info &b)
| Returns true if a given mysql_type_info object is equal to a given C++ type_info object.
bool | operator!= (const std::type_info &a, const mysql_type_info &b)
| Returns true if a given mysql_type_info object is not equal to a given C++ type_info object.
bool | operator== (const mysql_type_info &a, const std::type_info &b)
| Returns true if a given mysql_type_info object is equal to a given C++ type_info object.
bool | operator!= (const mysql_type_info &a, const std::type_info &b)
| Returns true if a given mysql_type_info object is not equal to a given C++ type_info object.
void | create_vector (int size, std::vector< bool > &v, bool t0, bool t1, bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool ta, bool tb, bool tc)
| Create a vector of bool with the given arguments as values.
template<class Container> void | create_vector (const Container &c, std::vector< bool > &v, std::string s0, std::string s1, std::string s2, std::string s3, std::string s4, std::string s5, std::string s6, std::string s7, std::string s8, std::string s9, std::string sa, std::string sb, std::string sc)
| Create a vector of bool using a list of named fields.
template<class Seq1, class Seq2, class Manip> std::ostream & | operator<< (std::ostream &o, const equal_list_ba< Seq1, Seq2, Manip > &el)
| Inserts an equal_list_ba into an std::ostream.
template<class Seq1, class Seq2, class Manip> std::ostream & | operator<< (std::ostream &o, const equal_list_b< Seq1, Seq2, Manip > &el)
| Same as operator<< for equal_list_ba, plus the option to suppress insertion of some list items in the stream.
template<class Seq, class Manip> std::ostream & | operator<< (std::ostream &o, const value_list_ba< Seq, Manip > &cl)
| Inserts a value_list_ba into an std::ostream.
template<class Seq, class Manip> std::ostream & | operator<< (std::ostream &o, const value_list_b< Seq, Manip > &cl)
| Same as operator<< for value_list_ba, plus the option to suppress insertion of some list items in the stream.
template<class Seq> value_list_ba< Seq, do_nothing_type0 > | value_list (const Seq &s, const char *d=",")
| Constructs a value_list_ba.
template<class Seq, class Manip> value_list_ba< Seq, Manip > | value_list (const Seq &s, const char *d, Manip m)
| Constructs a value_list_ba.
template<class Seq, class Manip> value_list_b< Seq, Manip > | value_list (const Seq &s, const char *d, Manip m, const std::vector< bool > &vb)
| Constructs a value_list_b (sparse value list).
template<class Seq, class Manip> value_list_b< Seq, Manip > | value_list (const Seq &s, const char *d, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a value_list_b (sparse value list).
template<class Seq> value_list_b< Seq, do_nothing_type0 > | value_list (const Seq &s, const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a sparse value list.
template<class Seq> value_list_b< Seq, do_nothing_type0 > | value_list (const Seq &s, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a sparse value list.
template<class Seq1, class Seq2> equal_list_ba< Seq1, Seq2, do_nothing_type0 > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d=",", const char *e="=")
| Constructs an equal_list_ba.
template<class Seq1, class Seq2, class Manip> equal_list_ba< Seq1, Seq2, Manip > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m)
| Constructs an equal_list_ba.
template<class Seq1, class Seq2, class Manip> equal_list_b< Seq1, Seq2, Manip > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m, const std::vector< bool > &vb)
| Constructs a equal_list_b (sparse equal list).
template<class Seq1, class Seq2, class Manip> equal_list_b< Seq1, Seq2, Manip > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a equal_list_b (sparse equal list).
template<class Seq1, class Seq2> equal_list_b< Seq1, Seq2, do_nothing_type0 > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a equal_list_b (sparse equal list).
template<class Seq1, class Seq2> equal_list_b< Seq1, Seq2, do_nothing_type0 > | equal_list (const Seq1 &s1, const Seq2 &s2, const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a equal_list_b (sparse equal list).
template<class Seq1, class Seq2> equal_list_b< Seq1, Seq2, do_nothing_type0 > | equal_list (const Seq1 &s1, const Seq2 &s2, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false)
| Constructs a equal_list_b (sparse equal list).
## Variables
const bool | use_exceptions = true
| Alias for 'true', to make code requesting exceptions more readable.
bool | dont_quote_auto = false
| Set to true if you want to suppress automatic quoting.
const null_type | null = null_type()
| Global 'null' instance. Use wherever you need a SQL null. (As opposed to a C++ language null pointer or null character.).

## Detailed Description

All global symbols in MySQL++ are in namespace mysqlpp. This is needed because many symbols are rather generic (e.g. Row, Query...), so there is a serious danger of conflicts.

## Enumeration Type Documentation

enum mysqlpp::do_nothing_type0

  | The 'do_nothing' manipulator. Does exactly what it says: nothing. Used as a dummy manipulator when you are required to use some manipulator but don't want anything to be done to the following item. When used with SQLQueryParms it will make sure that it does not get formatted in any way, overriding any setting set by the template query. Enumeration values:
  do_nothing | insert into a std::ostream to override manipulation of next item

enum mysqlpp::escape_type0

| The 'escape' manipulator. Calls mysql_escape_string() in the MySQL C API on the following argument to prevent any special SQL characters from being interpreted.

enum mysqlpp::ignore_type0

  | The 'ignore' manipulator. Only valid when used with SQLQueryParms. It's a dummy manipulator like the do_nothing manipulator, except that it will not override formatting set by the template query. It is simply ignored. Enumeration values:
  ignore | insert into a std::ostream as a dummy manipulator

enum mysqlpp::quote_double_only_type0

  | The 'double_quote_only' manipulator. Similar to quote_only manipulator, except that it uses double quotes instead of single quotes. Enumeration values:
  quote_double_only | insert into a std::ostream to double-quote next item

enum mysqlpp::quote_only_type0

  | The 'quote_only' manipulator. Similar to quote manipulator, except that it doesn't escape special SQL characters. Enumeration values:
  quote_only | insert into a std::ostream to single-quote next item

enum mysqlpp::quote_type0

  | The standard 'quote' manipulator. Insert this into a stream to put single quotes around the next item in the stream, and escape characters within it that are 'special' in SQL. This is the most generally useful of the manipulators. Enumeration values:
  quote | insert into a std::ostream to single-quote and escape next item

## Function Documentation

template<class Container>
void mysqlpp::create_vector | ( | const Container & | c,
|  | std::vector< bool > & | v,
|  | std::string | s0,
|  | std::string | s1,
|  | std::string | s2,
|  | std::string | s3,
|  | std::string | s4,
|  | std::string | s5,
|  | std::string | s6,
|  | std::string | s7,
|  | std::string | s8,
|  | std::string | s9,
|  | std::string | sa,
|  | std::string | sb,
|  | std::string | sc
| ) |

| Create a vector of bool using a list of named fields. This function is used with the ResUse and Result containers, which have a field_num() member function that maps a field name to its position number. So for each named field, we set the bool in the vector at the corresponding position to true. This function is used within the library to build the vector used in calling the vector form of Row::equal_list(), Row::value_list(), and Row::field_list(). See the "Harnessing SSQLS Internals" section of the user manual to see that feature at work.

void mysqlpp::create_vector | ( | int | size,
|  | std::vector< bool > & | v,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Create a vector of bool with the given arguments as values. This function takes up to 13 bools, with the size parameter controlling the actual number of parameters we pay attention to. This function is used within the library to build the vector used in calling the vector form of Row::equal_list(), Row::value_list(), and Row::field_list(). See the "Harnessing SSQLS Internals" section of the user manual to see that feature at work.

template<class Seq1, class Seq2>
equal_list_b<Seq1, Seq2, do_nothing_type0> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a equal_list_b (sparse equal list). Same as equal_list(Seq&, Seq&, const char*, bool, bool...) except that it doesn't take the const char* argument. It uses a comma for the delimiter. This form is useful for building simple equals lists, where no manipulators are necessary, and the default delimiter and equals symbol are suitable.

template<class Seq1, class Seq2>
equal_list_b<Seq1, Seq2, do_nothing_type0> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a equal_list_b (sparse equal list). Same as equal_list(Seq&, Seq&, const char*, const char*, bool, bool...) except that it doesn't take the second const char* argument. It uses " = " for the equals symbol.

template<class Seq1, class Seq2>
equal_list_b<Seq1, Seq2, do_nothing_type0> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d,
|  | const char * | e,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a equal_list_b (sparse equal list). Same as equal_list(Seq&, Seq&, const char*, const char*, Manip, bool, bool...) except that it doesn't take the Manip argument. It uses the do_nothing manipulator instead, meaning that none of the elements are escaped when being inserted into a stream.

template<class Seq1, class Seq2, class Manip>
equal_list_b<Seq1, Seq2, Manip> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d,
|  | const char * | e,
|  | Manip | m,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a equal_list_b (sparse equal list). Same as equal_list(Seq&, Seq&, const char*, const char*, Manip, vector<bool>&) except that it takes boolean parameters instead of a list of bools.

template<class Seq1, class Seq2, class Manip>
equal_list_b<Seq1, Seq2, Manip> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d,
|  | const char * | e,
|  | Manip | m,
|  | const std::vector< bool > & | vb
| ) |

| Constructs a equal_list_b (sparse equal list). Same as equal_list(Seq&, Seq&, const char*, const char*, Manip) except that you can pass a vector of bools. For each true item in that list, operator<< adds the corresponding item is put in the equal list. This lets you pass in sequences when you don't want all of the elements to be inserted into a stream.

template<class Seq1, class Seq2, class Manip>
equal_list_ba<Seq1, Seq2, Manip> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d,
|  | const char * | e,
|  | Manip | m
| ) |

| Constructs an equal_list_ba. Same as equal_list(Seq&, Seq&, const char*, const char*) except that it also lets you specify the manipulator. Use this version if the data must be escaped or quoted when being inserted into a stream.

template<class Seq1, class Seq2>
equal_list_ba<Seq1, Seq2, do_nothing_type0> equal_list | ( | const Seq1 & | s1,
|  | const Seq2 & | s2,
|  | const char * | d = ",",
|  | const char * | e = " = "
| ) |

  | Constructs an equal_list_ba. This function returns an equal list that uses the 'do_nothing' manipulator. That is, the items are not quoted or escaped in any way when inserted into a stream. See equal_list(Seq, Seq, const char*, const char*, Manip) if you need a different manipulator. The idea is for both lists to be of equal length because corresponding elements from each list are handled as pairs, but if one list is shorter than the other, the generated list will have that many elements. Parameters:
  s1 | items on the left side of the equals sign when the equal list is inserted into a stream
  s2 | items on the right side of the equals sign
  d | delimiter operator<< should place between pairs
  e | what operator<< should place between items in each pair; by default, an equals sign, as that is the primary use for this mechanism.

template<class BinaryPred, class CmpType>
MysqlCmp<BinaryPred, CmpType> mysql_cmp | ( | uint | i,
|  | const BinaryPred & | func,
|  | const CmpType & | cmp2
| ) |

  | Template for function objects that compare any two objects, as long as they can be converted to SQLString. This is a more generic form of mysql_cmp_cstr(), and is therefore less efficient. Use this form only when necessary. Parameters:
  i | field index number
  func | one of the functors in compare.h, or any compatible functor
  cmp2 | what to compare to

template<class BinaryPred>
MysqlCmpCStr<BinaryPred> mysql_cmp_cstr | ( | uint | i,
|  | const BinaryPred & | func,
|  | const char * | cmp2
| ) |

  | Template for function objects that compare any two things that can be converted to `const char*`. Parameters:
  i | field index number
  func | one of cstr_equal_to, cstr_not_equal_to, cstr_less, cstr_less_equal, cstr_less_equal, or cstr_less_equal.
  cmp2 | what to compare to
See also: mysql_cmp()

template<class Seq, class Manip>
std::ostream& operator<< | ( | std::ostream & | o,
|  | const value_list_b< Seq, Manip > & | cl
| ) |

| Same as operator<< for value_list_ba, plus the option to suppress insertion of some list items in the stream. See value_list_b's documentation for examples of how this works.

template<class Seq, class Manip>
std::ostream& operator<< | ( | std::ostream & | o,
|  | const value_list_ba< Seq, Manip > & | cl
| ) |

| Inserts a value_list_ba into an std::ostream. Given a list (a, b) and a delimiter D, this operator will insert "aDb" into the stream. See value_list_ba's documentation for concrete examples. See also: value_list()

template<class Seq1, class Seq2, class Manip>
std::ostream& operator<< | ( | std::ostream & | o,
|  | const equal_list_b< Seq1, Seq2, Manip > & | el
| ) |

| Same as operator<< for equal_list_ba, plus the option to suppress insertion of some list items in the stream. See equal_list_b's documentation for examples of how this works.

template<class Seq1, class Seq2, class Manip>
std::ostream& operator<< | ( | std::ostream & | o,
|  | const equal_list_ba< Seq1, Seq2, Manip > & | el
| ) |

| Inserts an equal_list_ba into an std::ostream. Given two lists (a, b) and (c, d), a delimiter D, and an equals symbol E, this operator will insert "aEcDbEd" into the stream. See equal_list_ba's documentation for concrete examples. See also: equal_list()

template<>
std::ostream& operator<< | ( | escape_type1 | o,
|  | char *const & | in
| ) | `[inline]`

| Inserts a C string into a stream, escaping special SQL characters. This version exists solely to handle constness problems. We force everything to the completely-const version: operator<<(escape_type1, const char* const&).

template<class T>
std::ostream& operator<< | ( | escape_type1 | o,
|  | const T & | in
| ) | `[inline]`

| Inserts any type T into a stream that has an operator<< defined for it. Does not actually escape that data! Use one of the other forms of operator<< for the escape manipulator if you need escaping. This template exists to catch cases like inserting an `int` after the escape manipulator: you don't actually want escaping in this instance.

template<>
std::ostream & mysqlpp::operator<< | ( | escape_type1 | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Inserts a ColData with const string into a stream, escaping special SQL characters. Because ColData was designed to contain MySQL type data, we may choose not to escape the data, if it is not needed.

template<>
std::ostream & mysqlpp::operator<< | ( | escape_type1 | o,
|  | const ColData_Tmpl< std::string > & | in
| ) |

| Inserts a ColData into a stream, escaping special SQL characters. Because ColData was designed to contain MySQL type data, we may choose not to escape the data, if it is not needed.

template<>
std::ostream & mysqlpp::operator<< | ( | escape_type1 | o,
|  | const char *const & | in
| ) |

| Inserts a C string into a stream, escaping special SQL characters. Because C's type system lacks the information we need to second- guess this manipulator, we always run the escaping algorithm on the data, even if it's not needed.

template<>
std::ostream & mysqlpp::operator<< | ( | escape_type1 | o,
|  | const std::string & | in
| ) |

| Inserts a C++ string into a stream, escaping special SQL characters. Because std::string lacks the type information we need, the string is always escaped, even if it doesn't need it.

SQLQueryParms & mysqlpp::operator<< | ( | escape_type2 | p,
|  | SQLString & | in
| ) |

| Inserts a SQLString into a stream, escaping special SQL characters. We actually only do the escaping if in.is_string is set but in.dont_escape is not. If that is not the case, we insert the string data directly.

template<>
ostream& operator<< | ( | quote_double_only_type1 | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Inserts a ColData with const string into a stream, double-quoted ("). Because ColData was designed to contain MySQL type data, we may choose not to actually quote the data, if it is not needed.

template<>
ostream& operator<< | ( | quote_double_only_type1 | o,
|  | const ColData_Tmpl< string > & | in
| ) |

| Inserts a ColData into a stream, double-quoted ("). Because ColData was designed to contain MySQL type data, we may choose not to actually quote the data, if it is not needed.

SQLQueryParms& operator<< | ( | quote_double_only_type2 | p,
|  | SQLString & | in
| ) |

| Inserts a SQLString into a stream, double-quoting it (") unless it's data that needs no quoting. We make the decision to quote the data based on the in.is_string flag. You can set it yourself, but SQLString's ctors should set it correctly for you.

template<>
ostream& operator<< | ( | quote_only_type1 | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Inserts a ColData with const string into a stream, quoted. Because ColData was designed to contain MySQL type data, we may choose not to actually quote the data, if it is not needed.

template<>
ostream& operator<< | ( | quote_only_type1 | o,
|  | const ColData_Tmpl< string > & | in
| ) |

| Inserts a ColData into a stream, quoted. Because ColData was designed to contain MySQL type data, we may choose not to actually quote the data, if it is not needed.

SQLQueryParms& operator<< | ( | quote_only_type2 | p,
|  | SQLString & | in
| ) |

| Inserts a SQLString into a stream, quoting it unless it's data that needs no quoting. We make the decision to quote the data based on the in.is_string flag. You can set it yourself, but SQLString's ctors should set it correctly for you.

SQLQuery& operator<< | ( | SQLQuery & | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Insert a ColData with const string into a SQLQuery. This operator appears to be a workaround for a weakness in one compiler's implementation of the C++ type system. See Wishlist for current plan on what to do about this.

SQLQuery& operator<< | ( | SQLQuery & | o,
|  | const ColData_Tmpl< string > & | in
| ) |

| Insert a ColData into a SQLQuery. This operator appears to be a workaround for a weakness in one compiler's implementation of the C++ type system. See Wishlist for current plan on what to do about this.

ostream& operator<< | ( | ostream & | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Inserts a ColData with const string into a stream. Because ColData was designed to contain MySQL type data, this operator has the information needed to choose to quote and/or escape the data as it is inserted into the stream, even if you don't use any of the quoting or escaping manipulators.

ostream& operator<< | ( | ostream & | o,
|  | const ColData_Tmpl< string > & | in
| ) |

| Inserts a ColData into a stream. Because ColData was designed to contain MySQL type data, this operator has the information needed to choose to quote and/or escape the data as it is inserted into the stream, even if you don't use any of the quoting or escaping manipulators.

template<>
ostream& operator<< | ( | quote_type1 | o,
|  | const ColData_Tmpl< const_string > & | in
| ) |

| Inserts a ColData with const string into a stream, quoted and escaped. Because ColData was designed to contain MySQL type data, we may choose not to actually quote or escape the data, if it is not needed.

template<>
ostream& operator<< | ( | quote_type1 | o,
|  | const ColData_Tmpl< string > & | in
| ) |

| Inserts a ColData into a stream, quoted and escaped. Because ColData was designed to contain MySQL type data, we may choose not to actually quote or escape the data, if it is not needed.

template<>
ostream& operator<< | ( | quote_type1 | o,
|  | const char *const & | in
| ) |

| Inserts a C string into a stream, quoted and escaped. Because C strings lack the type information we need, the string is both quoted and escaped, always.

template<>
ostream& operator<< | ( | quote_type1 | o,
|  | const string & | in
| ) |

| Inserts a C++ string into a stream, quoted and escaped. Because std::string lacks the type information we need, the string is both quoted and escaped, always.

SQLQueryParms& operator<< | ( | quote_type2 | p,
|  | SQLString & | in
| ) |

| Inserts a SQLString into a stream, quoted and escaped. If in.is_string is set and in.dont_escape is not set, the string is quoted and escaped. If both in.is_string and in.dont_escape are set, the string is quoted but not escaped. If in.is_string is not set, the data is inserted as-is. This is the case when you initialize SQLString with one of the constructors taking an integral type, for instance.

template<class Strng, class T>
Strng stream2string | ( | const T & | object | ) |

| Converts a stream-able object to any type that can be initialized from an `std::string`. This adapter takes any object that has an `out_stream()` member function and converts it to a string type. An example of such a type within the library is mysqlpp::Date.

template<class Seq>
value_list_b<Seq, do_nothing_type0> value_list | ( | const Seq & | s,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a sparse value list. Same as value_list(Seq&, const char*, Manip, bool, bool...) but without the Manip or delimiter parameters. We use the do_nothing manipulator, meaning that the value list items are neither escaped nor quoted when being inserted into a stream. The delimiter is a comma. This form is suitable for lists of simple data, such as integers.

template<class Seq>
value_list_b<Seq, do_nothing_type0> value_list | ( | const Seq & | s,
|  | const char * | d,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a sparse value list. Same as value_list(Seq&, const char*, Manip, bool, bool...) but without the Manip parameter. We use the do_nothing manipulator, meaning that the value list items are neither escaped nor quoted when being inserted into a stream.

template<class Seq, class Manip>
value_list_b<Seq, Manip> value_list | ( | const Seq & | s,
|  | const char * | d,
|  | Manip | m,
|  | bool | t0,
|  | bool | t1 = false,
|  | bool | t2 = false,
|  | bool | t3 = false,
|  | bool | t4 = false,
|  | bool | t5 = false,
|  | bool | t6 = false,
|  | bool | t7 = false,
|  | bool | t8 = false,
|  | bool | t9 = false,
|  | bool | ta = false,
|  | bool | tb = false,
|  | bool | tc = false
| ) |

| Constructs a value_list_b (sparse value list). Same as value_list(Seq&, const char*, Manip, const vector<bool>&), except that it takes the bools as arguments instead of wrapped up in a vector object.

template<class Seq, class Manip>
value_list_b<Seq, Manip> value_list | ( | const Seq & | s,
|  | const char * | d,
|  | Manip | m,
|  | const std::vector< bool > & | vb
| ) | `[inline]`

  | Constructs a value_list_b (sparse value list). Parameters:
  s | an STL sequence of items in the value list
  d | delimiter operator<< should place between items
  m | manipulator to use when inserting items into a stream
  vb | for each item in this vector that is true, the corresponding item in the value list is inserted into a stream; the others are suppressed

template<class Seq, class Manip>
value_list_ba<Seq, Manip> value_list | ( | const Seq & | s,
|  | const char * | d,
|  | Manip | m
| ) |

  | Constructs a value_list_ba. Parameters:
  s | an STL sequence of items in the value list
  d | delimiter operator<< should place between items
  m | manipulator to use when inserting items into a stream

template<class Seq>
value_list_ba<Seq, do_nothing_type0> value_list | ( | const Seq & | s,
|  | const char * | d = ","
| ) |

  | Constructs a value_list_ba. This function returns a value list that uses the 'do_nothing' manipulator. That is, the items are not quoted or escaped in any way. See value_list(Seq, const char*, Manip) if you need to specify a manipulator. Parameters:
  s | an STL sequence of items in the value list
  d | delimiter operator<< should place between items

## Variable Documentation

bool mysqlpp::dont_quote_auto = false

| Set to true if you want to suppress automatic quoting. Works only for ColData inserted into C++ streams.