WTF::SQL - Container module for all prepare_cached SQL statements


VERSION

This document describes WTF::SQL version 1.02


SYNOPSIS

        use WTF::SQL;
        my $sth = WTF::SQL->sth();


DESCRIPTION

This module is a simple container for all prepare_cached SQL statements. During the Apache child INIT phase, the ``%sql'' hash is walked for SQL statements. Each statement is prepared, and the resulting statement handle is saved into the ``$sth'' anonymous hash.


FUNCTION

This module provides only a single function.

sth()

This function returns a reference to an anonymous hash containing all the prepare_cached statement handles.

        my $sth = WTF::SQL->sth();
        $sth->{'employees_by_letter'}->execute('G') or die $dbh->errstr();
        while ( $_ = $sth->{'employees_by_letter'}->fetchrow_arrayref() ) {
                # ...blah, blah, blah...
        }
        $sth->{'employees_by_letter'}->finish();


DEPENDENCIES

WTF::SQL depends on the following modules:


KNOWN ISSUES

This module is a single location for all prepare_cached SQL statements, and as such, it's too big and not hierarchical by design. This is likely a design flaw and should be addressed as the module grows.


COPYRIGHT, LICENSE, AND DISCLAIMER OF WARRANTY

Use of this module implies the reading and agreement with the license under which this software is release. That license can be found in the ``license.txt'' file included with this distribution.