diff OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5495:4b3f5986eca1

Added a 'KeepLabels' option in /modify routes (default = false)
author Alain Mazy <am@osimis.io>
date Mon, 22 Jan 2024 17:14:11 +0100
parents 48b8dae6dc77
children 4dd50c4b985a
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp	Wed Jan 10 07:21:50 2024 +0100
+++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp	Mon Jan 22 17:14:11 2024 +0100
@@ -3620,6 +3620,17 @@
   }
   
 
+  void StatelessDatabaseOperations::AddLabels(const std::string& publicId,
+                                              ResourceType level,
+                                              const std::set<std::string>& labels)
+  {
+    for (std::set<std::string>::const_iterator it = labels.begin(); it != labels.end(); ++it)
+    {
+      ModifyLabel(publicId, level, *it, LabelOperation_Add);
+    }
+  }
+
+
   void StatelessDatabaseOperations::ModifyLabel(const std::string& publicId,
                                                 ResourceType level,
                                                 const std::string& label,