* 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
| 10819 | * Since: 23.0.0 |
| 10820 | */ |
| 10821 | void |
| 10822 | garrow_make_struct_options_add_field(GArrowMakeStructOptions *options, |
| 10823 | const char *name, |
| 10824 | gboolean nullability, |
| 10825 | GHashTable *metadata) |
| 10826 | { |
| 10827 | auto arrow_options = garrow_make_struct_options_get_raw(options); |
| 10828 | arrow_options->field_names.emplace_back(name); |
| 10829 | arrow_options->field_nullability.push_back(nullability != FALSE); |
| 10830 | if (metadata) { |
| 10831 | arrow_options->field_metadata.push_back( |
| 10832 | garrow_internal_hash_table_to_metadata(metadata)); |
| 10833 | } else { |
| 10834 | arrow_options->field_metadata.push_back(nullptr); |
| 10835 | } |
| 10836 | } |
| 10837 | |
| 10838 | G_END_DECLS |
| 10839 |
nothing calls this directly
no test coverage detected