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

Function create_array

examples/cpp_api/object.cc:90–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void create_array(const std::string& array_name, tiledb_array_type_t type) {
91 Context ctx;
92 if (Object::object(ctx, array_name).type() == Object::Type::Array)
93 return;
94
95 Domain domain(ctx);
96 domain.add_dimension(Dimension::create<int>(ctx, "rows", {{1, 4}}, 4))
97 .add_dimension(Dimension::create<int>(ctx, "cols", {{1, 4}}, 4));
98 ArraySchema schema(ctx, type);
99 schema.set_domain(domain).set_order({{TILEDB_ROW_MAJOR, TILEDB_ROW_MAJOR}});
100 schema.add_attribute(Attribute::create<int>(ctx, "a"));
101 Array::create(ctx, array_name, schema);
102}
103
104void move_remove_obj() {
105 tiledb::Context ctx;

Callers 1

create_hierarchyFunction · 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