[Jifty-commit] r6684 - Jifty-DBI/branches/tisql/lib/Jifty/DBI

Jifty commits jifty-commit at lists.jifty.org
Fri Mar 20 15:50:02 EDT 2009


Author: ruz
Date: Fri Mar 20 15:50:02 2009
New Revision: 6684

Modified:
   Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm

Log:
* use new functions instead of building struct ourself

Modified: Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm
==============================================================================
--- Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm	(original)
+++ Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm	Fri Mar 20 15:50:02 2009
@@ -445,28 +445,10 @@
             )
         } );
     } else {
-        $tree = [ {
-            type    => 'join',
-            op_type => 'col_op_col',
-            lhs => {
-                alias  => '',
-                chain  => [{ name => $column->virtual? "id" : $via }],
-            },
-            op => '=',
-            rhs => {
-                alias  => $via,
-                chain  => [{ name => $column->by || 'id' }],
-            },
-        } ];
-        foreach ( map $tree->[0]{$_}, qw(lhs rhs) ) {
-            $_->{'chain'}[0]{'string'} = $_->{'alias'} .'.'. $_->{'chain'}[0]{'name'};
-            $_->{'string'} = $_->{'chain'}[-1]{'string'};
-        }
-        $tree->[0]{'string'} =
-            join ' ',
-            $tree->[0]{'lhs'}{'string'},
-            $tree->[0]{'op'},
-            $tree->[0]{'rhs'}{'string'};
+        $tree = [ Q(
+            C( $column->virtual? "id" : $via )
+                => C( $via, '.', $column->by || 'id' )
+        ) ];
     }
     my $res = {
         left  => $model,


More information about the Jifty-commit mailing list