Class::DBI::AbstractSearch is a Class::DBI plugin to glue SQL::Abstract into
Class::DBI.
This module helps to generate HTML forms for creating new database
rows or editing existing rows. It maps column names in a database
table to HTML form elements which fit the schema. Large text fields
are turned into textareas, and fields with a has-a relationship to
other Class::DBI tables are turned into select drop-downs populated
with objects from the joined class.
Class::DBI::AutoLoader scans the tables in a given database, and auto-generates
the Class::DBI classes. These are loaded into your package when you import
Class::DBI::AutoLoader.
Class::DBI::BaseDSN acts as a placeholder for a base class which will be
switched for a specific Class::DBI extension when you specify the dsn of the
database to connect to.
This is an extension to Class::DBI which injects a method into your
class to find and execute all SQL statements in the DATA section
of the package.
Combined with Class::DBI to create and dispose of tables
Lots of times, Class::DBI is used in web-based applications. (In fact, coupled
with a templating system that allows you to pass objects, such as
Template::Toolkit, Class::DBI is very much your friend for these.)
And, as we all know, one of the most irritating things about writing web-based
applications is the monotony of writing much of the same stuff over and over
again. And, where there's monotony there's a tendency to skip over stuff that
we all know is really important, but is a pain to write - like Taint Checking
and sensible input validation. (Especially as we can still show a 'working'
application without it!). So, we now have CGI::Untaint to take care of a lot of
that for us.
It so happens that CGI::Untaint also plays well with Class::DBI. All you need
to do is to 'use Class::DBI::FromCGI' in your class (or in your local
Class::DBI subclass that all your other classes inherit from. You do do that,
don't you?).
Class::DBI::LazyInflate is a utility class that allows you to create
DBI columns that only inflate to an object when it is required.
When a row is fetched, columns specified via has_lazy() is wrapped
by Data::Lazy, such that it is inflated only when the column is
actually used.
This module acts as a mix-in, adding the relationship method to
Class::DBI::Loader. Since Class::DBI::Loader knows how to map between
table names and class names, there ought to be no need to replicate
the names. In addition, it is common (but not universal) to want
reverse relationships defined for has-many relationships, and for
has-a relationships to be defined for the linkages surrounding a
many-to-many table.
Class::DBI::Loader automate the definition of Class::DBI sub-classes. scan
table schemas and setup columns, primary key.
class names are defined by table names and namespace option.
+-----------+-----------+-----------+
| table | namespace | class |
+-----------+-----------+-----------+
| foo | Data | Data::Foo |
| foo_bar | | FooBar |
+-----------+-----------+-----------+
Class::DBI::Loader supports MySQL, Postgres and SQLite.