代码格式化
This commit is contained in:
parent
fa71782ccc
commit
0891ce5580
@ -417,16 +417,16 @@ namespace f8
|
||||
return db_thread_pool[hash_code % db_thread_pool.size()];
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
long long curr_seqid = 0;
|
||||
std::map<long long, AsyncQueryRequest*> async_query_hash;
|
||||
|
||||
unsigned short exec_async_query_msgid = 0;
|
||||
std::vector<DBThread*> db_thread_pool;
|
||||
};
|
||||
};
|
||||
|
||||
void DBPool::Init()
|
||||
{
|
||||
void DBPool::Init()
|
||||
{
|
||||
impl_ = new DBPoolImpl();
|
||||
impl_->Init();
|
||||
MsgQueue::Instance()->RegisterCallBack(impl_->exec_async_query_msgid,
|
||||
@ -443,28 +443,28 @@ void DBPool::Init()
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void DBPool::UnInit()
|
||||
{
|
||||
void DBPool::UnInit()
|
||||
{
|
||||
delete impl_;
|
||||
impl_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void DBPool::SetThreadNum(int thread_num)
|
||||
{
|
||||
void DBPool::SetThreadNum(int thread_num)
|
||||
{
|
||||
impl_->SetThreadNum(thread_num);
|
||||
}
|
||||
}
|
||||
|
||||
void DBPool::ExecAsyncQuery(a8::XObject conn_info, const char* querystr, std::vector<a8::XValue> args,
|
||||
void DBPool::ExecAsyncQuery(a8::XObject conn_info, const char* querystr, std::vector<a8::XValue> args,
|
||||
a8::XParams param, AsyncDBOnOkFunc on_ok, AsyncDBOnErrorFunc on_error, long long hash_code)
|
||||
{
|
||||
{
|
||||
impl_->InternalExecAsyncSql(0, conn_info, querystr, args, param, on_ok, on_error, hash_code);
|
||||
}
|
||||
}
|
||||
|
||||
void DBPool::ExecAsyncScript(a8::XObject conn_info, const char* querystr, std::vector<a8::XValue> args,
|
||||
void DBPool::ExecAsyncScript(a8::XObject conn_info, const char* querystr, std::vector<a8::XValue> args,
|
||||
a8::XParams param, AsyncDBOnOkFunc on_ok, AsyncDBOnErrorFunc on_error, long long hash_code)
|
||||
{
|
||||
{
|
||||
impl_->InternalExecAsyncSql(1, conn_info, querystr, args, param, on_ok, on_error, hash_code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user