From: Jess Robinson Date: Fri, 30 Jan 2009 14:27:38 +0000 (+0000) Subject: DB2 compatibility fix, update test to add new artist column (ick) X-Git-Tag: v0.08240~155 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e88dfc4aa9d6bd8591b1ce85dc33ae3afcf20c2;p=dbsrgits%2FDBIx-Class.git DB2 compatibility fix, update test to add new artist column (ick) remove code that calls now removed sub _RowNumberOver --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 91e44e3..b9cf838 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -50,18 +50,10 @@ sub new { $self; } + # While we're at it, this should make LIMIT queries more efficient, # without digging into things too deeply use Scalar::Util 'blessed'; -sub _find_syntax { - my ($self, $syntax) = @_; - my $dbhname = blessed($syntax) ? $syntax->{Driver}{Name} : $syntax; - if(ref($self) && $dbhname && $dbhname eq 'DB2') { - return 'RowNumberOver'; - } - - $self->{_cached_syntax} ||= $self->SUPER::_find_syntax($syntax); -} sub select { my ($self, $table, $fields, $where, $order, @rest) = @_; diff --git a/t/745db2.t b/t/745db2.t index 82475b1..48f975c 100644 --- a/t/745db2.t +++ b/t/745db2.t @@ -20,7 +20,7 @@ my $dbh = $schema->storage->dbh; eval { $dbh->do("DROP TABLE artist") }; -$dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10));"); +$dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10), rank INTEGER DEFAULT 13);"); # This is in core, just testing that it still loads ok $schema->class('Artist')->load_components('PK::Auto');