diff options
author | Max Kellermann <max@duempel.org> | 2012-08-15 22:20:28 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-15 23:05:08 +0200 |
commit | 3c0dea811d498db3091dad868740c4653c22717e (patch) | |
tree | 698de51e854a052d43cb3f872a5aee5b608fb71f /src/db/SimpleDatabasePlugin.cxx | |
parent | a6ac0f89656b9ef374703d24bbb27316a705eadc (diff) | |
download | mpd-3c0dea811d498db3091dad868740c4653c22717e.tar.gz mpd-3c0dea811d498db3091dad868740c4653c22717e.tar.xz mpd-3c0dea811d498db3091dad868740c4653c22717e.zip |
DatabasePlugin: add method GetStats()
Optimize the ProxyDatabase by invoking "stats" on the peer, instead of
visiting all songs.
Diffstat (limited to '')
-rw-r--r-- | src/db/SimpleDatabasePlugin.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx index ed166de45..c1de70d3e 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(); |