[Bast-commits] r7890 - in DBIx-Class/0.08/trunk: . t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Sat Nov 14 09:27:29 GMT 2009


Author: caelum
Date: 2009-11-14 09:27:29 +0000 (Sat, 14 Nov 2009)
New Revision: 7890

Modified:
   DBIx-Class/0.08/trunk/Changes
   DBIx-Class/0.08/trunk/t/747mssql_ado.t
Log:
fix the large column list test for ADO/MSSQL, now passes

Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes	2009-11-14 08:47:16 UTC (rev 7889)
+++ DBIx-Class/0.08/trunk/Changes	2009-11-14 09:27:29 UTC (rev 7890)
@@ -18,7 +18,7 @@
              connecting to an older Sybase and/or via FreeTDS
           - bulk API support for populate()
         - Transaction support for MSSQL via DBD::Sybase
-        - Preliminary (read not very good) support for MSSQL via DBD::ADO
+        - Preliminary support for MSSQL via DBD::ADO
         - Add is_paged method to DBIx::Class::ResultSet so that we can
           check that if we want a pager
         - Skip versioning test on really old perls lacking Time::HiRes

Modified: DBIx-Class/0.08/trunk/t/747mssql_ado.t
===================================================================
--- DBIx-Class/0.08/trunk/t/747mssql_ado.t	2009-11-14 08:47:16 UTC (rev 7889)
+++ DBIx-Class/0.08/trunk/t/747mssql_ado.t	2009-11-14 09:27:29 UTC (rev 7890)
@@ -11,7 +11,7 @@
 plan skip_all => 'Set $ENV{DBICTEST_MSSQL_ADO_DSN}, _USER and _PASS to run this test'
   unless ($dsn && $user);
 
-plan tests => 11;
+plan tests => 12;
 
 my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
 $schema->storage->ensure_connected;
@@ -39,16 +39,14 @@
 my $found = $schema->resultset('Artist')->search({ name => 'foo' })->first;
 is $found->artistid, $new->artistid, 'search works';
 
-# try a select with a big column list
-TODO: {
-  local $TODO = 'select with a big column list does not work';
+# test large column list in select
+$found = $schema->resultset('Artist')->search({ name => 'foo' }, {
+  select => ['artistid', 'name', map "'foo' foo_$_", 0..50],
+  as     => ['artistid', 'name', map       "foo_$_", 0..50],
+})->first;
+is $found->artistid, $new->artistid, 'select with big column list';
+is $found->get_column('foo_50'), 'foo', 'last item in big column list';
 
-  $found = $schema->resultset('Artist')->search({ name => 'foo' }, {
-    select => ['name', map "'foo' foo_$_", 0..50]
-  })->first;
-  is $found->artistid, $new->artistid, 'select with big column list';
-}
-
 # create a few more rows
 for (1..6) {
   $schema->resultset('Artist')->create({ name => 'Artist ' . $_ });




More information about the Bast-commits mailing list