Method
ArrowListArrayBuilderappend
deprecated: 0.12.0
Declaration [src]
gboolean
garrow_list_array_builder_append (
GArrowListArrayBuilder* builder
GError** error
)
Description
No description available.
Deprecated since: 0.12.0
Use garrow_list_array_builder_append_value()
instead.
Return value
Type: gboolean
TRUE
on success, FALSE
if there was an error.
It appends a new list element. To append a new list element, you
need to call this function then append list element values to
value_builder
. value_builder
is the GArrowArrayBuilder
specified to constructor. You can get value_builder
by garrow_list_array_builder_get_value_builder().
GArrowInt8ArrayBuilder *value_builder;
GArrowListArrayBuilder *builder;
value_builder = garrow_int8_array_builder_new();
builder = garrow_list_array_builder_new(value_builder, NULL);
// Start 0th list element: [1, 0, -1]
garrow_list_array_builder_append(builder, NULL);
garrow_int8_array_builder_append(value_builder, 1);
garrow_int8_array_builder_append(value_builder, 0);
garrow_int8_array_builder_append(value_builder, -1);
// Start 1st list element: [-29, 29]
garrow_list_array_builder_append(builder, NULL);
garrow_int8_array_builder_append(value_builder, -29);
garrow_int8_array_builder_append(value_builder, 29);
{
// [[1, 0, -1], [-29, 29]]
GArrowArray *array = garrow_array_builder_finish(builder);
// Now, builder is needless.
g_object_unref(builder);
g_object_unref(value_builder);
// Use array...
g_object_unref(array);
}