From: Brandon L. Black Date: Tue, 8 Aug 2006 02:58:03 +0000 (+0000) Subject: further code/pod shuffling between Storage/Storage::DBI X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a3eaff0e3e66c4455fe035e6dd3170db10e102c0;hp=046ad905e50dab1348ffca956586d7f386cfaa7e;p=dbsrgits%2FDBIx-Class-Historic.git further code/pod shuffling between Storage/Storage::DBI --- diff --git a/lib/DBIx/Class/Storage.pm b/lib/DBIx/Class/Storage.pm index 3701da3..47b660f 100644 --- a/lib/DBIx/Class/Storage.pm +++ b/lib/DBIx/Class/Storage.pm @@ -332,13 +332,66 @@ L. sub deploy { die "Virtual method!" } -sub on_connect_do { die "Virtual method!" } +=head2 connect_info + +The arguments of C are always a single array reference, +and are Storage-handler specific. + +This is normally accessed via L, which +encapsulates its argument list in an arrayref before calling +C here. + +=cut + sub connect_info { die "Virtual method!" } + +=head2 select + +Handle a select statement. + +=cut + +sub select { die "Virtual method!" } + +=head2 insert + +Handle an insert statement. + +=cut + sub insert { die "Virtual method!" } + +=head2 update + +Handle an update statement. + +=cut + sub update { die "Virtual method!" } + +=head2 delete + +Handle a delete statement. + +=cut + sub delete { die "Virtual method!" } -sub select { die "Virtual method!" } + +=head2 select_single + +Performs a select, fetch and return of data - handles a single row +only. + +=cut + sub select_single { die "Virtual method!" } + +=head2 columns_info_for + +Returns database type info for the given table's columns. + +=cut + sub columns_info_for { die "Virtual method!" } =head1 ENVIRONMENT VARIABLES diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 8f2900e..7482d81 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -766,31 +766,17 @@ sub _select { return $self->_execute(@args); } -=head2 select - -Handle a SQL select statement. - -=cut - sub select { my $self = shift; my ($ident, $select, $condition, $attrs) = @_; return $self->cursor->new($self, \@_, $attrs); } -=head2 select_single - -Performs a select, fetch and return of data - handles a single row -only. - -=cut - -# Need to call finish() to work round broken DBDs - sub select_single { my $self = shift; my ($rv, $sth, @bind) = $self->_select(@_); my @row = $sth->fetchrow_array; + # Need to call finish() to work round broken DBDs $sth->finish(); return @row; } @@ -807,12 +793,6 @@ sub sth { return $self->dbh_do(sub { shift->prepare_cached($sql, {}, 3) }); } -=head2 columns_info_for - -Returns database type info for a given table columns. - -=cut - sub columns_info_for { my ($self, $table) = @_;