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:249–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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