MCPcopy Create free account
hub / github.com/apache/arrow / gaflight_client_new

Function gaflight_client_new

c_glib/arrow-flight-glib/client.cpp:792–811  ·  view source on GitHub ↗

* gaflight_client_new: * @location: A #GAFlightLocation to be connected. * @options: (nullable): A #GAFlightClientOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): The newly created client, %NULL on error. * * Since: 5.0.0 */

Source from the content-addressed store, hash-verified

790 * Since: 5.0.0
791 */
792GAFlightClient *
793gaflight_client_new(GAFlightLocation *location,
794 GAFlightClientOptions *options,
795 GError **error)
796{
797 const auto flight_location = gaflight_location_get_raw(location);
798 arrow::Result<std::unique_ptr<arrow::flight::FlightClient>> result;
799 if (options) {
800 const auto flight_options = gaflight_client_options_get_raw(options);
801 result = arrow::flight::FlightClient::Connect(*flight_location, *flight_options);
802 } else {
803 result = arrow::flight::FlightClient::Connect(*flight_location);
804 }
805 if (garrow::check(error, result, "[flight-client][new]")) {
806 std::shared_ptr<arrow::flight::FlightClient> flight_client = std::move(*result);
807 return gaflight_client_new_raw(&flight_client);
808 } else {
809 return NULL;
810 }
811}
812
813/**
814 * gaflight_client_close:

Callers

nothing calls this directly

Calls 4

gaflight_client_new_rawFunction · 0.85
checkFunction · 0.50

Tested by

no test coverage detected