| 79 | } |
| 80 | |
| 81 | void TestGetData(const std::shared_ptr<Connection>& connection) { |
| 82 | const std::shared_ptr<Statement>& statement = connection->CreateStatement(); |
| 83 | statement->Execute( |
| 84 | "SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL " |
| 85 | "SELECT 5 UNION ALL SELECT 6"); |
| 86 | |
| 87 | const std::shared_ptr<ResultSet>& result_set = statement->GetResultSet(); |
| 88 | const std::shared_ptr<ResultSetMetadata>& metadata = result_set->GetMetadata(); |
| 89 | |
| 90 | while (result_set->Move(1, 0, 0, nullptr) == 1) { |
| 91 | char result[128]; |
| 92 | ssize_t result_length; |
| 93 | result_set->GetData(1, arrow::flight::sql::odbc::CDataType_CHAR, 0, 0, &result, |
| 94 | sizeof(result), &result_length); |
| 95 | std::cout << result << std::endl; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | void TestBindColumnBigInt(const std::shared_ptr<Connection>& connection) { |
| 100 | const std::shared_ptr<Statement>& statement = connection->CreateStatement(); |
no test coverage detected