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

Function TestGetTablesV2

cpp/src/arrow/flight/sql/odbc/odbc_impl/main.cc:151–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void TestGetTablesV2(const std::shared_ptr<Connection>& connection) {
152 const std::shared_ptr<Statement>& statement = connection->CreateStatement();
153 const std::shared_ptr<ResultSet>& result_set =
154 statement->GetTables_V2(nullptr, nullptr, nullptr, nullptr);
155
156 const std::shared_ptr<ResultSetMetadata>& metadata = result_set->GetMetadata();
157 size_t column_count = metadata->GetColumnCount();
158
159 while (result_set->Move(1, 0, 0, nullptr) == 1) {
160 int buffer_length = 1024;
161 std::vector<char> result(buffer_length);
162 ssize_t result_length;
163 result_set->GetData(1, arrow::flight::sql::odbc::CDataType_CHAR, 0, 0, result.data(),
164 buffer_length, &result_length);
165 std::cout << result.data() << std::endl;
166 }
167
168 std::cout << column_count << std::endl;
169}
170
171void TestGetColumnsV3(const std::shared_ptr<Connection>& connection) {
172 const std::shared_ptr<Statement>& statement = connection->CreateStatement();

Callers

nothing calls this directly

Calls 7

GetTables_V2Method · 0.80
GetMetadataMethod · 0.80
CreateStatementMethod · 0.45
GetColumnCountMethod · 0.45
MoveMethod · 0.45
GetDataMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected