The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Custom::Table - Table base class(experimental)

SYNOPSIS

use DBIx::Custom::Table;

my $table = DBIx::Custom::Table->new(name => 'books');

METHODS

DBIx::Custom inherits all methods from Object::Simple, and you can use all methods of the object set to dbi. and implements the following new ones.

delete

    $table->delete(...);
    

Same as delete() of DBIx::Custom except that you don't have to specify table option.

delete_all

    $table->delete_all(...);
    

Same as delete_all() of DBIx::Custom except that you don't have to specify table option.

method

    $table->method(
        count => sub {
            my $self = shift;
        
            return $self->select(column => 'count(*)', @_)
                        ->fetch_first->[0];
        }
    );
    

Add method to a DBIx::Custom::Table object.

insert

    $table->insert(...);
    

Same as insert() of DBIx::Custom except that you don't have to specify table option.

new

    my $table = DBIx::Custom::Table->new;

Create a DBIx::Custom::Table object.

select

    $table->select(...);
    

Same as select() of DBIx::Custom except that you don't have to specify table option.

update

    $table->update(...);
    

Same as update() of DBIx::Custom except that you don't have to specify table option.

update_all

    $table->update_all(param => \%param);
    

Same as update_all() of DBIx::Custom except that you don't have to specify table name.