#include <soci_helper.h>
Definition at line 86 of file soci_helper.h.
◆ check_status()
| bool soci::per_thread_session::check_status |
( |
| ) |
|
|
inline |
◆ get()
| soci::session & soci::per_thread_session::get |
( |
| ) |
|
|
inline |
Definition at line 96 of file soci_helper.h.
97 {
98
99
100
101 m_db_connections_lock.lock();
103 m_db_connections_lock.unlock();
104 if(!conn_ptr.get())
105 {
106 conn_ptr.reset(new soci::session(soci::postgresql, m_connection_string));
107 }
108
109 return *conn_ptr.get();
110 }
std::string get_thread_string_id()
◆ init()
| bool soci::per_thread_session::init |
( |
const std::string & | connection_string | ) |
|
|
inline |
Definition at line 89 of file soci_helper.h.
90 {
91 m_connection_string = connection_string;
92
93 return true;
94 }
◆ reopen()
| bool soci::per_thread_session::reopen |
( |
| ) |
|
|
inline |
Definition at line 112 of file soci_helper.h.
113 {
114
115
116 m_db_connections_lock.lock();
118 m_db_connections_lock.unlock();
119 if(conn_ptr.get())
120 {
121 conn_ptr->close();
122 conn_ptr.reset(new soci::session(soci::postgresql, m_connection_string));
123 }
124
125
126 return true;
127 }
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/contrib/epee/include/soci_helper.h