diff Framework/Plugins/IndexBackend.cpp @ 402:82921a29349a db-protobuf

implemented IDatabaseBackend::ListAllLabels()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 08 Apr 2023 10:26:03 +0200
parents a8774581adfc
children 91124cc8a8c7
line wrap: on
line diff
--- a/Framework/Plugins/IndexBackend.cpp	Fri Apr 07 22:32:15 2023 +0200
+++ b/Framework/Plugins/IndexBackend.cpp	Sat Apr 08 10:26:03 2023 +0200
@@ -2688,6 +2688,18 @@
   }
   
 
+  void IndexBackend::ListAllLabels(std::list<std::string>& target,
+                                   DatabaseManager& manager)
+  {
+    DatabaseManager::CachedStatement statement(
+      STATEMENT_FROM_HERE, manager,
+      "SELECT DISTINCT label FROM Labels");
+      
+    Dictionary args;
+    ReadListOfStrings(target, statement, args);
+  }
+
+  
   void IndexBackend::Register(IndexBackend* backend,
                               size_t countConnections,
                               unsigned int maxDatabaseRetries)