From: Matt S Trout Date: Mon, 17 Sep 2018 23:06:33 +0000 (+0000) Subject: remove vestigial _order_by_chunks method X-Git-Tag: v1.90_01~429 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c5012af01ce49cf0b0d6171f394ccc03d14be3f;p=dbsrgits%2FSQL-Abstract.git remove vestigial _order_by_chunks method --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index bff6aa0..fa9cc5c 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -1091,34 +1091,6 @@ sub _order_by { return wantarray ? ($final_sql, @bind) : $final_sql; } -sub _order_by_chunks { - my ($self, $arg) = @_; - - if (ref($arg) eq 'ARRAY') { - return map $self->_order_by_chunks($_), @$arg; - } - if (my $l = is_literal_value($arg)) { - return +{ -literal => $l }; - } - if (!ref($arg)) { - return +{ -ident => $arg }; - } - if (ref($arg) eq 'HASH') { - my ($key, $val, @rest) = %$arg; - - return () unless $key; - - if (@rest or not $key =~ /^-(desc|asc)/i) { - puke "hash passed to _order_by must have exactly one key (-desc or -asc)"; - } - - my $dir = $1; - - map +{ -op => [ $dir, $_ ] }, $self->_order_by_chunks($val); - }; -} - - #====================================================================== # DATASOURCE (FOR NOW, JUST PLAIN TABLE OR LIST OF TABLES) #======================================================================