#include <ado_db_helper.h>
Definition at line 931 of file ado_db_helper.h.
◆ check_status()
| bool epee::ado_db_helper::per_thread_connection_pool::check_status |
( |
| ) |
|
|
inline |
Definition at line 984 of file ado_db_helper.h.
991 HRESULT
res = rconn->Close();
999 HRESULT
res = rconn->Open(_bstr_t(m_connection_string.c_str()), _bstr_t(m_login.c_str()), _bstr_t(m_password.c_str()), NULL);
1002 LOG_PRINT(
"Failed to restore connection to local AI DB", LOG_LEVEL_1);
ADODB::_ConnectionPtr & get_db_connection()
bool execute_helper(ADODB::_CommandPtr cmd, _variant_t *pcount_processed=NULL)
#define BEGIN_TRY_SECTION()
#define CATCH_TRY_SECTION(ret_val)
◆ get_db_connection()
| ADODB::_ConnectionPtr& epee::ado_db_helper::per_thread_connection_pool::get_db_connection |
( |
| ) |
|
|
inline |
Definition at line 945 of file ado_db_helper.h.
950 m_db_connections_lock.
lock();
951 boost::shared_ptr<ADODB::_ConnectionPtr>& conn_ptr = m_db_connections[::GetCurrentThreadId()];
952 m_db_connections_lock.
unlock();
955 conn_ptr.reset(
new ADODB::_ConnectionPtr());
956 ADODB::_ConnectionPtr& conn = *conn_ptr.get();
962 if(S_OK != conn.CreateInstance(__uuidof(ADODB::Connection)))
964 LOG_ERROR(
"Failed to Create, instance, was CoInitialize called ???!");
968 HRESULT
res = conn->Open(_bstr_t(m_connection_string.c_str()), _bstr_t(m_login.c_str()), _bstr_t(m_password.c_str()), NULL);
971 LOG_ERROR(
"Failed to connect do DB, connection str:" << m_connection_string);
975 LOG_PRINT(
"New DB Connection added for threadid=" << ::GetCurrentThreadId(), LOG_LEVEL_0);
980 return *conn_ptr.get();
bool execute_helper(ADODB::_CommandPtr cmd, _variant_t *pcount_processed=NULL)
#define BEGIN_TRY_SECTION()
#define CATCH_TRY_SECTION_MESS(ret_val, mess_where)
◆ init()
| bool epee::ado_db_helper::per_thread_connection_pool::init |
( |
const std::string & |
connection_string, |
|
|
const std::string & |
login, |
|
|
const std::string & |
pass |
|
) |
| |
|
inline |
Definition at line 934 of file ado_db_helper.h.
936 m_connection_string = connection_string;
ADODB::_ConnectionPtr & get_db_connection()
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/contrib/epee/include/ado_db_helper.h