* gaflight_client_do_put: * @client: A #GAFlightClient. * @descriptor: A #GAFlightDescriptor. * @schema: A #GArrowSchema. * @options: (nullable): A #GAFlightCallOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Upload data to a Flight described by the given descriptor. The * caller must call garrow_record_batch_writer_close() on the * returned stream once they are
| 1010 | * Since: 18.0.0 |
| 1011 | */ |
| 1012 | GAFlightDoPutResult * |
| 1013 | gaflight_client_do_put(GAFlightClient *client, |
| 1014 | GAFlightDescriptor *descriptor, |
| 1015 | GArrowSchema *schema, |
| 1016 | GAFlightCallOptions *options, |
| 1017 | GError **error) |
| 1018 | { |
| 1019 | auto flight_client = gaflight_client_get_raw(client); |
| 1020 | auto flight_descriptor = gaflight_descriptor_get_raw(descriptor); |
| 1021 | auto arrow_schema = garrow_schema_get_raw(schema); |
| 1022 | arrow::flight::FlightCallOptions flight_default_options; |
| 1023 | auto flight_options = &flight_default_options; |
| 1024 | if (options) { |
| 1025 | flight_options = gaflight_call_options_get_raw(options); |
| 1026 | } |
| 1027 | auto result = flight_client->DoPut(*flight_options, *flight_descriptor, arrow_schema); |
| 1028 | if (!garrow::check(error, result, "[flight-client][do-put]")) { |
| 1029 | return nullptr; |
| 1030 | } |
| 1031 | auto flight_result = std::move(*result); |
| 1032 | return gaflight_do_put_result_new_raw(&flight_result); |
| 1033 | } |
| 1034 | |
| 1035 | G_END_DECLS |
| 1036 |
nothing calls this directly
no test coverage detected