[Bast-commits] r8319 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Jan 15 02:12:14 GMT 2010
Author: ribasushi
Date: 2010-01-15 02:12:13 +0000 (Fri, 15 Jan 2010)
New Revision: 8319
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Troubleshooting.pod
Log:
Update troubleshooting doc
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Troubleshooting.pod
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Troubleshooting.pod 2010-01-15 02:02:21 UTC (rev 8318)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Manual/Troubleshooting.pod 2010-01-15 02:12:13 UTC (rev 8319)
@@ -100,29 +100,21 @@
L<DBIx::Class::Manual::Cookbook/Setting_quoting_for_the_generated_SQL> for
details.
-Note that quoting may lead to problems with C<order_by> clauses, see
-L<... column "foo DESC" does not exist ...> for info on avoiding those.
-
=head2 column "foo DESC" does not exist ...
-This can happen if you've turned on quoting and then done something like
-this:
+This can happen if you are still using the obsolete order hack, and also
+happen to turn on sql-quoting.
$rs->search( {}, { order_by => [ 'name DESC' ] } );
-This results in SQL like this:
+Since L<DBIx::Class> >= 0.08100 and L<SQL::Abstract> >= 1.50 the above
+should be written as:
- ... ORDER BY "name DESC"
+ $rs->search( {}, { order_by => { -desc => 'name' } } );
-The solution is to pass your order_by items as scalar references to avoid
-quoting:
+For more ways to express order clauses refer to
+L<SQL::Abstract/ORDER_BY_CLAUSES>
- $rs->search( {}, { order_by => [ \'name DESC' ] } );
-
-Now you'll get SQL like this:
-
- ... ORDER BY name DESC
-
=head2 Perl Performance Issues on Red Hat Systems
There is a problem with slow performance of certain DBIx::Class
More information about the Bast-commits
mailing list