* gaflightsql_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: 9.0.0 */
| 552 | * Since: 9.0.0 |
| 553 | */ |
| 554 | GAFlightStreamReader * |
| 555 | gaflightsql_client_do_get(GAFlightSQLClient *client, |
| 556 | GAFlightTicket *ticket, |
| 557 | GAFlightCallOptions *options, |
| 558 | GError **error) |
| 559 | { |
| 560 | auto flight_sql_client = gaflightsql_client_get_raw(client); |
| 561 | const auto flight_ticket = gaflight_ticket_get_raw(ticket); |
| 562 | arrow::flight::FlightCallOptions flight_default_options; |
| 563 | auto flight_options = &flight_default_options; |
| 564 | if (options) { |
| 565 | flight_options = gaflight_call_options_get_raw(options); |
| 566 | } |
| 567 | auto result = flight_sql_client->DoGet(*flight_options, *flight_ticket); |
| 568 | if (!garrow::check(error, result, "[flight-sql-client][do-get]")) { |
| 569 | return nullptr; |
| 570 | } |
| 571 | auto flight_reader = std::move(*result); |
| 572 | return gaflight_stream_reader_new_raw(flight_reader.release(), TRUE); |
| 573 | } |
| 574 | |
| 575 | /** |
| 576 | * gaflightsql_client_prepare: |
nothing calls this directly
no test coverage detected