line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # hide form PAUSE |
2
|
|
|
|
|
|
|
DBIx::Class::CDBICompat::AbstractSearch; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
1945
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
5
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
276
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
DBIx::Class::CDBICompat::AbstractSearch - Emulates Class::DBI::AbstractSearch |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
See DBIx::Class::CDBICompat for usage directions. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Emulates L. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# The keys are mostly the same. |
22
|
|
|
|
|
|
|
my %cdbi2dbix = ( |
23
|
|
|
|
|
|
|
limit => 'rows', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub search_where { |
27
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
28
|
0
|
0
|
|
|
|
|
my $where = (ref $_[0]) ? $_[0] : { @_ }; |
29
|
0
|
0
|
|
|
|
|
my $attr = (ref $_[0]) ? $_[1] : {}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Translate the keys |
32
|
0
|
|
|
|
|
|
$attr->{$cdbi2dbix{$_}} = delete $attr->{$_} for keys %cdbi2dbix; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $class->resultset_instance->search($where, $attr); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 FURTHER QUESTIONS? |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Check the list of L. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This module is free software L |
44
|
|
|
|
|
|
|
by the L. You can |
45
|
|
|
|
|
|
|
redistribute it and/or modify it under the same terms as the |
46
|
|
|
|
|
|
|
L. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |