| 64 | } |
| 65 | |
| 66 | std::shared_ptr<ODBCConnection> ODBCEnvironment::CreateConnection() { |
| 67 | std::shared_ptr<Connection> spi_connection = driver_->CreateConnection( |
| 68 | version_ == SQL_OV_ODBC2 ? OdbcVersion::V_2 : OdbcVersion::V_3); |
| 69 | std::shared_ptr<ODBCConnection> new_conn = |
| 70 | std::make_shared<ODBCConnection>(*this, spi_connection); |
| 71 | connections_.push_back(new_conn); |
| 72 | return new_conn; |
| 73 | } |
| 74 | |
| 75 | void ODBCEnvironment::DropConnection(ODBCConnection* conn) { |
| 76 | auto it = std::find_if(connections_.begin(), connections_.end(), |
no test coverage detected