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 implements the following new ones.

delete

    $table->delete(where => \%where);
    

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

delete_all

    $table->delete_all(param => $param);
    

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

helper

    $table->helper(insert => sub {
        my $self = shift;
        
        return $self->dbi->insert(table => $self->name, @_);
    });
    

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

insert

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

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

method

    $table->method(
        select_complex => sub {
            my $self = shift;
            
            return $self->dbi->select($self->name, ...);
        },
        some_method => sub { ... }
    );

Define method.

new

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

Create a DBIx::Custom::Table object.

select

    $table->select(param => $param);
    

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

update

    $table->update(param => \%param, where => \%where);
    

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

update_all

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

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