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