From: Peter Rabbitson Date: Thu, 18 Feb 2010 23:34:22 +0000 (+0000) Subject: Retire useless abstraction (all rdbms need this anyway) X-Git-Tag: v0.08120~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=406760d8097f4420dca9d141f7a397a290867938;p=dbsrgits%2FDBIx-Class.git Retire useless abstraction (all rdbms need this anyway) --- diff --git a/Makefile.PL b/Makefile.PL index c725626..e747063 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -138,7 +138,6 @@ no_index directory => $_ for (qw| lib/DBIx/Class/PK/Auto |); no_index package => $_ for (qw/ - DBIx::Class::Storage::DBI::AmbiguousGlob DBIx::Class::SQLAHacks DBIx::Class::Storage::DBIHacks /); diff --git a/lib/DBIx/Class/Storage/DBI/AmbiguousGlob.pm b/lib/DBIx/Class/Storage/DBI/AmbiguousGlob.pm deleted file mode 100644 index 3d98122..0000000 --- a/lib/DBIx/Class/Storage/DBI/AmbiguousGlob.pm +++ /dev/null @@ -1,47 +0,0 @@ -package DBIx::Class::Storage::DBI::AmbiguousGlob; - -use strict; -use warnings; - -use base 'DBIx::Class::Storage::DBI'; -use mro 'c3'; - -=head1 NAME - -DBIx::Class::Storage::DBI::AmbiguousGlob - Storage component for RDBMS choking on count(*) - -=head1 DESCRIPTION - -Some servers choke on things like: - - COUNT(*) FROM (SELECT tab1.col, tab2.col FROM tab1 JOIN tab2 ... ) - -claiming that col is a duplicate column (it loses the table specifiers by -the time it gets to the *). Thus for any subquery count we select only the -primary keys of the main table in the inner query. This hopefully still -hits the indexes and keeps the server happy. - -At this point the only overridden method is C<_subq_count_select()> - -=cut - -sub _subq_count_select { - my ($self, $source, $rs_attrs) = @_; - - return $rs_attrs->{group_by} if $rs_attrs->{group_by}; - - my @pcols = map { join '.', $rs_attrs->{alias}, $_ } ($source->primary_columns); - return @pcols ? \@pcols : [ 1 ]; -} - -=head1 AUTHORS - -See L - -=head1 LICENSE - -You may distribute this code under the same terms as Perl itself. - -=cut - -1; diff --git a/lib/DBIx/Class/Storage/DBI/MSSQL.pm b/lib/DBIx/Class/Storage/DBI/MSSQL.pm index 6bdb027..6779e86 100644 --- a/lib/DBIx/Class/Storage/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Storage/DBI/MSSQL.pm @@ -3,7 +3,7 @@ package DBIx::Class::Storage::DBI::MSSQL; use strict; use warnings; -use base qw/DBIx::Class::Storage::DBI::AmbiguousGlob DBIx::Class::Storage::DBI/; +use base qw/DBIx::Class::Storage::DBI/; use mro 'c3'; use List::Util(); diff --git a/lib/DBIx/Class/Storage/DBI/mysql.pm b/lib/DBIx/Class/Storage/DBI/mysql.pm index 20e4f7f..486594e 100644 --- a/lib/DBIx/Class/Storage/DBI/mysql.pm +++ b/lib/DBIx/Class/Storage/DBI/mysql.pm @@ -5,7 +5,6 @@ use warnings; use base qw/ DBIx::Class::Storage::DBI::MultiColumnIn - DBIx::Class::Storage::DBI::AmbiguousGlob DBIx::Class::Storage::DBI /; use mro 'c3';