man > Class::DBI::Test::SQLite

📚 NAME

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

🚀 Quick Reference

Use CaseCommandDescription
Create a test classuse base 'Class::DBI::Test::SQLite';✅ Inherit from this base class for SQLite tests
Set table name__PACKAGE__->set_table('table_name');✅ Define which table this class represents
Define columns__PACKAGE__->columns(All => qw/col1 col2/);✅ Set column names for the class
Provide schemasub create_sql { return q{...}; }✅ Return SQL to create the table

📝 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 representing the SQL used to create the table for the class, and then call set_table() to create 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.

Class::DBI::Test::SQLite
📚 NAME 🚀 Quick Reference 📝 SYNOPSIS 📖 DESCRIPTION ⚙️ METHODS
🔧 set_table 📝 create_sql (abstract)

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-12 04:54 @2600:1f28:365:80b0:194e:56dd:d3a6:4135
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!