You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cpp_utils/include/MysqlConnectionPool.hpp

36 lines
738 B

#ifndef MYSQL_CONNECTION_POOL_HPP
#define MYSQL_CONNECTION_POOL_HPP
#include "ObjectPool.hpp"
#include "MysqlClient.hpp"
class MysqlConnectionPool : public ObjectPool<MysqlClient *>
{
public:
MysqlConnectionPool( const char *host = NULL,
const char *user = NULL,
const char *passwd = NULL,
const char *db = NULL );
~MysqlConnectionPool();
void create();
void clear();
private:
MysqlConnectionPool(const MysqlConnectionPool&);
MysqlConnectionPool& operator=(const MysqlConnectionPool&);
const char *m_host;
const char *m_user;
const char *m_passwd;
const char *m_db;
};
#endif // MYSQL_CONNECTION_POOL_HPP