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

Method Prepare

cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_statement.cc:109–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109std::optional<std::shared_ptr<ResultSetMetadata>> FlightSqlStatement::Prepare(
110 const std::string& query) {
111 ClosePreparedStatementIfAny(prepared_statement_, call_options_);
112
113 Result<std::shared_ptr<PreparedStatement>> result =
114 sql_client_.Prepare(call_options_, query);
115 ThrowIfNotOK(result.status());
116
117 prepared_statement_ = *result;
118
119 const auto& result_set_metadata = std::make_shared<FlightSqlResultSetMetadata>(
120 prepared_statement_->dataset_schema(), metadata_settings_);
121 return std::optional<std::shared_ptr<ResultSetMetadata>>(result_set_metadata);
122}
123
124bool FlightSqlStatement::ExecutePrepared() {
125 // GH-47990 TODO: use DCHECK instead of assert

Callers

nothing calls this directly

Calls 3

ThrowIfNotOKFunction · 0.85
statusMethod · 0.45

Tested by

no test coverage detected