* gaflightsql_client_execute_update: * @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: The number of changed records. * * Since: 13.0.0 */
| 520 | * Since: 13.0.0 |
| 521 | */ |
| 522 | gint64 |
| 523 | gaflightsql_client_execute_update(GAFlightSQLClient *client, |
| 524 | const gchar *query, |
| 525 | GAFlightCallOptions *options, |
| 526 | GError **error) |
| 527 | { |
| 528 | auto flight_sql_client = gaflightsql_client_get_raw(client); |
| 529 | arrow::flight::FlightCallOptions flight_default_options; |
| 530 | auto flight_options = &flight_default_options; |
| 531 | if (options) { |
| 532 | flight_options = gaflight_call_options_get_raw(options); |
| 533 | } |
| 534 | auto result = flight_sql_client->ExecuteUpdate(*flight_options, query); |
| 535 | if (!garrow::check(error, result, "[flight-sql-client][execute-update]")) { |
| 536 | return 0; |
| 537 | } |
| 538 | return *result; |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * gaflightsql_client_do_get: |
nothing calls this directly
no test coverage detected