]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/c_glib/arrow-glib/field.h
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / c_glib / arrow-glib / field.h
1 /*
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
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
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
17 * under the License.
18 */
19
20 #pragma once
21
22 #include <arrow-glib/basic-data-type.h>
23
24 G_BEGIN_DECLS
25
26 #define GARROW_TYPE_FIELD (garrow_field_get_type())
27 G_DECLARE_DERIVABLE_TYPE(GArrowField,
28 garrow_field,
29 GARROW,
30 FIELD,
31 GObject)
32 struct _GArrowFieldClass
33 {
34 GObjectClass parent_class;
35 };
36
37 GARROW_AVAILABLE_IN_6_0
38 GArrowField *
39 garrow_field_import(gpointer c_abi_schema,
40 GError **error);
41
42 GArrowField *garrow_field_new (const gchar *name,
43 GArrowDataType *data_type);
44 GArrowField *garrow_field_new_full (const gchar *name,
45 GArrowDataType *data_type,
46 gboolean nullable);
47
48 GARROW_AVAILABLE_IN_6_0
49 gpointer
50 garrow_field_export(GArrowField *field,
51 GError **error);
52
53 const gchar *garrow_field_get_name (GArrowField *field);
54 GArrowDataType *garrow_field_get_data_type (GArrowField *field);
55 gboolean garrow_field_is_nullable (GArrowField *field);
56
57 gboolean garrow_field_equal (GArrowField *field,
58 GArrowField *other_field);
59
60 gchar *
61 garrow_field_to_string(GArrowField *field);
62 GARROW_AVAILABLE_IN_3_0
63 gchar *
64 garrow_field_to_string_metadata(GArrowField *field,
65 gboolean show_metadata);
66
67 GARROW_AVAILABLE_IN_3_0
68 gboolean
69 garrow_field_has_metadata(GArrowField *field);
70 GARROW_AVAILABLE_IN_3_0
71 GHashTable *
72 garrow_field_get_metadata(GArrowField *field);
73 GARROW_AVAILABLE_IN_3_0
74 GArrowField *
75 garrow_field_with_metadata(GArrowField *field,
76 GHashTable *metadata);
77 GARROW_AVAILABLE_IN_3_0
78 GArrowField *
79 garrow_field_with_merged_metadata(GArrowField *field,
80 GHashTable *metadata);
81 GARROW_AVAILABLE_IN_3_0
82 GArrowField *
83 garrow_field_remove_metadata(GArrowField *field);
84
85 G_END_DECLS