Added a scan with hash function and labeled the arguments

This commit is contained in:
2026-01-30 16:42:28 +02:00
parent baa8cc351d
commit 16c1a2c620

View File

@@ -175,8 +175,22 @@ public:
return finishedQuery;
}
void
scan(std::function<bool(const AKey &, const BKey &, Value &)> scanFunction) {
void scan(std::function<bool(const std::size_t firstKeyHash,
const std::size_t secondKeyHash, Value &value)>
scanFunction) {
for (DualkeyHash *hash : hashList) {
if (hash == nullptr) {
continue;
}
if (scanFunction(hash->firstKeyHash, hash->secondKeyHash, hash->value)) {
return;
}
}
}
void scan(std::function<bool(const AKey &firstKey, const BKey &secondKey,
Value &value)>
scanFunction) {
for (DualkeyHash *hash : hashList) {
if (hash == nullptr) {
continue;