* gaflightsql_client_execute: * @client: A #GAFlightSQLClient. * @query: A query to be executed in the UTF-8 format. * @options: (nullable): A #GAFlightCallOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The #GAFlightInfo describing * where to access the dataset on success, %NULL on error. * * Since: 9.0.0 */
| 489 | * Since: 9.0.0 |
| 490 | */ |
| 491 | GAFlightInfo * |
| 492 | gaflightsql_client_execute(GAFlightSQLClient *client, |
| 493 | const gchar *query, |
| 494 | GAFlightCallOptions *options, |
| 495 | GError **error) |
| 496 | { |
| 497 | auto flight_sql_client = gaflightsql_client_get_raw(client); |
| 498 | arrow::flight::FlightCallOptions flight_default_options; |
| 499 | auto flight_options = &flight_default_options; |
| 500 | if (options) { |
| 501 | flight_options = gaflight_call_options_get_raw(options); |
| 502 | } |
| 503 | auto result = flight_sql_client->Execute(*flight_options, query); |
| 504 | if (!garrow::check(error, result, "[flight-sql-client][execute]")) { |
| 505 | return nullptr; |
| 506 | } |
| 507 | auto flight_info = std::move(*result); |
| 508 | return gaflight_info_new_raw(flight_info.release()); |
| 509 | } |
| 510 | |
| 511 | /** |
| 512 | * gaflightsql_client_execute_update: |
nothing calls this directly
no test coverage detected