* gaflight_info_new: * @schema: A #GArrowSchema. * @descriptor: A #GAFlightDescriptor. * @endpoints: (element-type GAFlightEndpoint): A list of #GAFlightEndpoint. * @total_records: The number of total records. * @total_bytes: The number of total bytes. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): The newly created #GAFlightInfo, %NULL on error. *
| 924 | * Since: 5.0.0 |
| 925 | */ |
| 926 | GAFlightInfo * |
| 927 | gaflight_info_new(GArrowSchema *schema, |
| 928 | GAFlightDescriptor *descriptor, |
| 929 | GList *endpoints, |
| 930 | gint64 total_records, |
| 931 | gint64 total_bytes, |
| 932 | GError **error) |
| 933 | { |
| 934 | auto arrow_schema = garrow_schema_get_raw(schema); |
| 935 | auto flight_descriptor = gaflight_descriptor_get_raw(descriptor); |
| 936 | std::vector<arrow::flight::FlightEndpoint> flight_endpoints; |
| 937 | for (auto node = endpoints; node; node = node->next) { |
| 938 | auto endpoint = GAFLIGHT_ENDPOINT(node->data); |
| 939 | flight_endpoints.push_back(*gaflight_endpoint_get_raw(endpoint)); |
| 940 | } |
| 941 | auto flight_info_result = arrow::flight::FlightInfo::Make(*arrow_schema, |
| 942 | *flight_descriptor, |
| 943 | flight_endpoints, |
| 944 | total_records, |
| 945 | total_bytes); |
| 946 | if (!garrow::check(error, flight_info_result, "[flight-info][new]")) { |
| 947 | return NULL; |
| 948 | } |
| 949 | return gaflight_info_new_raw(&(*flight_info_result)); |
| 950 | } |
| 951 | |
| 952 | /** |
| 953 | * gaflight_info_equal: |
nothing calls this directly
no test coverage detected