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

Method AllocEnvConnHandles

cpp/src/arrow/flight/sql/odbc/tests/odbc_test_suite.cc:107–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105SQLHSTMT ODBCTestBase::stmt = SQL_NULL_HSTMT;
106
107void ODBCTestBase::AllocEnvConnHandles(SQLHENV& env_handle, SQLHDBC& conn_handle,
108 SQLINTEGER odbc_ver) {
109 // Allocate an environment handle
110 ASSERT_EQ(SQL_SUCCESS, SQLAllocEnv(&env_handle));
111
112 ASSERT_EQ(
113 SQL_SUCCESS,
114 SQLSetEnvAttr(env_handle, SQL_ATTR_ODBC_VERSION,
115 reinterpret_cast<SQLPOINTER>(static_cast<intptr_t>(odbc_ver)), 0));
116
117 // Allocate a connection using alloc handle
118 ASSERT_EQ(SQL_SUCCESS, SQLAllocHandle(SQL_HANDLE_DBC, env_handle, &conn_handle));
119}
120
121void ODBCTestBase::Connect(std::string connect_str, SQLHENV& env_handle,
122 SQLHDBC& conn_handle, SQLINTEGER odbc_ver) {

Callers 1

TYPED_TESTFunction · 0.80

Calls 3

SQLAllocEnvFunction · 0.85
SQLSetEnvAttrFunction · 0.50
SQLAllocHandleFunction · 0.50

Tested by

no test coverage detected