source: tags/0.58/mysql_pool.h @ 9

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

willem

File size: 973 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, const std::string &l);
18    int put_record(const std::string &r, const std::string &k, const std::string &l);
19    int remove_record(const std::string &k, const std::string &l);
20
21    void create_fname(std::string &fname,const stopos_key &k);
22
23    std::string key_to_slot(const std::string &k){return "";}
24
25    sql::Connection *connection;
26    sql::Statement *stmt;
27
28  public:
29    mysql_pool();
30    ~mysql_pool();
31    int create_db(const std::string &dbname);
32    int purge_db(void);
33    int open_db(void);
34    int close_db(void);
35    void dump_db(void);
36};
37#endif
Note: See TracBrowser for help on using the repository browser.