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

Function CheckSQLColumns

cpp/src/arrow/flight/sql/odbc/tests/columns_test.cc:52–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50// GH-49702: TODO Disabled on Linux due to BlockingQueue issue
51#ifndef __linux__
52void CheckSQLColumns(
53 SQLHSTMT stmt, const std::wstring& expected_table,
54 const std::wstring& expected_column, const SQLINTEGER& expected_data_type,
55 const std::wstring& expected_type_name, const SQLINTEGER& expected_column_size,
56 const SQLINTEGER& expected_buffer_length, const SQLSMALLINT& expected_decimal_digits,
57 const SQLSMALLINT& expected_num_prec_radix, const SQLSMALLINT& expected_nullable,
58 const SQLSMALLINT& expected_sql_data_type, const SQLSMALLINT& expected_date_time_sub,
59 const SQLINTEGER& expected_octet_char_length,
60 const SQLINTEGER& expected_ordinal_position,
61 const std::wstring& expected_is_nullable) {
62 CheckStringColumnW(stmt, 3, expected_table); // table name
63 CheckStringColumnW(stmt, 4, expected_column); // column name
64
65 CheckIntColumn(stmt, 5, expected_data_type); // data type
66
67 CheckStringColumnW(stmt, 6, expected_type_name); // type name
68
69 CheckIntColumn(stmt, 7, expected_column_size); // column size
70 CheckIntColumn(stmt, 8, expected_buffer_length); // buffer length
71
72 CheckSmallIntColumn(stmt, 9, expected_decimal_digits); // decimal digits
73 CheckSmallIntColumn(stmt, 10, expected_num_prec_radix); // num prec radix
74 CheckSmallIntColumn(stmt, 11,
75 expected_nullable); // nullable
76
77 CheckNullColumnW(stmt, 12); // remarks
78 CheckNullColumnW(stmt, 13); // column def
79
80 CheckSmallIntColumn(stmt, 14, expected_sql_data_type); // sql data type
81 CheckSmallIntColumn(stmt, 15, expected_date_time_sub); // sql date type sub
82 CheckIntColumn(stmt, 16, expected_octet_char_length); // char octet length
83 CheckIntColumn(stmt, 17,
84 expected_ordinal_position); // oridinal position
85
86 CheckStringColumnW(stmt, 18, expected_is_nullable); // is nullable
87}
88
89void CheckMockSQLColumns(
90 SQLHSTMT stmt, const std::wstring& expected_catalog,

Callers 2

CheckMockSQLColumnsFunction · 0.85
CheckRemoteSQLColumnsFunction · 0.85

Calls 4

CheckStringColumnWFunction · 0.85
CheckIntColumnFunction · 0.85
CheckSmallIntColumnFunction · 0.85
CheckNullColumnWFunction · 0.85

Tested by

no test coverage detected