DBIx::Table

DBIx::Table is a Perl class used to represent DBI database tables.
Download

DBIx::Table Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • J. David Lowe
  • Publisher web site:
  • http://search.cpan.org/~dlowe/DBIx-Table-0.04/Table.pm

DBIx::Table Tags


DBIx::Table Description

DBIx::Table is a Perl class used to represent DBI database tables. DBIx::Table is a Perl class used to represent DBI database tables.SYNOPSISTo make it useful: package SUBCLASS; @ISA = qw(DBIx::Table); sub describe { my($self) = shift; $self->{'table'} = $table_name; $self->{'unique_keys'} = , ... ]; $self->{'columns'} = { $col_name => { %col_options }, }; }; ] }To use the useful object: $table = load SUBCLASS( db => $dbi_object, , ] . $column ]); $table = create SUBCLASS( db => $dbi_object); $new_table = $table->load_related( type => $classname, row => $row, ); $num_rows = $table->num_rows(); $query_rows = $table->query_rows(); $columns = $table->columns(); $db = $table->db(); $level = $table->debug_level( ); $value = $table->get( column => $column, ); $retval = $table->set( change => { $column => $value, }, ); $retval = $table->refresh( columns = , ); $retval = $table->commit( ); $retval = $table->remove( ); $count = $table->count( DBIx::Table is a class designed to act as an abstraction layer around a fairly large subset of SQL queries. It is called 'Table' because it is primarily designed such that a single subclass provides an object-oriented interface to a single database table. The module is flexible enough, though, that it can be used to abstract most any schema in a way that is comfortable to the perl coder who is not familiar with the underlying schema, or even SQL.As the synopsis above points out, this class is not useful when simply used by itself. Instead, it should be subclassed. The subclass follows a particular syntax for describing the structure of the table, which the Table module uses internally to control its behavior.The subclass can then be used to access the underlying data, with the Table module taking care of writing the actual SQL. The current version can write SELECT, UPDATE, INSERT and DELETE statements. Depending on the complexity of the definition, it can also do joins across multiple tables and intelligently load related table objects.The rest of the documentation is split: first, how to create a useful subclass. Second, constructors and access methods on the subclass. Third, some examples. Without further ado...About OpenOffice.org:OpenOffice.org (OO.o or OOo) is a cross-platform office application suite available for a number of different computer operating systems. It supports the ISO standard OpenDocument Format (ODF) for data interchange as its default file format, as well as Microsoft Office '97-2003 formats, among many others.OpenOffice.org was originally derived from StarOffice, an office suite developed by StarDivision and acquired by Sun Microsystems in August 1999. The source code of the suite was released in July 2000 with the aim of reducing the dominant market share of Microsoft Office by providing a free, open and high-quality alternative; later versions of StarOffice are based upon OpenOffice.org with additional proprietary components. OpenOffice.org is free software, available under the GNU Lesser General Public License (LGPL).The project and software are informally referred to as OpenOffice, but this term is a trademark held by another party, requiring the project to adopt OpenOffice.org as its formal name.Requirements:· Perl Requirements: · Perl


DBIx::Table Related Software