SQLite::Work is a Perl module for interfacing with an SQLite database. It can be used to:
* generate nice HTML (and non-HTML) reports, which
- have nested headers
- have grouped data which clusters under the headers
- can be sorted on multiple columns
- can be customized with templates (both headers and body) which include some simple formatting for column values, for example:
titles (Title,The becomes The Title)
names (Nurk,Fred becomes Fred Nurk)
- one can select the columns and their order even if one isn't using templates
- default templates can be selected which present the data in tables, in paragraphs (Column:Value) or in lists.
- can be split into multiple HTML pages, with automatic index-page generation; the split can be on the values of a given column, and/or by number of rows
* use a generic search CGI script ("show.cgi" using SQLite::Work::CGI) which
- can search on all the fields in a table without having to hardcode the column names (it just gets them from the table information)
- uses most of the power of the report engine to give nice search results
* update the database with a CGI script ("edit.cgi" using SQLite::Work::CGI)
* be able to mail reports to general addresses (such as a mailing list) or to specific addresses (such as sending notifications to individuals whose address is in the database). (using the sqlw_mail script)
This generates HTML (and non-HTML) reports from an SQLite database, taking care of the query-building and the report formatting. This also has methods for adding and updating the database.
The SQLite::Work::CGI module has extra methods which deal with CGI using the CGI module; the included "show.cgi" and "edit.cgi" are demonstration CGI scripts which use the SQLite::Work::CGI module. There is also the "show.epl" demonstration Embperl script which has the necessary alterations for using this with Embperl.
The sqlreport script uses SQLite::Work to generate reports from the command-line.
The sqlw_mail script uses SQLite::Work::Mail to email reports.
my $rep = SQLite::Work->new(%new_args);
· This only deals with single tables and views, and simple one-field, two-table joins. More complex joins should be dealt with by making a view.
· This only deals with one database at a time.