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

Function SQLGetInfo

cpp/src/arrow/flight/sql/odbc/odbc_api.cc:973–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973SQLRETURN SQLGetInfo(SQLHDBC conn, SQLUSMALLINT info_type, SQLPOINTER info_value_ptr,
974 SQLSMALLINT buf_len, SQLSMALLINT* string_length_ptr) {
975 ARROW_LOG(DEBUG) << "SQLGetInfoW called with conn: " << conn
976 << ", info_type: " << info_type
977 << ", info_value_ptr: " << info_value_ptr << ", buf_len: " << buf_len
978 << ", string_length_ptr: "
979 << static_cast<const void*>(string_length_ptr);
980
981 using ODBC::ODBCConnection;
982
983 return ODBCConnection::ExecuteWithDiagnostics(conn, SQL_ERROR, [=]() {
984 ODBCConnection* connection = reinterpret_cast<ODBCConnection*>(conn);
985
986 // Set character type to be Unicode by default
987 const bool is_unicode = true;
988
989 if (!info_value_ptr && !string_length_ptr) {
990 return static_cast<SQLRETURN>(SQL_ERROR);
991 }
992
993 return connection->GetInfo(info_type, info_value_ptr, buf_len, string_length_ptr,
994 is_unicode);
995 });
996}
997
998SQLRETURN SQLGetStmtAttr(SQLHSTMT stmt, SQLINTEGER attribute, SQLPOINTER value_ptr,
999 SQLINTEGER buffer_length, SQLINTEGER* string_length_ptr) {

Callers 3

GetInfoFunction · 0.50
GetInfoSQLWCHARFunction · 0.50
TYPED_TESTFunction · 0.50

Calls 1

GetInfoMethod · 0.45

Tested by 3

GetInfoFunction · 0.40
GetInfoSQLWCHARFunction · 0.40
TYPED_TESTFunction · 0.40