| 971 | } |
| 972 | |
| 973 | SQLRETURN 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 | |
| 998 | SQLRETURN SQLGetStmtAttr(SQLHSTMT stmt, SQLINTEGER attribute, SQLPOINTER value_ptr, |
| 999 | SQLINTEGER buffer_length, SQLINTEGER* string_length_ptr) { |