AnyEvent-DBI-Abstract

 view release on metacpan or  search on metacpan

lib/AnyEvent/DBI/Abstract.pm  view on Meta::CPAN


sub abstract {
    my $self = shift;
    $self->{_DBI_abstract} ||= SQL::Abstract->new;
}

for my $method (qw( select insert update delete )) {
    *$method = sub {
        my($self, @args) = @_;
        my $cb = pop @args;
        my($stmt, @bind) = $self->abstract->$method(@args);
        $self->exec($stmt, @bind, $cb);
    };
}

1;
__END__

=encoding utf-8

=for stopwords



( run in 0.982 second using v1.01-cache-2.11-cpan-2398b32b56e )