# HG changeset patch # User Alain Mazy # Date 1747751944 -7200 # Node ID d6b3379795a54a0472da29f844bdedaf8a6708d9 # Parent 756983d498bbefed77f4a2f05c9b58c62dbd12b1 ListKeyValues in protobuf diff -r 756983d498bb -r d6b3379795a5 OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp --- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp Tue May 20 16:24:56 2025 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp Tue May 20 16:39:04 2025 +0200 @@ -1929,15 +1929,16 @@ virtual void ListKeysValues(std::list& keys, std::list& values, const std::string& storeId, - bool first, - const std::string& from, + bool fromFirst, + const std::string& fromKey, uint64_t limit) ORTHANC_OVERRIDE { if (database_.GetDatabaseCapabilities().HasKeyValueStoresSupport()) { DatabasePluginMessages::TransactionRequest request; request.mutable_list_key_values()->set_store_id(storeId); - // request.mutable_list_key_values()->set_since(since); // TODO_ATTACH_CUSTOM_DATA + request.mutable_list_key_values()->set_from_first(fromFirst); + request.mutable_list_key_values()->set_from_key(fromKey); request.mutable_list_key_values()->set_limit(limit); DatabasePluginMessages::TransactionResponse response; @@ -1946,7 +1947,7 @@ for (int i = 0; i < response.list_key_values().key_values_size(); ++i) { keys.push_back(response.list_key_values().key_values(i).key()); - // values .push_back(response.list_key_value().key_values(i)); // TODO_ATTACH_CUSTOM_DATA + values .push_back(response.list_key_values().key_values(i).value()); } } else diff -r 756983d498bb -r d6b3379795a5 OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto --- a/OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto Tue May 20 16:24:56 2025 +0200 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto Tue May 20 16:39:04 2025 +0200 @@ -1033,8 +1033,9 @@ message ListKeyValues { message Request { string store_id = 1; - uint64 since = 2; - uint64 limit = 3; + bool from_first = 2; + string from_key = 3; + uint64 limit = 4; } message Response {