From: Peter Rabbitson Date: Fri, 8 Oct 2010 10:41:54 +0000 (+0200) Subject: Rename vaguely named internal method X-Git-Tag: v0.08124~56 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7d3139ac1ff52213e2dad35fc9c9d1057711256a;p=dbsrgits%2FDBIx-Class.git Rename vaguely named internal method --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index dcc23b8..c228743 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -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} diff --git a/lib/DBIx/Class/ResultSetColumn.pm b/lib/DBIx/Class/ResultSetColumn.pm index 0d5d094..b4707e6 100644 --- a/lib/DBIx/Class/ResultSetColumn.pm +++ b/lib/DBIx/Class/ResultSetColumn.pm @@ -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; diff --git a/lib/DBIx/Class/Storage/DBI/MSSQL.pm b/lib/DBIx/Class/Storage/DBI/MSSQL.pm index 9cde4b9..5d14612 100644 --- a/lib/DBIx/Class/Storage/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Storage/DBI/MSSQL.pm @@ -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 diff --git a/lib/DBIx/Class/Storage/DBI/Replicated.pm b/lib/DBIx/Class/Storage/DBI/Replicated.pm index 0511253..2ac1d25 100644 --- a/lib/DBIx/Class/Storage/DBI/Replicated.pm +++ b/lib/DBIx/Class/Storage/DBI/Replicated.pm @@ -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 diff --git a/lib/DBIx/Class/Storage/DBIHacks.pm b/lib/DBIx/Class/Storage/DBIHacks.pm index c46b0e3..ed5de4d 100644 --- a/lib/DBIx/Class/Storage/DBIHacks.pm +++ b/lib/DBIx/Class/Storage/DBIHacks.pm @@ -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 {