Rename vaguely named internal method
Peter Rabbitson [Fri, 8 Oct 2010 10:41:54 +0000 (12:41 +0200)]
lib/DBIx/Class/ResultSet.pm
lib/DBIx/Class/ResultSetColumn.pm
lib/DBIx/Class/Storage/DBI/MSSQL.pm
lib/DBIx/Class/Storage/DBI/Replicated.pm
lib/DBIx/Class/Storage/DBIHacks.pm

index dcc23b8..c228743 100644 (file)
@@ -2674,7 +2674,7 @@ sub is_paged {
 
 sub is_ordered {
   my ($self) = @_;
-  return scalar $self->result_source->storage->_parse_order_by($self->{attrs}{order_by});
+  return scalar $self->result_source->storage->_extract_order_columns($self->{attrs}{order_by});
 }
 
 =head2 related_resultset
@@ -3155,7 +3155,7 @@ sub _resolved_attrs {
       # add any order_by parts that are not already present in the group_by
       # we need to be careful not to add any named functions/aggregates
       # i.e. select => [ ... { count => 'foo', -as 'foocount' } ... ]
-      for my $chunk ($storage->_parse_order_by($attrs->{order_by})) {
+      for my $chunk ($storage->_extract_order_columns($attrs->{order_by})) {
 
         # only consider real columns (for functions the user got to do an explicit group_by)
         my $colinfo = $rs_column_list->{$chunk}
index 0d5d094..b4707e6 100644 (file)
@@ -67,7 +67,7 @@ sub new {
   if (
     scalar grep
       { ! $collist{$_} }
-      ( $rs->result_source->schema->storage->_parse_order_by ($orig_attrs->{order_by} ) ) 
+      ( $rs->result_source->schema->storage->_extract_order_columns ($orig_attrs->{order_by} ) ) 
   ) {
     # nuke the prefetch before collapsing to sql
     my $subq_rs = $rs->search;
index 9cde4b9..5d14612 100644 (file)
@@ -157,7 +157,7 @@ sub _select_args_to_query {
   if (
     $sql !~ /^ \s* SELECT \s+ TOP \s+ \d+ \s+ /xi
       &&
-    scalar $self->_parse_order_by ($attrs->{order_by})
+    scalar $self->_extract_order_columns ($attrs->{order_by})
   ) {
     $self->throw_exception(
       'An ordered subselect encountered - this is not safe! Please see "Ordered Subselects" in DBIx::Class::Storage::DBI::MSSQL
index 0511253..2ac1d25 100644 (file)
@@ -356,7 +356,7 @@ has 'write_handler' => (
     _resolve_column_info
     _prune_unused_joins
     _strip_cond_qualifiers
-    _parse_order_by
+    _extract_order_columns
     _resolve_aliastypes_from_select_args
     _execute
     _do_query
index c46b0e3..ed5de4d 100644 (file)
@@ -249,7 +249,7 @@ sub _resolve_aliastypes_from_select_args {
       }),
     ],
     selecting => [
-      $self->_parse_order_by ($attrs->{order_by}, $sql_maker),
+      $self->_extract_order_columns ($attrs->{order_by}, $sql_maker),
       $sql_maker->_recurse_fields ($select),
     ],
   };
@@ -536,7 +536,7 @@ sub _strip_cond_qualifiers {
   return $cond;
 }
 
-sub _parse_order_by {
+sub _extract_order_columns {
   my ($self, $order_by, $sql_maker) = @_;
 
   my $parser = sub {