From: Matt S Trout Date: Fri, 1 Nov 2013 02:58:45 +0000 (+0000) Subject: _extract_order_criteria should return column names, not full criteria X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3441a9ccf128c0536e59c5b0c7ab6c5b22af059b;p=dbsrgits%2FDBIx-Class.git _extract_order_criteria should return column names, not full criteria --- diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index 9e5d5ac..7d26a4a 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -16,6 +16,7 @@ use mro 'c3'; use List::Util 'first'; use Scalar::Util 'blessed'; use Sub::Name 'subname'; +use Data::Query::Constants; use Data::Query::ExprHelpers; use namespace::clean; @@ -824,7 +825,11 @@ sub _extract_order_criteria { delete local @{$sql_maker}{qw(quote_char renderer converter)}; - return map { [ $sql_maker->_render_dq($_) ] } @by; + my @by_ident; + + scan_dq_nodes({ DQ_IDENTIFIER ,=> sub { push @by_ident, $_[0] } }, @by); + + return map { [ $sql_maker->_render_dq($_) ] } @by_ident; my $parser = sub { my ($sql_maker, $order_by, $orig_quote_chars) = @_;