* garrow_make_struct_options_add_field: * @options: A #GArrowMakeStructOptions. * @name: The name of the field to add. * @nullability: Whether the field is nullable. * @metadata: (nullable) (element-type utf8 utf8): A #GHashTable for the field's * metadata, or %NULL. * * Adds a field to the struct options with the specified name, nullability, * and optional metadata. * * Since: 23.0.0
| 10872 | * Since: 23.0.0 |
| 10873 | */ |
| 10874 | void |
| 10875 | garrow_make_struct_options_add_field(GArrowMakeStructOptions *options, |
| 10876 | const char *name, |
| 10877 | gboolean nullability, |
| 10878 | GHashTable *metadata) |
| 10879 | { |
| 10880 | auto arrow_options = garrow_make_struct_options_get_raw(options); |
| 10881 | arrow_options->field_names.emplace_back(name); |
| 10882 | arrow_options->field_nullability.push_back(nullability != FALSE); |
| 10883 | if (metadata) { |
| 10884 | arrow_options->field_metadata.push_back( |
| 10885 | garrow_internal_hash_table_to_metadata(metadata)); |
| 10886 | } else { |
| 10887 | arrow_options->field_metadata.push_back(nullptr); |
| 10888 | } |
| 10889 | } |
| 10890 | |
| 10891 | G_END_DECLS |
| 10892 |
nothing calls this directly
no test coverage detected