| 93 | } |
| 94 | |
| 95 | SQLRETURN ODBCConnection::GetInfo(SQLUSMALLINT info_type, SQLPOINTER value, |
| 96 | SQLSMALLINT buffer_length, SQLSMALLINT* output_length, |
| 97 | bool is_unicode) { |
| 98 | switch (info_type) { |
| 99 | case SQL_ACTIVE_ENVIRONMENTS: |
| 100 | GetAttribute(static_cast<SQLUSMALLINT>(0), value, buffer_length, output_length); |
| 101 | return SQL_SUCCESS; |
| 102 | #ifdef SQL_ASYNC_DBC_FUNCTIONS |
| 103 | case SQL_ASYNC_DBC_FUNCTIONS: |
| 104 | GetAttribute(static_cast<SQLUINTEGER>(SQL_ASYNC_DBC_NOT_CAPABLE), value, |
| 105 | buffer_length, output_length); |
| 106 | return SQL_SUCCESS; |
| 107 | #endif |
| 108 | case SQL_ASYNC_MODE: |
| 109 | GetAttribute(static_cast<SQLUINTEGER>(SQL_AM_NONE), value, buffer_length, |
| 110 | output_length); |
| 111 | return SQL_SUCCESS; |
| 112 | #ifdef SQL_ASYNC_NOTIFICATION |
| 113 | case SQL_ASYNC_NOTIFICATION: |
| 114 | GetAttribute(static_cast<SQLUINTEGER>(SQL_ASYNC_NOTIFICATION_NOT_CAPABLE), value, |
| 115 | buffer_length, output_length); |
| 116 | return SQL_SUCCESS; |
| 117 | #endif |
| 118 | case SQL_BATCH_ROW_COUNT: |
| 119 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
| 120 | return SQL_SUCCESS; |
| 121 | case SQL_BATCH_SUPPORT: |
| 122 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
| 123 | return SQL_SUCCESS; |
| 124 | case SQL_DATA_SOURCE_NAME: |
| 125 | return GetStringAttribute(is_unicode, dsn_, true, value, buffer_length, |
| 126 | output_length, GetDiagnostics()); |
| 127 | case SQL_DRIVER_ODBC_VER: |
| 128 | return GetStringAttribute(is_unicode, "03.80", true, value, buffer_length, |
| 129 | output_length, GetDiagnostics()); |
| 130 | case SQL_DYNAMIC_CURSOR_ATTRIBUTES1: |
| 131 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
| 132 | return SQL_SUCCESS; |
| 133 | case SQL_DYNAMIC_CURSOR_ATTRIBUTES2: |
| 134 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
| 135 | return SQL_SUCCESS; |
| 136 | case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1: |
| 137 | GetAttribute(static_cast<SQLUINTEGER>(SQL_CA1_NEXT), value, buffer_length, |
| 138 | output_length); |
| 139 | return SQL_SUCCESS; |
| 140 | case SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2: |
| 141 | GetAttribute(static_cast<SQLUINTEGER>(SQL_CA2_READ_ONLY_CONCURRENCY), value, |
| 142 | buffer_length, output_length); |
| 143 | return SQL_SUCCESS; |
| 144 | case SQL_FILE_USAGE: |
| 145 | GetAttribute(static_cast<SQLUSMALLINT>(SQL_FILE_NOT_SUPPORTED), value, |
| 146 | buffer_length, output_length); |
| 147 | return SQL_SUCCESS; |
| 148 | case SQL_KEYSET_CURSOR_ATTRIBUTES1: |
| 149 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
| 150 | return SQL_SUCCESS; |
| 151 | case SQL_KEYSET_CURSOR_ATTRIBUTES2: |
| 152 | GetAttribute(static_cast<SQLUINTEGER>(0), value, buffer_length, output_length); |
nothing calls this directly
no test coverage detected