Class::DBI::Test::SQLite(3pm) - phpMan

Command: man perldoc info search(apropos)  


Class::DBI::Test::SQLite(3pm)  User Contributed Perl Documentation  Class::DBI::Test::SQLite(3pm)



NAME
       Class::DBI::Test::SQLite - Base class for Class::DBI tests

SYNOPSIS
               use base 'Class::DBI::Test::SQLite';

               __PACKAGE__->set_table('test');
               __PACKAGE__->columns(All => qw/id name film salary/);

               sub create_sql {
                       return q{
                               id     INTEGER PRIMARY KEY,
                               name   CHAR(40),
                               film   VARCHAR(255),
                               salary INT
                       }
               }

DESCRIPTION
       This provides a simple base class for Class::DBI tests using SQLite.  Each class for the
       test should inherit from this, provide a create_sql() method which returns a string repre-
       senting the SQL used to create the table for the class, and then call set_table() to cre-
       ate the table, and tie it to the class.

METHODS
       set_table

               __PACKAGE__->set_table('test');

       This combines creating the table with the normal Class::DBI table() call.

       create_sql (abstract)

               sub create_sql {
                       return q{
                               id     INTEGER PRIMARY KEY,
                               name   CHAR(40),
                               film   VARCHAR(255),
                               salary INT
                       }
               }

       This should return, as a text string, the schema for the table represented by this class.



perl v5.8.8                                 2007-10-04              Class::DBI::Test::SQLite(3pm)

Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2012-05-22 17:49 @38.107.179.239 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Valid XHTML 1.0!Valid CSS!