* garrow_function_to_string: * @function: A #GArrowFunction. * * Returns: The formatted function. * * It should be freed with g_free() when no longer needed. * * Since: 7.0.0 */
| 974 | * Since: 7.0.0 |
| 975 | */ |
| 976 | gchar * |
| 977 | garrow_function_to_string(GArrowFunction *function) |
| 978 | { |
| 979 | auto priv = GARROW_FUNCTION_GET_PRIVATE(function); |
| 980 | auto arrow_function = garrow_function_get_raw(function); |
| 981 | const auto &arrow_doc = arrow_function->doc(); |
| 982 | const auto arrow_default_options = arrow_function->default_options(); |
| 983 | auto string = g_string_new(NULL); |
| 984 | g_string_append_printf(string, "%s(", priv->name); |
| 985 | int i = 0; |
| 986 | for (const auto &arrow_arg_name : arrow_doc.arg_names) { |
| 987 | if (i > 0) { |
| 988 | g_string_append(string, ", "); |
| 989 | } |
| 990 | g_string_append(string, arrow_arg_name.c_str()); |
| 991 | ++i; |
| 992 | } |
| 993 | if (arrow_default_options) { |
| 994 | if (i > 0) { |
| 995 | g_string_append(string, ", "); |
| 996 | } |
| 997 | const auto options_string = arrow_default_options->ToString(); |
| 998 | g_string_append(string, options_string.c_str()); |
| 999 | } |
| 1000 | g_string_append_printf(string, "): %s", arrow_doc.summary.c_str()); |
| 1001 | return g_string_free(string, FALSE); |
| 1002 | } |
| 1003 | |
| 1004 | typedef struct GArrowExecuteNodeOptionsPrivate_ |
| 1005 | { |
nothing calls this directly
no test coverage detected