* It gets a metadata item from an open array using an index. * The array must be opened in READ mode, otherwise the function will * error out. * * @param index The index used to get the metadata. * @param key The metadata key. * @param value_type The datatype of the value. * @param value_num The value may consist of more than one items of the * same datatype. This argum
| 1166 | * @param value The metadata value in binary form. |
| 1167 | */ |
| 1168 | void get_metadata_from_index( |
| 1169 | uint64_t index, |
| 1170 | std::string* key, |
| 1171 | tiledb_datatype_t* value_type, |
| 1172 | uint32_t* value_num, |
| 1173 | const void** value) { |
| 1174 | const char* key_c; |
| 1175 | uint32_t key_len; |
| 1176 | auto& ctx = ctx_.get(); |
| 1177 | tiledb_ctx_t* c_ctx = ctx.ptr().get(); |
| 1178 | ctx.handle_error(tiledb_array_get_metadata_from_index( |
| 1179 | c_ctx, |
| 1180 | array_.get(), |
| 1181 | index, |
| 1182 | &key_c, |
| 1183 | &key_len, |
| 1184 | value_type, |
| 1185 | value_num, |
| 1186 | value)); |
| 1187 | key->resize(key_len); |
| 1188 | std::memcpy((void*)key->data(), key_c, key_len); |
| 1189 | } |
| 1190 | |
| 1191 | private: |
| 1192 | /* ********************************* */ |
no test coverage detected