[Bast-commits] r6970 - DBIx-Class/0.08/branches/mssql_top_fixes/t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Jul 3 18:18:54 GMT 2009
Author: ribasushi
Date: 2009-07-03 18:18:53 +0000 (Fri, 03 Jul 2009)
New Revision: 6970
Modified:
DBIx-Class/0.08/branches/mssql_top_fixes/t/42toplimit.t
Log:
detabify
Modified: DBIx-Class/0.08/branches/mssql_top_fixes/t/42toplimit.t
===================================================================
--- DBIx-Class/0.08/branches/mssql_top_fixes/t/42toplimit.t 2009-07-03 17:59:48 UTC (rev 6969)
+++ DBIx-Class/0.08/branches/mssql_top_fixes/t/42toplimit.t 2009-07-03 18:18:53 UTC (rev 6970)
@@ -5,12 +5,12 @@
use lib qw(t/lib);
use DBICTest;
use DBIC::SqlMakerTest;
-$|++;
+
my $schema = DBICTest->init_schema;
# Trick the sqlite DB to use Top limit emulation
# We could test all of this via $sq->$op directly,
-# but some conditions needs a $rsrc
+# but some conditions need a $rsrc
delete $schema->storage->_sql_maker->{_cached_syntax};
$schema->storage->_sql_maker->limit_dialect ('Top');
@@ -49,13 +49,13 @@
me__id, source, owner, title, price, owner__id, name FROM
(SELECT
TOP 1 me__id, source, owner, title, price, owner__id, name FROM
- (SELECT
- TOP 4 me.id AS me__id, me.source, me.owner, me.title, me.price, owner.id AS owner__id, owner.name FROM
- books me
- JOIN owners owner ON owner.id = me.owner
- WHERE ( source = ? )
- ORDER BY $args->{order_inner}
- ) me ORDER BY $args->{order_outer}
+ (SELECT
+ TOP 4 me.id AS me__id, me.source, me.owner, me.title, me.price, owner.id AS owner__id, owner.name FROM
+ books me
+ JOIN owners owner ON owner.id = me.owner
+ WHERE ( source = ? )
+ ORDER BY $args->{order_inner}
+ ) me ORDER BY $args->{order_outer}
) me $req_order
)",
[ [ source => 'Library' ] ],
@@ -132,16 +132,16 @@
( SELECT
id, source, owner, title, price FROM
( SELECT
- TOP 1 id, source, owner, title, price FROM
- ( SELECT
- TOP 4 me.id, me.source, me.owner, me.title, me.price FROM
- books me JOIN
- owners owner ON owner.id = me.owner
- WHERE ( source = ? )
- GROUP BY title
- ORDER BY title ASC
- ) me
- ORDER BY title DESC
+ TOP 1 id, source, owner, title, price FROM
+ ( SELECT
+ TOP 4 me.id, me.source, me.owner, me.title, me.price FROM
+ books me JOIN
+ owners owner ON owner.id = me.owner
+ WHERE ( source = ? )
+ GROUP BY title
+ ORDER BY title ASC
+ ) me
+ ORDER BY title DESC
) me
ORDER BY title
) me JOIN
More information about the Bast-commits
mailing list