[Bast-commits] r6505 - in DBIx-Class/0.08/branches/sybase:
lib/DBIx/Class/Storage/DBI t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Jun 4 17:07:48 GMT 2009
Author: caelum
Date: 2009-06-04 17:07:48 +0000 (Thu, 04 Jun 2009)
New Revision: 6505
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
DBIx-Class/0.08/branches/sybase/t/746sybase.t
Log:
minor sybase count fix
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-06-04 16:41:54 UTC (rev 6504)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-06-04 17:07:48 UTC (rev 6505)
@@ -61,7 +61,8 @@
}
sub count {
- my ($self, $source, $attrs) = @_;
+ my $self = shift;
+ my ($source, $attrs) = @_;
if (not exists $attrs->{rows}) {
return $self->next::method(@_);
Modified: DBIx-Class/0.08/branches/sybase/t/746sybase.t
===================================================================
--- DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-06-04 16:41:54 UTC (rev 6504)
+++ DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-06-04 17:07:48 UTC (rev 6505)
@@ -11,7 +11,7 @@
plan skip_all => 'Set $ENV{DBICTEST_SYBASE_DSN}, _USER and _PASS to run this test'
unless ($dsn && $user);
-plan tests => (16 + 4*2)*2;
+plan tests => (17 + 4*2)*2;
my @storage_types = (
'DBI::Sybase',
@@ -55,13 +55,17 @@
$seen_id{$new->artistid}++;
-# test LIMIT support
for (1..6) {
$new = $schema->resultset('Artist')->create({ name => 'Artist ' . $_ });
is ( $seen_id{$new->artistid}, undef, "id for Artist $_ is unique" );
$seen_id{$new->artistid}++;
}
+# test simple count
+ is ($schema->resultset('Artist')->count, 7, 'count(*) of whole table ok');
+
+# test LIMIT support
+
## avoid quoting bug with NoBindVars for now
# my $it = $schema->resultset('Artist')->search({artistid => { '>' => 0 }}, {
More information about the Bast-commits
mailing list