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

Function tiledb_serialize_array_metadata

tiledb/sm/c_api/tiledb.cc:1897–1932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1895}
1896
1897int32_t tiledb_serialize_array_metadata(
1898 tiledb_ctx_t* ctx,
1899 const tiledb_array_t* array,
1900 tiledb_serialization_type_t serialize_type,
1901 tiledb_buffer_t** buffer) {
1902 ensure_array_is_valid(array);
1903
1904 auto buf = tiledb_buffer_handle_t::make_handle(
1905 ctx->resources().serialization_memory_tracker());
1906
1907 // Get metadata to serialize, this will load it if it does not exist
1908 sm::Metadata* metadata = nullptr;
1909 try {
1910 metadata = &array->metadata();
1911 } catch (StatusException& e) {
1912 auto st = Status_Error(e.what());
1913 LOG_STATUS_NO_RETURN_VALUE(st);
1914 save_error(ctx, st);
1915 return TILEDB_ERR;
1916 }
1917
1918 // Serialize
1919 if (SAVE_ERROR_CATCH(
1920 ctx,
1921 tiledb::sm::serialization::metadata_serialize(
1922 metadata,
1923 (tiledb::sm::SerializationType)serialize_type,
1924 buf->buffer()))) {
1925 tiledb_buffer_handle_t::break_handle(buf);
1926 return TILEDB_ERR;
1927 }
1928
1929 *buffer = buf;
1930
1931 return TILEDB_OK;
1932}
1933
1934int32_t tiledb_deserialize_array_metadata(
1935 tiledb_array_t* array,

Callers

nothing calls this directly

Calls 10

ensure_array_is_validFunction · 0.85
Status_ErrorFunction · 0.85
save_errorFunction · 0.85
metadata_serializeFunction · 0.85
resourcesMethod · 0.80
metadataMethod · 0.80
whatMethod · 0.45
bufferMethod · 0.45

Tested by

no test coverage detected