| 107 | } |
| 108 | |
| 109 | std::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 | |
| 124 | bool FlightSqlStatement::ExecutePrepared() { |
| 125 | // GH-47990 TODO: use DCHECK instead of assert |
nothing calls this directly
no test coverage detected