* gaflight_client_do_get: * @client: A #GAFlightClient. * @ticket: A #GAFlightTicket. * @options: (nullable): A #GAFlightCallOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): * The #GAFlightStreamReader to read record batched from the server * on success, %NULL on error. * * Since: 6.0.0 */
| 967 | * Since: 6.0.0 |
| 968 | */ |
| 969 | GAFlightStreamReader * |
| 970 | gaflight_client_do_get(GAFlightClient *client, |
| 971 | GAFlightTicket *ticket, |
| 972 | GAFlightCallOptions *options, |
| 973 | GError **error) |
| 974 | { |
| 975 | auto flight_client = gaflight_client_get_raw(client); |
| 976 | const auto flight_ticket = gaflight_ticket_get_raw(ticket); |
| 977 | arrow::flight::FlightCallOptions flight_default_options; |
| 978 | auto flight_options = &flight_default_options; |
| 979 | if (options) { |
| 980 | flight_options = gaflight_call_options_get_raw(options); |
| 981 | } |
| 982 | auto result = flight_client->DoGet(*flight_options, *flight_ticket); |
| 983 | if (!garrow::check(error, result, "[flight-client][do-get]")) { |
| 984 | return nullptr; |
| 985 | } |
| 986 | auto flight_reader = std::move(*result); |
| 987 | return gaflight_stream_reader_new_raw(flight_reader.release(), TRUE); |
| 988 | } |
| 989 | |
| 990 | /** |
| 991 | * gaflight_client_do_put: |
nothing calls this directly
no test coverage detected