From: Matt S Trout Date: Fri, 20 Apr 2012 09:18:55 +0000 (+0000) Subject: abstract order specification X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=62ffea245a8d9f048285f5c99b85a59d5d00f6a6;p=dbsrgits%2FSQL-Abstract.git abstract order specification --- diff --git a/lib/SQL/Abstract/Converter.pm b/lib/SQL/Abstract/Converter.pm index eeeb4f4..6621945 100644 --- a/lib/SQL/Abstract/Converter.pm +++ b/lib/SQL/Abstract/Converter.pm @@ -552,7 +552,7 @@ sub _order_by_to_dq { my $dq = { type => DQ_ORDER, - ($dir ? (direction => $dir) : ()), + (defined($dir) ? (reverse => !!$dir =~ /desc/i) : ()), ($from ? (from => $from) : ()), };