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

Function BindParameters

cpp/src/arrow/flight/sql/client.cc:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101arrow::Result<std::shared_ptr<Buffer>> BindParameters(FlightClient* client,
102 const FlightCallOptions& options,
103 const FlightDescriptor& descriptor,
104 RecordBatchReader* params) {
105 ARROW_ASSIGN_OR_RAISE(auto stream,
106 client->DoPut(options, descriptor, params->schema()));
107 while (true) {
108 ARROW_ASSIGN_OR_RAISE(auto batch, params->Next());
109 if (!batch) break;
110 ARROW_RETURN_NOT_OK(stream.writer->WriteRecordBatch(*batch));
111 }
112 ARROW_RETURN_NOT_OK(stream.writer->DoneWriting());
113 std::shared_ptr<Buffer> metadata;
114 ARROW_RETURN_NOT_OK(stream.reader->ReadMetadata(&metadata));
115 ARROW_RETURN_NOT_OK(stream.writer->Close());
116 return metadata;
117}
118
119} // namespace
120

Callers 1

client.ccFile · 0.85

Calls 3

DoneWritingMethod · 0.80
ReadMetadataMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected