On Sun, Dec 29, 2002 at 06:11:28PM -0800, Jared Still wrote:
>
> One more thing: One of my long time wished for modules is
> one that emulates some of the more useful features of SQL*Plus,
> namely report breaks, totals and subtotals. I've finally actually
> started on it.
>
> Would you be interested in seeing that?
Yes. And the design/API as much, if not more, than the actual code.
It's probably worth discussing on dbi-users or dbi-dev
[CC'd to dbi-dev for now].
I know Tom Lowery is working on extending the DBI::Shell with
sufficient functionality to emulate SQL*Plus.
FYI, this entry has been in the DBI ToDo file for a few years:
Add 'break handling' when field values change? Use two fbav's so 'previous
record' is available. Define break fields and handlers. Call them via
an alternate fetch_with_break method.
Jan 2002: Also now see DBIx::FetchLoop (Brendan Fagan)
Instead of a fetch_with_break method I think I'd rather add it as
a feature of all fetch calls. And by "it" I just mean a generic
"invoke callback on field change" mechanism that 'does the right thing'
in terms of headers, footers, and correct 'break' handling. Add-on
modules could then use that basic mechanism to implement totals and
subtotals etc etc.
Tim.