Update MysqlConnection.h

This commit is contained in:
antao 2018-12-02 00:41:12 +08:00
parent 8ed5e19f46
commit aa1f8d4acb
1 changed files with 7 additions and 12 deletions

View File

@ -35,7 +35,7 @@ class MysqlConnection : public DbConnection, public std::enable_shared_from_this
{
public:
MysqlConnection(trantor::EventLoop *loop, const std::string &connInfo);
~MysqlConnection() { }
~MysqlConnection() {}
virtual void execSql(const std::string &sql,
size_t paraNum,
const std::vector<const char *> &parameters,
@ -48,9 +48,9 @@ class MysqlConnection : public DbConnection, public std::enable_shared_from_this
private:
std::unique_ptr<trantor::Channel> _channelPtr;
std::shared_ptr<MYSQL> _mysqlPtr;
void handleTimeout();
void handleClosed();
void handleEvent();
void setChannel();
@ -58,19 +58,14 @@ class MysqlConnection : public DbConnection, public std::enable_shared_from_this
int _waitStatus;
enum ExecStatus
{
ExecStatus_None = 0,
ExecStatus_RealQuery,
ExecStatus_StmtPrepare,
ExecStatus_StoreResult,
ExecStatus_StmtExec,
ExecStatus_StmtStoreResult
ExecStatus_None = 0,
ExecStatus_RealQuery,
ExecStatus_StoreResult
};
ExecStatus _execStatus = ExecStatus_None;
std::shared_ptr<MYSQL_STMT> _stmtPtr;
void outputError();
std::vector<MYSQL_BIND>
_binds;
std::vector<MYSQL_BIND> _binds;
std::vector<unsigned long> _lengths;
std::vector<my_bool> _isNulls;
};