Skip to content

Commit 99df81f

Browse files
Add method to list keys
Adds interface for the method to list keys available in the cache. Relates-To: HERESDK-8383 Signed-off-by: Mykhailo Diachenko <[email protected]>
1 parent e2da4d1 commit 99df81f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

olp-cpp-sdk-core/include/olp/core/cache/KeyValueCache.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,20 @@ class CORE_API KeyValueCache {
244244
OLP_SDK_CORE_UNUSED(prefix);
245245
return client::ApiError(client::ErrorCode::Unknown, "Not implemented");
246246
}
247+
248+
/**
249+
* @brief Lists the keys that match the given prefix.
250+
*
251+
* @param prefix The prefix that matches the keys.
252+
*
253+
* @return The collection of matched keys or an error. Empty collection if not
254+
* keys match the prefix.
255+
*/
256+
virtual OperationOutcome<KeyListType> ListKeysWithPrefix(
257+
const std::string& prefix) {
258+
OLP_SDK_CORE_UNUSED(prefix);
259+
return client::ApiError(client::ErrorCode::Unknown, "Not implemented");
260+
}
247261
};
248262

249263
} // namespace cache

0 commit comments

Comments
 (0)