author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Sat, 13 Dec 2008 17:58:06 +0100 | |
changeset 13 | 2640a7fd96ca |
parent 12 | 9f0ce4eaa1ce |
child 14 | 862d63715611 |
permissions | -rw-r--r-- |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
1 |
/** |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
2 |
* db_bridge/include/abstract_db.h |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
3 |
* Copyright 2008 (C) Markus Broeker |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
4 |
*/ |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
5 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
6 |
#ifndef ABSTRACT_DB_H |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
7 |
#define ABSTRACT_DB_H |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
8 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
9 |
#include <vector> |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
10 |
#include <string> |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
11 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
12 |
class Abstract_DB { |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
13 |
protected: |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
14 |
std::string user; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
15 |
std::string database; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
16 |
std::string password; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
17 |
std::string server; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
18 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
19 |
public: |
13
2640a7fd96ca
clear() is better than resize(0)
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
12
diff
changeset
|
20 |
virtual ~ Abstract_DB () {} |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
21 |
virtual bool connect () = 0; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
22 |
virtual std::vector < std::vector<std::string> >query (std::string) = 0; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
23 |
}; |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
24 |
#endif |