aboutsummaryrefslogtreecommitdiff
path: root/src/db/SimpleDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 22:20:28 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 23:05:08 +0200
commit3c0dea811d498db3091dad868740c4653c22717e (patch)
tree698de51e854a052d43cb3f872a5aee5b608fb71f /src/db/SimpleDatabasePlugin.cxx
parenta6ac0f89656b9ef374703d24bbb27316a705eadc (diff)
DatabasePlugin: add method GetStats()
Optimize the ProxyDatabase by invoking "stats" on the peer, instead of visiting all songs.
Diffstat (limited to 'src/db/SimpleDatabasePlugin.cxx')
-rw-r--r--src/db/SimpleDatabasePlugin.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx
index ed166de4..c1de70d3 100644
--- a/src/db/SimpleDatabasePlugin.cxx
+++ b/src/db/SimpleDatabasePlugin.cxx
@@ -281,6 +281,13 @@ SimpleDatabase::VisitUniqueTags(const DatabaseSelection &selection,
}
bool
+SimpleDatabase::GetStats(const DatabaseSelection &selection,
+ DatabaseStats &stats, GError **error_r) const
+{
+ return ::GetStats(*this, selection, stats, error_r);
+}
+
+bool
SimpleDatabase::Save(GError **error_r)
{
db_lock();