| 79 | const std::string& ODBCConnection::GetDSN() const { return dsn_; } |
| 80 | |
| 81 | void ODBCConnection::Connect(std::string dsn, |
| 82 | const Connection::ConnPropertyMap& properties, |
| 83 | std::vector<std::string_view>& missing_properties) { |
| 84 | if (is_connected_) { |
| 85 | throw DriverException("Already connected.", "HY010"); |
| 86 | } |
| 87 | |
| 88 | dsn_ = std::move(dsn); |
| 89 | spi_connection_->Connect(properties, missing_properties); |
| 90 | is_connected_ = true; |
| 91 | std::shared_ptr<Statement> spi_statement = spi_connection_->CreateStatement(); |
| 92 | attribute_tracking_statement_ = std::make_shared<ODBCStatement>(*this, spi_statement); |
| 93 | } |
| 94 | |
| 95 | SQLRETURN ODBCConnection::GetInfo(SQLUSMALLINT info_type, SQLPOINTER value, |
| 96 | SQLSMALLINT buffer_length, SQLSMALLINT* output_length, |