aboutsummaryrefslogtreecommitdiff
path: root/src/db/SimpleDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 21:32:34 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 23:02:27 +0200
commita6ac0f89656b9ef374703d24bbb27316a705eadc (patch)
tree3706b1b8474ae06890595a8e20c8be011f6a162b /src/db/SimpleDatabasePlugin.cxx
parent4e1eb03287c1af889372ed4c63220a88d2032f78 (diff)
DatabasePlugin: add method VisitUniqueTags()
Optimize the ProxyDatabase by invoking "list" on the peer, instead of visiting all songs.
Diffstat (limited to 'src/db/SimpleDatabasePlugin.cxx')
-rw-r--r--src/db/SimpleDatabasePlugin.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx
index a4077eb2..ed166de4 100644
--- a/src/db/SimpleDatabasePlugin.cxx
+++ b/src/db/SimpleDatabasePlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "SimpleDatabasePlugin.hxx"
#include "DatabaseSelection.hxx"
+#include "DatabaseHelpers.hxx"
extern "C" {
#include "db_error.h"
@@ -270,6 +271,16 @@ SimpleDatabase::Visit(const DatabaseSelection &selection,
}
bool
+SimpleDatabase::VisitUniqueTags(const DatabaseSelection &selection,
+ enum tag_type tag_type,
+ VisitString visit_string,
+ GError **error_r) const
+{
+ return ::VisitUniqueTags(*this, selection, tag_type, visit_string,
+ error_r);
+}
+
+bool
SimpleDatabase::Save(GError **error_r)
{
db_lock();