| 137 | } |
| 138 | |
| 139 | bool FlightSqlStatement::Execute(const std::string& query) { |
| 140 | ClosePreparedStatementIfAny(prepared_statement_, call_options_); |
| 141 | |
| 142 | Result<std::shared_ptr<FlightInfo>> result = sql_client_.Execute(call_options_, query); |
| 143 | ThrowIfNotOK(result.status()); |
| 144 | |
| 145 | current_result_set_ = std::make_shared<FlightSqlResultSet>( |
| 146 | sql_client_, client_options_, call_options_, result.ValueOrDie(), nullptr, |
| 147 | diagnostics_, metadata_settings_); |
| 148 | |
| 149 | return true; |
| 150 | } |
| 151 | |
| 152 | std::shared_ptr<ResultSet> FlightSqlStatement::GetResultSet() { |
| 153 | return current_result_set_; |