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

Function SQLFetch

cpp/src/arrow/flight/sql/odbc/odbc_api.cc:1087–1107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085}
1086
1087SQLRETURN SQLFetch(SQLHSTMT stmt) {
1088 ARROW_LOG(DEBUG) << "SQLFetch called with stmt: " << stmt;
1089
1090 using ODBC::ODBCDescriptor;
1091 using ODBC::ODBCStatement;
1092 return ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
1093 ODBCStatement* statement = reinterpret_cast<ODBCStatement*>(stmt);
1094
1095 // The SQL_ATTR_ROW_ARRAY_SIZE statement attribute specifies the number of rows in the
1096 // rowset. Retrieve it with GetArraySize.
1097 ODBCDescriptor* ard = statement->GetARD();
1098 size_t rows = static_cast<size_t>(ard->GetArraySize());
1099
1100 if (statement->Fetch(rows)) {
1101 return SQL_SUCCESS;
1102 } else {
1103 // Reached the end of rowset
1104 return SQL_NO_DATA;
1105 }
1106 });
1107}
1108
1109SQLRETURN SQLExtendedFetch(SQLHSTMT stmt, SQLUSMALLINT fetch_orientation,
1110 SQLLEN fetch_offset, SQLULEN* row_count_ptr,

Callers 14

GetSQLColAttributeStringFunction · 0.50
TEST_FFunction · 0.50
TYPED_TESTFunction · 0.50
TEST_FFunction · 0.50
TYPED_TESTFunction · 0.50
TEST_FFunction · 0.50
TYPED_TESTFunction · 0.50
ValidateFetchFunction · 0.50
TEST_FFunction · 0.50

Calls 3

GetARDMethod · 0.80
GetArraySizeMethod · 0.80
FetchMethod · 0.80

Tested by 14

GetSQLColAttributeStringFunction · 0.40
TEST_FFunction · 0.40
TYPED_TESTFunction · 0.40
TEST_FFunction · 0.40
TYPED_TESTFunction · 0.40
TEST_FFunction · 0.40
TYPED_TESTFunction · 0.40
ValidateFetchFunction · 0.40
TEST_FFunction · 0.40