2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
22 #include <arrow-glib/field.h>
26 #define GARROW_TYPE_SCHEMA (garrow_schema_get_type())
27 G_DECLARE_DERIVABLE_TYPE(GArrowSchema
,
32 struct _GArrowSchemaClass
34 GObjectClass parent_class
;
37 GARROW_AVAILABLE_IN_6_0
39 garrow_schema_import(gpointer c_abi_schema
,
42 GArrowSchema
*garrow_schema_new (GList
*fields
);
44 GARROW_AVAILABLE_IN_6_0
46 garrow_schema_export(GArrowSchema
*schema
,
49 gboolean
garrow_schema_equal (GArrowSchema
*schema
,
50 GArrowSchema
*other_schema
);
51 GArrowField
*garrow_schema_get_field (GArrowSchema
*schema
,
53 GArrowField
*garrow_schema_get_field_by_name(GArrowSchema
*schema
,
55 GARROW_AVAILABLE_IN_0_15
56 gint
garrow_schema_get_field_index (GArrowSchema
*schema
,
59 guint
garrow_schema_n_fields (GArrowSchema
*schema
);
60 GList
*garrow_schema_get_fields (GArrowSchema
*schema
);
62 gchar
*garrow_schema_to_string(GArrowSchema
*schema
);
63 GARROW_AVAILABLE_IN_0_17
64 gchar
*garrow_schema_to_string_metadata(GArrowSchema
*schema
,
65 gboolean show_metadata
);
67 GArrowSchema
*garrow_schema_add_field (GArrowSchema
*schema
,
71 GArrowSchema
*garrow_schema_remove_field (GArrowSchema
*schema
,
74 GArrowSchema
*garrow_schema_replace_field (GArrowSchema
*schema
,
79 GARROW_AVAILABLE_IN_3_0
81 garrow_schema_has_metadata(GArrowSchema
*schema
);
82 GARROW_AVAILABLE_IN_0_17
84 garrow_schema_get_metadata(GArrowSchema
*schema
);
85 GARROW_AVAILABLE_IN_0_17
87 garrow_schema_with_metadata(GArrowSchema
*schema
,
88 GHashTable
*metadata
);