Class::DBI::Lite::TableInfo - Utility class for database table meta-information.
# Methods: my $info = Class::DBI::Lite::TableInfo->new( 'users' ); $info->add_column( name => 'user_id', type => 'integer', length => 10, is_nullable => 0, default_value => undef, is_pk => 1, key => 'primary_key', ); my $col = $info->column( 'user_id' ); # Properties: my @cols = $info->columns(); print $info->table; # "users"
Class::DBI::Lite::TableInfo provides a consistent means to discover the meta-info about tables and their fields in a database.
Class::DBI::Lite::TableInfo
Returns the name of the table.
Returns a list of Class::DBI::Lite::ColumnInfo objects that pertain to the current table.
Returns a new Class::DBI::Lite::TableInfo object for the table named $table_name.
$table_name
Returns a Class::DBI::Lite:ColumnInfo object that matches $name.
$name
Adds a new Class::DBI::Lite::ColumnInfo object to the table's collection.
%args is passed to the Class::DBI::Lite::ColumnInfo constructor and should contain its required parameters.
%args
John Drago <jdrago_999@yahoo.com>
http://www.devstack.com/
Copyright 2008 John Drago <jdrago_999@yahoo.com>, All Rights Reserved.
This software is Free software and may be used and redistributed under the same terms as perl itself.
To install Class::DBI::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::DBI::Lite
CPAN shell
perl -MCPAN -e shell install Class::DBI::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.