bf0e4b3714
also move the header files to ${LOCALBASE}/include/mysql++
277 lines
9.6 KiB
Plaintext
277 lines
9.6 KiB
Plaintext
$OpenBSD: patch-sqlplusint_manip1_hh,v 1.1 2004/01/06 11:16:53 wilfried Exp $
|
|
--- sqlplusint/manip1.hh.orig 2001-05-19 18:44:48.000000000 +0200
|
|
+++ sqlplusint/manip1.hh 2004-01-04 23:55:26.000000000 +0100
|
|
@@ -24,11 +24,11 @@ class SQLQueryParms;
|
|
enum quote_type0 {mysql_quote};
|
|
|
|
struct quote_type1 {
|
|
- ostream *ostr;
|
|
- quote_type1(ostream *o) : ostr(o) {}
|
|
+ std::ostream *ostr;
|
|
+ quote_type1(std::ostream *o) : ostr(o) {}
|
|
};
|
|
|
|
-inline quote_type1 operator << (ostream &o, quote_type0 esc) {
|
|
+inline quote_type1 operator << (std::ostream &o, quote_type0 esc) {
|
|
return quote_type1(&o);
|
|
}
|
|
|
|
@@ -44,52 +44,52 @@ inline quote_type2 operator << (SQLQuery
|
|
SQLQueryParms& operator << (quote_type2 p, SQLString &in);
|
|
|
|
template <class T>
|
|
-inline ostream& operator << (quote_type1 o, const T &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, const T &in) {
|
|
return *o.ostr << in;
|
|
}
|
|
|
|
-ostream& operator << (ostream& o,const mysql_ColData<string>& in);
|
|
+std::ostream& operator << (std::ostream& o,const mysql_ColData<std::string>& in);
|
|
|
|
-ostream& operator << (ostream& o, const mysql_ColData<const_string>& in);
|
|
+std::ostream& operator << (std::ostream& o, const mysql_ColData<const_string>& in);
|
|
|
|
-SQLQuery& operator << (SQLQuery& o, const mysql_ColData<string>& in);
|
|
+SQLQuery& operator << (SQLQuery& o, const mysql_ColData<std::string>& in);
|
|
|
|
SQLQuery& operator << (SQLQuery& o, const mysql_ColData<const_string>& in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_type1 o, const string &in);
|
|
+std::ostream& operator << (quote_type1 o, const std::string &in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_type1 o, const char* const &in);
|
|
+std::ostream& operator << (quote_type1 o, const char* const &in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_type1 o, const mysql_ColData<string>& in);
|
|
+std::ostream& operator << (quote_type1 o, const mysql_ColData<std::string>& in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_type1 o, const mysql_ColData<const_string>& in);
|
|
+std::ostream& operator << (quote_type1 o, const mysql_ColData<const_string>& in);
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_type1 o, char* const &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, char* const &in) {
|
|
return operator << (o, const_cast<const char* const &>(in));
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_type1 o, const Date &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, const Date &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_type1 o, const Time &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, const Time &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_type1 o, const DateTime &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, const DateTime &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <class ST>
|
|
-inline ostream& operator << (quote_type1 o, const MysqlSet<ST> &in) {
|
|
+inline std::ostream& operator << (quote_type1 o, const MysqlSet<ST> &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
@@ -98,11 +98,11 @@ inline ostream& operator << (quote_type1
|
|
enum quote_only_type0 {mysql_quote_only};
|
|
|
|
struct quote_only_type1 {
|
|
- ostream *ostr;
|
|
- quote_only_type1(ostream *o) : ostr(o) {}
|
|
+ std::ostream *ostr;
|
|
+ quote_only_type1(std::ostream *o) : ostr(o) {}
|
|
};
|
|
|
|
-inline quote_only_type1 operator << (ostream &o, quote_only_type0 esc) {
|
|
+inline quote_only_type1 operator << (std::ostream &o, quote_only_type0 esc) {
|
|
return quote_only_type1(&o);
|
|
}
|
|
|
|
@@ -118,38 +118,38 @@ inline quote_only_type2 operator << (SQL
|
|
SQLQueryParms & operator << (quote_only_type2 p, SQLString &in);
|
|
|
|
template <class T>
|
|
-inline ostream& operator << (quote_only_type1 o, const T &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const T &in) {
|
|
return *o.ostr << in;
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_only_type1 o, const string &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const std::string &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <>
|
|
-ostream& operator << (quote_only_type1 o, const mysql_ColData<string>& in);
|
|
+std::ostream& operator << (quote_only_type1 o, const mysql_ColData<std::string>& in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_only_type1 o, const mysql_ColData<const_string>& in);
|
|
+std::ostream& operator << (quote_only_type1 o, const mysql_ColData<const_string>& in);
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_only_type1 o, const Date &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const Date &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_only_type1 o, const Time &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const Time &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_only_type1 o, const DateTime &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const DateTime &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
template <class ST>
|
|
-inline ostream& operator << (quote_only_type1 o, const MysqlSet<ST> &in) {
|
|
+inline std::ostream& operator << (quote_only_type1 o, const MysqlSet<ST> &in) {
|
|
return *o.ostr << "'" << in << "'";
|
|
}
|
|
|
|
@@ -157,11 +157,11 @@ inline ostream& operator << (quote_only_
|
|
|
|
enum quote_double_only_type0 {mysql_quote_double_only};
|
|
struct quote_double_only_type1 {
|
|
- ostream *ostr;
|
|
- quote_double_only_type1(ostream *o) : ostr(o) {}
|
|
+ std::ostream *ostr;
|
|
+ quote_double_only_type1(std::ostream *o) : ostr(o) {}
|
|
};
|
|
|
|
-inline quote_double_only_type1 operator << (ostream &o,
|
|
+inline quote_double_only_type1 operator << (std::ostream &o,
|
|
quote_double_only_type0 esc) {
|
|
return quote_double_only_type1(&o);
|
|
}
|
|
@@ -179,39 +179,39 @@ inline quote_double_only_type2 operator
|
|
SQLQueryParms & operator << (quote_double_only_type2 p, SQLString &in);
|
|
|
|
template <class T>
|
|
-inline ostream& operator << (quote_double_only_type1 o, const T &in) {
|
|
+inline std::ostream& operator << (quote_double_only_type1 o, const T &in) {
|
|
return *o.ostr << in;
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_double_only_type1 o, const string &in) {
|
|
+inline std::ostream& operator << (quote_double_only_type1 o, const std::string &in) {
|
|
return *o.ostr << "\"" << in << "\"";
|
|
}
|
|
|
|
template <>
|
|
-ostream& operator << (quote_double_only_type1 o, const mysql_ColData<string>& in);
|
|
+std::ostream& operator << (quote_double_only_type1 o, const mysql_ColData<std::string>& in);
|
|
|
|
template <>
|
|
-ostream& operator << (quote_double_only_type1 o, const mysql_ColData<const_string>& in);
|
|
+std::ostream& operator << (quote_double_only_type1 o, const mysql_ColData<const_string>& in);
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_double_only_type1 o, const Date &in) {
|
|
+inline std::ostream& operator << (quote_double_only_type1 o, const Date &in) {
|
|
return *o.ostr << "\"" << in << "\"";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_double_only_type1 o, const Time &in) {
|
|
+inline std::ostream& operator << (quote_double_only_type1 o, const Time &in) {
|
|
return *o.ostr << "\"" << in << "\"";
|
|
}
|
|
|
|
template <>
|
|
-inline ostream& operator << (quote_double_only_type1 o,
|
|
+inline std::ostream& operator << (quote_double_only_type1 o,
|
|
const DateTime &in) {
|
|
return *o.ostr << "\"" << in << "\"";
|
|
}
|
|
|
|
template <class ST>
|
|
-inline ostream& operator << (quote_double_only_type1 o,
|
|
+inline std::ostream& operator << (quote_double_only_type1 o,
|
|
const MysqlSet<ST> &in) {
|
|
return *o.ostr << "\"" << in << "\"";
|
|
}
|
|
@@ -220,11 +220,11 @@ inline ostream& operator << (quote_doubl
|
|
|
|
enum escape_type0 {mysql_escape};
|
|
struct escape_type1 {
|
|
- ostream *ostr;
|
|
- escape_type1(ostream *o) : ostr(o) {}
|
|
+ std::ostream *ostr;
|
|
+ escape_type1(std::ostream *o) : ostr(o) {}
|
|
};
|
|
|
|
-inline escape_type1 operator << (ostream &o, escape_type0 esc) {
|
|
+inline escape_type1 operator << (std::ostream &o, escape_type0 esc) {
|
|
return escape_type1(&o);
|
|
}
|
|
|
|
@@ -240,24 +240,24 @@ inline escape_type2 operator << (SQLQuer
|
|
SQLQueryParms & operator << (escape_type2 p, SQLString &in);
|
|
|
|
template <class T>
|
|
-inline ostream& operator << (escape_type1 o, const T &in) {
|
|
+inline std::ostream& operator << (escape_type1 o, const T &in) {
|
|
return *o.ostr << in;
|
|
}
|
|
|
|
template <>
|
|
-ostream& operator << (escape_type1 o, const string &in);
|
|
+std::ostream& operator << (escape_type1 o, const std::string &in);
|
|
|
|
template <>
|
|
-ostream& operator << (escape_type1 o, const char* const &in);
|
|
+std::ostream& operator << (escape_type1 o, const char* const &in);
|
|
|
|
template <>
|
|
-ostream& operator << (escape_type1 o, const mysql_ColData<string>& in);
|
|
+std::ostream& operator << (escape_type1 o, const mysql_ColData<std::string>& in);
|
|
|
|
template <>
|
|
-ostream& operator << (escape_type1 o, const mysql_ColData<const_string>& in);
|
|
+std::ostream& operator << (escape_type1 o, const mysql_ColData<const_string>& in);
|
|
|
|
template <>
|
|
-inline ostream& operator << (escape_type1 o, char* const &in) {
|
|
+inline std::ostream& operator << (escape_type1 o, char* const &in) {
|
|
return operator << (o, const_cast<const char* const &>(in));
|
|
}
|
|
|
|
@@ -266,16 +266,16 @@ inline ostream& operator << (escape_type
|
|
|
|
enum do_nothing_type0 {mysql_do_nothing};
|
|
struct do_nothing_type1 {
|
|
- ostream *ostr;
|
|
- do_nothing_type1(ostream *o) : ostr(o) {}
|
|
+ std::ostream *ostr;
|
|
+ do_nothing_type1(std::ostream *o) : ostr(o) {}
|
|
};
|
|
|
|
-inline do_nothing_type1 operator << (ostream &o, do_nothing_type0 esc) {
|
|
+inline do_nothing_type1 operator << (std::ostream &o, do_nothing_type0 esc) {
|
|
return do_nothing_type1(&o);
|
|
}
|
|
|
|
template <class T>
|
|
-inline ostream& operator << (do_nothing_type1 o, const T &in) {
|
|
+inline std::ostream& operator << (do_nothing_type1 o, const T &in) {
|
|
return *o.ostr << in;
|
|
}
|
|
|