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

Method attributes

tiledb/sm/cpp_api/array_schema.h:508–523  ·  view source on GitHub ↗

* Gets all attributes in the array. * * @return Map of attribute name to copy of Attribute instance. */

Source from the content-addressed store, hash-verified

506 * @return Map of attribute name to copy of Attribute instance.
507 */
508 std::unordered_map<std::string, Attribute> attributes() const override {
509 auto& ctx = ctx_.get();
510 tiledb_attribute_t* attrptr;
511 unsigned int nattr;
512 std::unordered_map<std::string, Attribute> attrs;
513 ctx.handle_error(tiledb_array_schema_get_attribute_num(
514 ctx.ptr().get(), schema_.get(), &nattr));
515 for (unsigned int i = 0; i < nattr; ++i) {
516 ctx.handle_error(tiledb_array_schema_get_attribute_from_index(
517 ctx.ptr().get(), schema_.get(), i, &attrptr));
518 auto attr = Attribute(ctx_, attrptr);
519 attrs.emplace(
520 std::pair<std::string, Attribute>(attr.name(), std::move(attr)));
521 }
522 return attrs;
523 }
524
525 /**
526 * Get a copy of an Attribute in the schema by name.

Callers 2

resize_buffersMethod · 0.45
set_query_buffersMethod · 0.45

Calls 8

handle_errorMethod · 0.80
emplaceMethod · 0.80
AttributeClass · 0.70
getMethod · 0.45
ptrMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected