#ifndef __M_SQL_H__
#define __M_SQL_H__
+using namespace std;
+
#include <string>
#include <vector>
#define SQL_ROW 3
#define SQL_ERROR 4
#define SQL_END 5
+#define SQL_DONE 6
+#define SQL_OK 7
// SQLRequest is inherited from a basic Request object
// so that we can neatly pass information around the
// system.
-class SQLRequest : public Request
+class SQLRequest
{
protected:
long conn_id;
int request_type;
std::string thisquery;
public:
+ SQLRequest(int qt, long cid, std::string query)
+ {
+ this->SetQueryType(qt);
+ this->SetConnID(cid);
+ this->SetQuery(query);
+ }
+
void SetConnID(long id)
{
conn_id = id;
}
- long GetConnID(long id)
+ long GetConnID()
{
return conn_id;
}
request_type = t;
}
- int GetQueryType(int t)
+ int GetQueryType()
{
return request_type;
}
// Upon completion, an SQLRequest returns an SQLResponse.
-class SQLResponse
+class SQLResult
{
protected:
int resptype;
int GetType()
{
- return restype;
+ return resptype;
}
std::string GetError()