Changeset 1421

Show
Ignore:
Timestamp:
04/07/04 18:34:32
Author:
miyagawa
Message:

0.05

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Class-DBI-AbstractSearch/trunk/Changes

    r1001 r1421  
    11Revision history for Perl extension Class::DBI::AbstractSearch 
    22 
    3 0.03  Thu Feb 19 19:00:53 JST 2004 
     30.05  Wed Apr  7 18:30:27 JST 2004 
     4        - renamed 'order' to 'order_by', used in Class::DBI's search 
     5          (Thanks to Hajime Sugawara) 
     6 
     70.04  Thu Feb 19 19:00:53 JST 2004 
    48        - Fixed some typos. 
    59          (Thanks to Jay Strauss) 
    610        * Added support for SQL::Abstract->new() option 
    711          (Thanks to darren chamberlain) 
     12 
     130.03  Wed Jul 30 20:49:28 JST 2003 
     14        - Fixed warnings for repeated 'my $where' 
    815 
    9160.02  Mon Jun 30 10:37:15 2003 
  • Class-DBI-AbstractSearch/trunk/MANIFEST

    r833 r1421  
    55t/00_compile.t 
    66t/01_abstract.t 
     7META.yml                                 Module meta-data (added by MakeMaker) 
  • Class-DBI-AbstractSearch/trunk/lib/Class/DBI/AbstractSearch.pm

    r1001 r1421  
    33use strict; 
    44use vars qw($VERSION @EXPORT); 
    5 $VERSION = 0.03
     5$VERSION = 0.05
    66 
    77require Exporter; 
     
    1515    my $where = (ref $_[0]) ? $_[0]          : { @_ }; 
    1616    my $attr  = (ref $_[0]) ? $_[1]          : undef; 
    17     my $order = ($attr)     ? delete($attr->{order}) : undef; 
     17    my $order = ($attr)     ? delete($attr->{order_by}) : undef; 
     18 
     19    # order is deprecated, but still backward compatible 
     20    if ($attr && exists($attr->{order})) { 
     21        $order = delete($attr->{order}); 
     22    } 
    1823 
    1924    $class->can('retrieve_from_sql') or do { 
     
    4853      { artist => [ 'Ozzy', 'Kelly' ], 
    4954        status => { '!=', 'outdated' } }, 
    50       { order  => "reldate DESC" }); 
     55      { order_by  => "reldate DESC" }); 
    5156 
    5257=head1 DESCRIPTION 
     
    7883=item * 
    7984 
    80 B<order
     85B<order_by
    8186 
    8287Array reference of fields that will be used to order the results of 
  • Class-DBI-AbstractSearch/trunk/t/02_order.t

    r907 r1421  
    3636{ 
    3737    my @films = Film->search_where({title => [ "title 10", "title 20" ]}, 
    38                                    {order=>["title DESC"]}); 
     38                                   {order_by =>["title DESC"]}); 
    3939    is @films, 2, "films return 2"; 
    4040