MCPcopy Create free account
hub / github.com/apache/arrow / Connect

Method Connect

cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_connection.cc:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79const std::string& ODBCConnection::GetDSN() const { return dsn_; }
80
81void 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
95SQLRETURN ODBCConnection::GetInfo(SQLUSMALLINT info_type, SQLPOINTER value,
96 SQLSMALLINT buffer_length, SQLSMALLINT* output_length,

Callers 2

mainFunction · 0.45
TestConnectionFunction · 0.45

Calls 2

DriverExceptionClass · 0.85
CreateStatementMethod · 0.45

Tested by 1

TestConnectionFunction · 0.36