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

Method BindColumn

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_result_set.cc:251–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249std::shared_ptr<ResultSetMetadata> FlightSqlResultSet::GetMetadata() { return metadata_; }
250
251void FlightSqlResultSet::BindColumn(int column_n, int16_t target_type, int precision,
252 int scale, void* buffer, size_t buffer_length,
253 ssize_t* str_len_buffer) {
254 auto& column = columns_[column_n - 1];
255 if (buffer == nullptr) {
256 if (column.is_bound) {
257 num_binding_--;
258 }
259 column.ResetBinding();
260 return;
261 }
262
263 if (!column.is_bound) {
264 num_binding_++;
265 }
266
267 ColumnBinding binding(util::ConvertCDataTypeFromV2ToV3(target_type), precision, scale,
268 buffer, buffer_length, str_len_buffer);
269 column.SetBinding(binding, schema_->field(column_n - 1)->type()->id());
270}
271
272FlightSqlResultSet::~FlightSqlResultSet() = default;
273} // namespace arrow::flight::sql::odbc

Callers 3

TestBindColumnFunction · 0.80
TestBindColumnBigIntFunction · 0.80
FetchMethod · 0.80

Calls 6

ResetBindingMethod · 0.80
SetBindingMethod · 0.80
idMethod · 0.45
typeMethod · 0.45
fieldMethod · 0.45

Tested by 2

TestBindColumnFunction · 0.64
TestBindColumnBigIntFunction · 0.64