diff --git a/orm_lib/inc/drogon/orm/SqlBinder.h b/orm_lib/inc/drogon/orm/SqlBinder.h index f8b9cc60..fb00a268 100644 --- a/orm_lib/inc/drogon/orm/SqlBinder.h +++ b/orm_lib/inc/drogon/orm/SqlBinder.h @@ -208,7 +208,7 @@ class SqlBinder typename traits = FunctionTraits> typename std::enable_if::type &operator>>(CallbackType &&callback) { - LOG_DEBUG << "ptr callback"; + //LOG_DEBUG << "ptr callback"; _isExceptPtr = true; _exceptPtrCallback = std::forward(callback); return *this; @@ -258,6 +258,7 @@ class SqlBinder _parameters.push_back((char *)obj.get()); _length.push_back(sizeof(T)); _format.push_back(1); + //LOG_TRACE << "Bind parameter:" << parameter; return *this; } //template <> diff --git a/orm_lib/src/postgresql_impl/PgClientImpl.cc b/orm_lib/src/postgresql_impl/PgClientImpl.cc index 59ab6328..25a3e49a 100644 --- a/orm_lib/src/postgresql_impl/PgClientImpl.cc +++ b/orm_lib/src/postgresql_impl/PgClientImpl.cc @@ -109,7 +109,7 @@ void PgClientImpl::execSql(const DbConnectionPtr &conn, _loopPtr->queueInLoop([=]() { std::vector paras; std::vector lens; - for (auto p : cmd._parameters) + for (auto &p : cmd._parameters) { paras.push_back(p.c_str()); lens.push_back(p.length()); @@ -147,8 +147,6 @@ void PgClientImpl::execSql(const std::string &sql, { if (_busyConnections.size() == 0) { - //std::cout<<"no connection"<