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

Function tiledb_array_delete_fragments_v2

tiledb/api/c_api/array/array_api.cc:229–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229capi_return_t tiledb_array_delete_fragments_v2(
230 tiledb_ctx_t* ctx,
231 const char* uri_str,
232 uint64_t timestamp_start,
233 uint64_t timestamp_end) {
234 // Allocate an array object
235 auto uri = tiledb::sm::URI(uri_str, URI::must_be_valid);
236 tiledb_array_t* array = tiledb_array_t::make_handle(ctx->resources(), uri);
237
238 // Set array open timestamps and open the array for exclusive modification
239 try {
240 array->set_timestamp_start(timestamp_start);
241 array->set_timestamp_end(timestamp_end);
242 throw_if_not_ok(array->open(
243 static_cast<QueryType>(TILEDB_MODIFY_EXCLUSIVE),
244 static_cast<EncryptionType>(TILEDB_NO_ENCRYPTION),
245 nullptr,
246 0));
247 } catch (...) {
248 tiledb_array_t::break_handle(array);
249 throw;
250 }
251
252 // Delete fragments
253 try {
254 array->delete_fragments(uri, timestamp_start, timestamp_end);
255 } catch (...) {
256 throw_if_not_ok(array->close());
257 tiledb_array_t::break_handle(array);
258 throw;
259 }
260
261 // Close and delete the array
262 throw_if_not_ok(array->close());
263 tiledb_array_t::break_handle(array);
264
265 return TILEDB_OK;
266}
267
268capi_return_t tiledb_array_delete_fragments_list(
269 tiledb_ctx_t* ctx,

Callers 2

unit_capi_array.ccFile · 0.85
delete_fragmentsMethod · 0.85

Calls 8

throw_if_not_okFunction · 0.85
resourcesMethod · 0.80
URIClass · 0.50
set_timestamp_startMethod · 0.45
set_timestamp_endMethod · 0.45
openMethod · 0.45
delete_fragmentsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected