Re: fetching with report breaks, totals and subtotals (was: More on testing cursors in Perl and PL/SQL)
Tom, A fundamental difference between what I've started and what you are doing is that SQLMinus is dependent on DBI, and bit that I've done is not. Works with any data source, with or without DBI. I'm going to pursue it a bit further, and see what you think. Jared PS. I'm not a member of dbi-dev yet, so this may not show up there. On Tuesday 31 December 2002 15:17, Thomas A. Lowery wrote: > On Mon, Dec 30, 2002 at 12:07:40PM +, Tim Bunce wrote: > > 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. > > I've the basic break support added to DBI::Shell::SQLMinus, > syntax: /break on id skip X > > Needs more work and documentation, but it's a start. > > Tom
Re: fetching with report breaks, totals and subtotals (was: More on testing cursors in Perl and PL/SQL)
On Mon, Dec 30, 2002 at 12:07:40PM +, Tim Bunce wrote: > 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. I've the basic break support added to DBI::Shell::SQLMinus, syntax: /break on id skip X Needs more work and documentation, but it's a start. Tom -- Thomas A. Lowery See DBI/FAQ http://www.xmlproj.com/cgi/fom.cgi
fetching with report breaks, totals and subtotals (was: More on testing cursors in Perl and PL/SQL)
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.