]>
Commit | Line | Data |
---|---|---|
b4ce8b4e BH |
1 | /* Copyright 2001 Netherlabs BV, bert.hubert@netherlabs.nl. See LICENSE |
2 | for more information. | |
f782fe38 MH |
3 | |
4 | Additionally, the license of this program contains a special | |
5 | exception which allows to distribute the program in binary form when | |
6 | it is linked against OpenSSL. | |
7 | ||
092f210a | 8 | $Id$ */ |
b4ce8b4e BH |
9 | #ifndef SSQL_HH |
10 | #define SSQL_HH | |
11 | ||
12 | #include <string> | |
13 | #include <vector> | |
10f4eea8 | 14 | #include "../../namespaces.hh" |
b4ce8b4e BH |
15 | |
16 | ||
17 | class SSqlException | |
18 | { | |
19 | public: | |
20 | SSqlException(const string &reason) | |
21 | { | |
22 | d_reason=reason; | |
23 | } | |
24 | ||
25 | string txtReason() | |
26 | { | |
27 | return d_reason; | |
28 | } | |
29 | private: | |
30 | string d_reason; | |
31 | }; | |
32 | ||
33 | class SSql | |
34 | { | |
35 | public: | |
36 | typedef vector<string> row_t; | |
37 | typedef vector<row_t> result_t; | |
38 | virtual SSqlException sPerrorException(const string &reason)=0; | |
39 | virtual int doQuery(const string &query, result_t &result)=0; | |
40 | virtual int doQuery(const string &query)=0; | |
52936200 | 41 | virtual int doCommand(const string &query)=0; |
b4ce8b4e BH |
42 | virtual bool getRow(row_t &row)=0; |
43 | virtual string escape(const string &name)=0; | |
44 | virtual void setLog(bool state){} | |
45 | virtual ~SSql(){}; | |
46 | }; | |
47 | ||
48 | #endif /* SSQL_HH */ |