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

Function TestGetData

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

Source from the content-addressed store, hash-verified

79}
80
81void 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
99void TestBindColumnBigInt(const std::shared_ptr<Connection>& connection) {
100 const std::shared_ptr<Statement>& statement = connection->CreateStatement();

Callers 1

mainFunction · 0.85

Calls 6

GetResultSetMethod · 0.80
GetMetadataMethod · 0.80
CreateStatementMethod · 0.45
ExecuteMethod · 0.45
MoveMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected