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

Method has_metadata

tiledb/sm/cpp_api/array.h:1133–1140  ·  view source on GitHub ↗

* Checks if key exists in metadata from an open array. The array must * be opened in READ mode, otherwise the function will error out. * * @param key The key of the metadata item to be retrieved. UTF-8 encodings * are acceptable. * @param value_type The datatype of the value associated with the key (if * any). * @return true if the key exists, else false. * @note If the

Source from the content-addressed store, hash-verified

1131 * @note If the key does not exist, then `value_type` will not be modified.
1132 */
1133 bool has_metadata(const std::string& key, tiledb_datatype_t* value_type) {
1134 auto& ctx = ctx_.get();
1135 tiledb_ctx_t* c_ctx = ctx.ptr().get();
1136 int32_t has_key;
1137 ctx.handle_error(tiledb_array_has_metadata_key(
1138 c_ctx, array_.get(), key.c_str(), value_type, &has_key));
1139 return has_key == 1;
1140 }
1141
1142 /**
1143 * Returns then number of metadata items in an open array. The array must

Callers 2

Calls 5

handle_errorMethod · 0.80
c_strMethod · 0.80
getMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected