MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / create_array

Function create_array

examples/cpp_api/groups.cc:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49using namespace tiledb;
50
51void create_array(const std::string& array_name, tiledb_array_type_t type) {
52 Context ctx;
53 if (Object::object(ctx, array_name).type() == Object::Type::Array)
54 return;
55
56 Domain domain(ctx);
57 domain.add_dimension(Dimension::create<int>(ctx, "rows", {{1, 4}}, 4))
58 .add_dimension(Dimension::create<int>(ctx, "cols", {{1, 4}}, 4));
59 ArraySchema schema(ctx, type);
60 schema.set_domain(domain).set_order({{TILEDB_ROW_MAJOR, TILEDB_ROW_MAJOR}});
61 schema.add_attribute(Attribute::create<int>(ctx, "a"));
62 Array::create(ctx, array_name, schema);
63}
64
65void create_arrays_groups() {
66 tiledb::Context ctx;

Callers 1

create_arrays_groupsFunction · 0.70

Calls 4

typeMethod · 0.45
add_dimensionMethod · 0.45
set_domainMethod · 0.45
add_attributeMethod · 0.45

Tested by

no test coverage detected