diff options
author | pixel <pixel> | 2003-08-21 16:49:52 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-08-21 16:49:52 +0000 |
commit | 23974eb093c83a5e6f7b1109e0f739ad7a870aac (patch) | |
tree | b3cabc2eae9dde5689e8182f06036fcb6c417c34 /include | |
parent | 567a5619d98b17276479055512a469f1571c4ab4 (diff) |
Starting MySQL code
Diffstat (limited to 'include')
-rw-r--r-- | include/BString.h | 2 | ||||
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/SQL.h | 20 |
3 files changed, 23 insertions, 1 deletions
diff --git a/include/BString.h b/include/BString.h index ab4f5e5..b5a273f 100644 --- a/include/BString.h +++ b/include/BString.h @@ -73,4 +73,6 @@ std::istream & operator>>(std::istream &, String &); String operator+(const char *, const String &); +bool compare(String, String); + #endif diff --git a/include/Makefile.am b/include/Makefile.am index 583a97d..a84dd81 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,6 @@ pkginclude_HEADERS = \ Exceptions.h Handle.h BString.h Output.h Socket.h HttpServ.h Variables.h Menu.h \ Action.h Message.h Form.h Confirm.h Table.h IRC.h Task.h Buffer.h generic.h \ CopyJob.h ReadJob.h Regex.h TaskMan.h InPipe.h OutPipe.h Input.h Image.h \ -Main.h Color.h GMPString.h +Main.h Color.h GMPString.h SQL.h noinst_HEADERS = gettext.h diff --git a/include/SQL.h b/include/SQL.h new file mode 100644 index 0000000..ee28eb0 --- /dev/null +++ b/include/SQL.h @@ -0,0 +1,20 @@ +#ifndef __SQL_H__ +#define __SQL_H__ + +#include <set> +#include <mysql.h> +#include <Exceptions.h> + +//typedef AssocArray std::set<String, compare>; + +class SQLConnection : public Base { + public: + SQLConnection(String host, String user, String passwd, String db, int port = 3306, String socket = "", unsigned long clags = 0) throw (GeneralException); + ~SQLConnection(); + void query(String) throw (GeneralException); + private: + MYSQL con; + MYSQL_RES * res; +}; + +#endif |