Get select sort of working again
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / 200_join.t
index 176ab81..7095518 100644 (file)
@@ -10,16 +10,23 @@ my $sqla = SQL::Abstract->create(1);
 
 is $sqla->dispatch(
   { -type => 'join',
-    tablespec => [-name => qw/foo/],
-    on => [ '==', [-name => qw/foo id/], [ -name => qw/me foo_id/ ] ],
+    tablespec => {-type => name => args => [qw/foo/]},
+    on => { 
+      -type => 'expr',
+      op => '==',
+      args => [
+        { -type => 'name', args => [qw/foo id/] },
+        { -type => 'name', args => [qw/me foo_id/] },
+      ]
+    }
   }
 ), "JOIN foo ON (foo.id = me.foo_id)", 
    "simple join clause";
 
 is $sqla->dispatch(
   { -type => 'join',
-    tablespec => [-alias => [-name => qw/foo/], 'bar' ],
-    using => [ -name => qw/foo_id/ ]
+    tablespec => {-type => 'alias', ident => {-type => name => args => [qw/foo/]}, as => 'bar' },
+    using => { -type => 'name', args => [qw/foo_id/] },
   }
 ), "JOIN foo AS bar USING (foo_id)", 
    "using join clause";