From 3c0dea811d498db3091dad868740c4653c22717e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 22:20:28 +0200 Subject: DatabasePlugin: add method GetStats() Optimize the ProxyDatabase by invoking "stats" on the peer, instead of visiting all songs. --- src/db/SimpleDatabasePlugin.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/db/SimpleDatabasePlugin.cxx') 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 @@ -280,6 +280,13 @@ SimpleDatabase::VisitUniqueTags(const DatabaseSelection &selection, error_r); } +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) { -- cgit v1.2.3