diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-06 04:05:00 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-06 04:07:25 -0400 |
commit | f340d50362340c330de83d419eb41c0ede162c49 (patch) | |
tree | 9a30d7bd034c3fa37092725d419f896108536633 /src/report.cc | |
parent | 4a0f5f9034dc24c7ae5f0464d407f4cf2279558b (diff) | |
download | fork-ledger-f340d50362340c330de83d419eb41c0ede162c49.tar.gz fork-ledger-f340d50362340c330de83d419eb41c0ede162c49.tar.bz2 fork-ledger-f340d50362340c330de83d419eb41c0ede162c49.zip |
Revised the ways statistics are computed
It is no longer done in calc_posts, but recursively on each account.
This allows value expressions to ask statistical questions, like
"earliest cleared posting?" (TBD) from any specific account, computed
lazily.
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/report.cc b/src/report.cc index e4eef741..76546528 100644 --- a/src/report.cc +++ b/src/report.cc @@ -37,6 +37,7 @@ #include "iterators.h" #include "filters.h" #include "precmd.h" +#include "stats.h" #include "generate.h" #include "derive.h" #include "emacs.h" @@ -728,8 +729,9 @@ expr_t::ptr_op_t report_t::lookup(const string& name) case 's': if (is_eq(q, "stats") || is_eq(q, "stat")) - return WRAP_FUNCTOR(reporter<>(new gather_statistics(*this), *this)); - else if (is_eq(q, "server") && maybe_import("ledger.server")) + return WRAP_FUNCTOR(report_statistics); + else + if (is_eq(q, "server") && maybe_import("ledger.server")) return session.lookup(string(CMD_PREFIX) + "server"); break; } |