diff options
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 |