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