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

Function SQLGetInfo

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

Source from the content-addressed store, hash-verified

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