source: tags/0.56/mysql_pool.h @ 9

Last change on this file since 9 was 9, checked in by willem, 11 years ago

willem

File size: 953 bytes
Line 
1#ifndef MYSQL_POOL_H
2#define MYSQL_POOL_H
3#include "stopos_pool.h"
4#include "stopos_key.h"
5#include "mysql_connection.h"
6#include "stopos.h"
7#include <cppconn/driver.h>
8#include <cppconn/exception.h>
9#include <cppconn/resultset.h>
10#include <cppconn/statement.h>
11#include <cppconn/prepared_statement.h>
12
13class mysql_pool: public stopos_pool
14{
15  private:
16
17    int get_record(std::string &r, const std::string &k);
18    int put_record(const std::string &r, const std::string &k);
19    int remove_record(const stopos_key &k);
20    int get_status(void);
21    int put_status(void);
22
23    void create_fname(std::string &fname,const stopos_key &k);
24
25    const static int STATUSTOOLONG = 101;
26    const static int NOTDIR = 102;
27
28
29    sql::Connection *connection;
30    sql::Statement *stmt;
31
32  public:
33    mysql_pool();
34    ~mysql_pool();
35    int create_db(void);
36    int purge_db(void);
37    int open_db(void);
38    int close_db(void);
39    void dump_db(void);
40};
41#endif
Note: See TracBrowser for help on using the repository browser.