find_related now does search_related->find
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Retrieve.pm
1 package DBIx::Class::CDBICompat::Retrieve;
2
3 use strict;
4 use warnings FATAL => 'all';
5
6
7 sub retrieve  {
8   die "No args to retrieve" unless @_ > 1;
9   shift->find(@_);
10 }
11
12 sub retrieve_from_sql {
13   my ($class, $cond, @rest) = @_;
14   $cond =~ s/^\s*WHERE//i;
15   $class->search_literal($cond, @rest);
16 }
17
18 sub retrieve_all      { shift->search              }
19 sub count_all         { shift->count               }
20   # Contributed by Numa. No test for this though.
21
22 1;