| 370 | } |
| 371 | |
| 372 | void 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 | |
| 406 | void DeletesFx::remove_dir(const std::string& path) { |
| 407 | if (vfs_.is_dir(path)) { |
nothing calls this directly
no test coverage detected