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

Function create_string_array

test/src/unit-cppapi-hilbert.cc:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void create_string_array(Context ctx, const std::string& array_name) {
88 Domain domain(ctx);
89 auto d1 = Dimension::create(ctx, "d1", TILEDB_STRING_ASCII, nullptr, nullptr);
90 auto d2 = Dimension::create(ctx, "d2", TILEDB_STRING_ASCII, nullptr, nullptr);
91 domain.add_dimensions(d1, d2);
92 auto a = Attribute::create<int32_t>(ctx, "a");
93 ArraySchema schema(ctx, TILEDB_SPARSE);
94 schema.set_domain(domain);
95 schema.add_attribute(a);
96 schema.set_cell_order(TILEDB_HILBERT);
97 schema.set_capacity(2);
98 CHECK_NOTHROW(schema.check());
99 Array::create(array_name, schema);
100}
101
102template <class T1, class T2>
103void write_2d_array(

Callers 1

Calls 5

set_domainMethod · 0.45
add_attributeMethod · 0.45
set_cell_orderMethod · 0.45
set_capacityMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected