$OpenBSD: patch-sqlplusint_sql_query1_hh,v 1.2 2004/01/06 11:16:53 wilfried Exp $
--- sqlplusint/sql_query1.hh.orig	2001-05-19 18:44:48.000000000 +0200
+++ sqlplusint/sql_query1.hh	2004-01-04 23:50:11.000000000 +0100
@@ -1,7 +1,7 @@
 #ifndef __sql_query_1_hh
 #define __sql_query_1_hh
 
-#include <strstream.h>
+#include <sstream>
 #include <vector>
 #include <map>
 #include "define_short"
@@ -16,8 +16,8 @@ class SQLQuery;
 
 //: This class holds the parameter values for filling template queries. 
 // It is a subclass of a vector of *SQLStrings*.
-class SQLQueryParms : public vector<SQLString> {
-  friend Query;
+class SQLQueryParms : public std::vector<SQLString> {
+  friend class Query;
 private:
   typedef const SQLString&      ss;
   SQLQuery                 *parent;
@@ -28,10 +28,10 @@ public:
   void               clear() {erase(begin(),end());} //: Clears the list
   SQLString &operator [] (size_type n) {
     if (n >= size()) insert(end(),(n+1) - size(), "");
-    return vector<SQLString>::operator [] (n);
+    return std::vector<SQLString>::operator [] (n);
   } //: Access element number n
   const SQLString &operator [] (size_type n) const 
-    {return vector<SQLString>::operator [] (n);}     
+    {return std::vector<SQLString>::operator [] (n);}     
   //: Access element number n
   SQLString &operator [] (const char *str); 
   //: Access the value of the element with a key of str.
@@ -81,8 +81,8 @@ public:
 enum query_reset {DONT_RESET, RESET_QUERY};
 
 struct SQLParseElement {
-  SQLParseElement(string b, char o, char n) : before(b),option(o),num(n) {}
-  string before;
+  SQLParseElement(std::string b, char o, char n) : before(b),option(o),num(n) {}
+  std::string before;
   char   option;
   char   num;
 };
@@ -107,22 +107,22 @@ struct SQLParseElement {
 // your query before you try to use any of the *SQLQuery* specific
 // methods except for *error()* and *success()*.
 
-class SQLQuery : public strstream { 
-  friend SQLQueryParms; 
+class SQLQuery : public std::stringstream { 
+  friend class SQLQueryParms; 
 private:
   char* preview_char();
 protected:
-  bool    Success;
+  bool    Success_;
   char*   errmsg;
-  vector<SQLParseElement> parsed;
-  vector<string>          parsed_names;
-  map<string,int>         parsed_nums;
+  std::vector<SQLParseElement> parsed;
+  std::vector<std::string>     parsed_names;
+  std::map<std::string,int>    parsed_nums;
   typedef  const SQLString&  ss;
   typedef  SQLQueryParms  parms;
   void     proc(parms &p);
 
 public:
-  SQLQuery(): Success(false), errmsg(NULL), def(this) {parsed.empty(); parsed_names.empty(); parsed_nums.empty();} //:
+  SQLQuery(): Success_(false), errmsg(NULL), def(this) {parsed.empty(); parsed_names.empty(); parsed_nums.empty();} //:
   SQLQuery(const SQLQuery &q); //:
   SQLQuery& operator = (const SQLQuery &q); //:
 
@@ -130,8 +130,8 @@ public:
 
   void     parse();  
 
-  string   error () const {return errmsg;}
-  bool     success() const {return Success;}
+  std::string   error () const {return errmsg;}
+  bool     success() const {return Success_;}
 
   operator bool () {return success();}
   bool operator !    () {return !success();}
@@ -167,6 +167,7 @@ public:
 
   template <class T> SQLQuery& update(const T &o, const T &n) {
     reset();
+    enum sql_cmp_type {sql_use_compare};
     *this << "UPDATE " << o.table() << " SET " << n.equal_list() 
           << " WHERE " << o.equal_list(" AND ", sql_use_compare);
     return *this;
@@ -184,7 +185,7 @@ public:
     return *this;
   } //:
 
-  mysql_query_define_const1(string,str)
+  mysql_query_define_const1(std::string,str)
 };  
 
 #endif
