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

Method check_delete_conditions

test/src/unit-cppapi-deletes.cc:372–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void DeletesFx::check_delete_conditions(
373 std::vector<QueryCondition> qcs, uint64_t timestamp, bool encrypt) {
374 // Open array.
375 std::unique_ptr<Array> array;
376 if (encrypt) {
377 array = std::make_unique<Array>(
378 ctx_,
379 array_name_.c_str(),
380 TILEDB_READ,
381 TemporalPolicy(TimeTravel, timestamp),
382 EncryptionAlgorithm(AESGCM, key_.c_str()));
383 } else {
384 array = std::make_unique<Array>(
385 ctx_,
386 array_name_.c_str(),
387 TILEDB_READ,
388 TemporalPolicy(TimeTravel, timestamp));
389 }
390 auto array_ptr = array->ptr();
391
392 // Load delete conditions.
393 auto&& [delete_conditions, update_values] = load_delete_and_update_conditions(
394 ctx_.ptr().get()->resources(), *array_ptr->opened_array().get());
395 REQUIRE(delete_conditions.size() == qcs.size());
396
397 for (uint64_t i = 0; i < qcs.size(); i++) {
398 // Compare to negated condition.
399 auto cmp = qcs[i].ptr()->query_condition_->negated_condition();
400 CHECK(tiledb::test::ast_equal(delete_conditions.at(i).ast(), cmp.ast()));
401 }
402
403 array->close();
404}
405
406void DeletesFx::remove_dir(const std::string& path) {
407 if (vfs_.is_dir(path)) {

Callers

nothing calls this directly

Calls 13

TemporalPolicyClass · 0.85
EncryptionAlgorithmClass · 0.85
ast_equalFunction · 0.85
c_strMethod · 0.80
resourcesMethod · 0.80
negated_conditionMethod · 0.80
ptrMethod · 0.45
getMethod · 0.45
opened_arrayMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected