Commit | Line | Data |
656796f2 |
1 | package DBIx::Class::CDBICompat::Retrieve; |
2 | |
3 | use strict; |
4 | use warnings FATAL => 'all'; |
5 | |
716b3d29 |
6 | |
7 | sub retrieve { |
8 | die "No args to retrieve" unless @_ > 1; |
9 | shift->find(@_); |
10 | } |
6009260a |
11 | |
12 | sub retrieve_from_sql { |
13 | my ($class, $cond, @rest) = @_; |
14 | $cond =~ s/^\s*WHERE//i; |
15 | $class->search_literal($cond, @rest); |
16 | } |
656796f2 |
17 | |
716b3d29 |
18 | sub retrieve_all { shift->search } |
3125eb1f |
19 | sub count_all { shift->count } |
cba994a1 |
20 | # Contributed by Numa. No test for this though. |
21 | |
656796f2 |
22 | 1; |