-
Notifications
You must be signed in to change notification settings - Fork 0
/
ucmysql.h
48 lines (39 loc) · 1.02 KB
/
ucmysql.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* UniversalContainer library.
* Copyright Jason Denton, 2008,2010.
* Made available under the new BSD license, as described in LICENSE
*
* Send comments and bug reports to jason.denton@gmail.com
* http://www.greatpanic.com/code.html
*/
/*
UniversalContainer to mysql interface.
*/
#ifndef _UCMYSQL_H_
#define _UCMYSQL_H_
#include "libuc_conf.h"
#ifdef _UC_WITH_MYSQL
#include <mysql.h>
#else
#define MYSQL void
#endif
#include "ucontainer.h"
#include "ucdb.h"
using namespace std;
namespace JAD {
class MySQLDatabase: public DatabaseInterface {
MYSQL* connection;
bool own_db;
void set_error_condition(UniversalContainer&);
void real_setup(void);
public:
MySQLDatabase(const char* = NULL, const char* = NULL, const char* = NULL, const char* = NULL,
unsigned = 0, const char* = NULL, unsigned = 0);
MySQLDatabase(UniversalContainer);
MySQLDatabase(MYSQL*);
~MySQLDatabase(void);
UniversalContainer sql_exec(std::string);
MYSQL* get_db_handle(void);
};
}
#endif