]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/c_glib/arrow-glib/datum.h
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / c_glib / arrow-glib / datum.h
CommitLineData
1d09f67e
TL
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/array.h>
23#include <arrow-glib/chunked-array.h>
24#include <arrow-glib/record-batch.h>
25#include <arrow-glib/scalar.h>
26#include <arrow-glib/table.h>
27
28G_BEGIN_DECLS
29
30#define GARROW_TYPE_DATUM (garrow_datum_get_type())
31G_DECLARE_DERIVABLE_TYPE(GArrowDatum,
32 garrow_datum,
33 GARROW,
34 DATUM,
35 GObject)
36struct _GArrowDatumClass
37{
38 GObjectClass parent_class;
39};
40
41GARROW_AVAILABLE_IN_1_0
42gboolean garrow_datum_is_array(GArrowDatum *datum);
43GARROW_AVAILABLE_IN_1_0
44gboolean garrow_datum_is_array_like(GArrowDatum *datum);
45GARROW_AVAILABLE_IN_5_0
46gboolean garrow_datum_is_scalar(GArrowDatum *datum);
47GARROW_AVAILABLE_IN_5_0
48gboolean garrow_datum_is_value(GArrowDatum *datum);
49/*
50GARROW_AVAILABLE_IN_5_0
51gboolean garrow_datum_is_collection(GArrowDatum *datum);
52*/
53GARROW_AVAILABLE_IN_1_0
54gboolean garrow_datum_equal(GArrowDatum *datum,
55 GArrowDatum *other_datum);
56GARROW_AVAILABLE_IN_1_0
57gchar *garrow_datum_to_string(GArrowDatum *datum);
58
59/* GARROW_TYPE_NONE_DATUM */
60
61#define GARROW_TYPE_SCALAR_DATUM (garrow_scalar_datum_get_type())
62G_DECLARE_DERIVABLE_TYPE(GArrowScalarDatum,
63 garrow_scalar_datum,
64 GARROW,
65 SCALAR_DATUM,
66 GArrowDatum)
67struct _GArrowScalarDatumClass
68{
69 GArrowDatumClass parent_class;
70};
71
72GARROW_AVAILABLE_IN_5_0
73GArrowScalarDatum *garrow_scalar_datum_new(GArrowScalar *value);
74
75#define GARROW_TYPE_ARRAY_DATUM (garrow_array_datum_get_type())
76G_DECLARE_DERIVABLE_TYPE(GArrowArrayDatum,
77 garrow_array_datum,
78 GARROW,
79 ARRAY_DATUM,
80 GArrowDatum)
81struct _GArrowArrayDatumClass
82{
83 GArrowDatumClass parent_class;
84};
85
86GARROW_AVAILABLE_IN_1_0
87GArrowArrayDatum *garrow_array_datum_new(GArrowArray *value);
88
89#define GARROW_TYPE_CHUNKED_ARRAY_DATUM (garrow_chunked_array_datum_get_type())
90G_DECLARE_DERIVABLE_TYPE(GArrowChunkedArrayDatum,
91 garrow_chunked_array_datum,
92 GARROW,
93 CHUNKED_ARRAY_DATUM,
94 GArrowDatum)
95struct _GArrowChunkedArrayDatumClass
96{
97 GArrowDatumClass parent_class;
98};
99
100GARROW_AVAILABLE_IN_1_0
101GArrowChunkedArrayDatum *
102garrow_chunked_array_datum_new(GArrowChunkedArray *value);
103
104#define GARROW_TYPE_RECORD_BATCH_DATUM (garrow_record_batch_datum_get_type())
105G_DECLARE_DERIVABLE_TYPE(GArrowRecordBatchDatum,
106 garrow_record_batch_datum,
107 GARROW,
108 RECORD_BATCH_DATUM,
109 GArrowDatum)
110struct _GArrowRecordBatchDatumClass
111{
112 GArrowDatumClass parent_class;
113};
114
115GARROW_AVAILABLE_IN_1_0
116GArrowRecordBatchDatum *
117garrow_record_batch_datum_new(GArrowRecordBatch *value);
118
119#define GARROW_TYPE_TABLE_DATUM (garrow_table_datum_get_type())
120G_DECLARE_DERIVABLE_TYPE(GArrowTableDatum,
121 garrow_table_datum,
122 GARROW,
123 TABLE_DATUM,
124 GArrowDatum)
125struct _GArrowTableDatumClass
126{
127 GArrowDatumClass parent_class;
128};
129
130GARROW_AVAILABLE_IN_1_0
131GArrowTableDatum *garrow_table_datum_new(GArrowTable *value);
132
133/* GARROW_TYPE_COLLECTION_DATUM */
134
135G_END_DECLS