acl/lib_acl_cpp/include/acl_cpp/db/sqlite_pool.hpp

34 lines
716 B
C++
Raw Normal View History

2014-11-19 00:25:21 +08:00
#pragma once
#include "acl_cpp/acl_cpp_define.hpp"
#include "acl_cpp/db/db_pool.hpp"
namespace acl {
class db_handle;
2015-08-12 16:48:24 +08:00
class ACL_CPP_API sqlite_pool : public db_pool
2014-11-19 00:25:21 +08:00
{
public:
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param dbfile {const char*} sqlite <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
* @param dblimit {size_t} <EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param charset {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
sqlite_pool(const char* dbfile, size_t dblimit = 64,
const char* charset = "utf-8");
2014-11-19 00:25:21 +08:00
~sqlite_pool();
2015-08-12 16:48:24 +08:00
2014-11-19 00:25:21 +08:00
protected:
2015-08-12 16:48:24 +08:00
// <20><><EFBFBD><EFBFBD> connect_pool <20><><EFBFBD><EFBFBD><E9BAAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӿ<EFBFBD><D3BE><EFBFBD>
connect_client* create_connect();
2014-11-19 00:25:21 +08:00
private:
// sqlite <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
char* dbfile_;
// sqlite <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
char* charset_;
2014-11-19 00:25:21 +08:00
};
} // namespace acl