
DBIx::Class::Table - Basic table methods


This class is responsible for defining and doing basic operations on DBIx::Class objects.

__PACKAGE__->add_columns(qw/col1 col2 col3/);
Adds columns to the current package, and creates accessors for them
my @obj = $class->search_literal($literal_where_cond, @bind); my $cursor = $class->search_literal($literal_where_cond, @bind);
my $count = $class->count_literal($literal_where_cond);
my $count = $class->count({ foo => 3 });
my @obj = $class->search({ foo => 3 });
my $cursor = $class->search({ foo => 3 });
Identical to search except defaults to 'LIKE' instead of '=' in condition
__PACKAGE__->table('tbl_name');
$class->find_or_create({ key => $val, ... });
Searches for a record matching the search condition; if it doesn't find one, creates one and returns that instead

Matt S. Trout <mst@shadowcatsystems.co.uk>

You may distribute this code under the same terms as Perl itself.