Merge 'column_attr' into 'trunk'
Nigel Metheringham [Tue, 24 Feb 2009 18:28:54 +0000 (18:28 +0000)]
r10954@hex:  nigel | 2009-02-24 12:28:54 +0000
Merged in column_attr branch:-
  Resultset attributes now include the following items to specify
  "select" and "as" values:-
     columns    - list of columns (specifies both select and as)
     +columns   - list of extra columns (specifies both select and as)
     select     - list of select values only
     +select    - list of extra select values only
     as         - list of as values only
     +as        - list of extra as values only
     include_columns - deprecated alias for +columns
  The values for columns/+columns/include_columns may include hashrefs,
  in which case the hash is interpreted as {as => select}, allowing
  queries involving functions to be specified without needing the
  information to be split into 2 separate places.

Changes
lib/DBIx/Class/Storage/DBI.pm
t/60core.t

diff --git a/Changes b/Changes
index ebe5ca7..61f5831 100644 (file)
--- a/Changes
+++ b/Changes
@@ -14,6 +14,8 @@ Revision history for DBIx::Class
           possible. See the Cookbook for details. (robkinyon, michaelr)
         - Massive rewrite of Ordered to properly handle position constraints and
           to make it more matpath-friendly
+        - deploy_statements called ddl_filename with the $version and $dir arguments
+          in the wrong order. (groditi)
 
 0.08099_06 2009-01-23 07:30:00 (UTC)
         - Allow a scalarref to be supplied to the 'from' resultset attribute
index 6679a57..99f860c 100644 (file)
@@ -1775,7 +1775,7 @@ sub deployment_statements {
   $type ||= $self->sqlt_type;
   $version ||= $schema->schema_version || '1.x';
   $dir ||= './';
-  my $filename = $schema->ddl_filename($type, $dir, $version);
+  my $filename = $schema->ddl_filename($type, $version, $dir);
   if(-f $filename)
   {
       my $file;
index 0c7d434..011675b 100644 (file)
@@ -240,9 +240,9 @@ cmp_ok($or_rs->count, '==', 5, 'Search with OR ok');
 my $distinct_rs = $schema->resultset("CD")->search($search, { join => 'tags', distinct => 1 });
 cmp_ok($distinct_rs->all, '==', 4, 'DISTINCT search with OR ok');
 
-#SKIP: {
-#  skip "SQLite < 3.2.6 doesn't understand COUNT(DISTINCT())", 2
-#    if $is_broken_sqlite;
+SKIP: {
+  skip "SQLite < 3.2.6 doesn't understand COUNT(DISTINCT())", 2
+    if $is_broken_sqlite;
 
   my $tcount = $schema->resultset("Track")->search(
     {},
@@ -260,8 +260,8 @@ cmp_ok($distinct_rs->all, '==', 4, 'DISTINCT search with OR ok');
     }
   );
   cmp_ok($tcount->next->get_column('count'), '==', 13, 'multiple column COUNT DISTINCT using column syntax ok');
+}
 
-#}
 my $tag_rs = $schema->resultset('Tag')->search(
                [ { 'me.tag' => 'Cheesy' }, { 'me.tag' => 'Blue' } ]);