line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Couchbase::Couch::Design; |
2
|
4
|
|
|
4
|
|
22
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
142
|
|
3
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
87
|
|
4
|
4
|
|
|
4
|
|
17
|
use Couchbase::Client::IDXConst; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
909
|
|
5
|
4
|
|
|
4
|
|
20
|
use base qw(Couchbase::Couch::HandleInfo); |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
1044
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub view_path { |
8
|
0
|
|
|
0
|
0
|
|
my ($design_path,$view_name) = @_; |
9
|
0
|
|
|
|
|
|
return sprintf("%s/_view/%s", $design_path, $view_name); |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub get_view_path { |
13
|
0
|
|
|
0
|
1
|
|
my ($self,$view) = @_; |
14
|
0
|
|
0
|
|
|
|
my $v = ($self->value||{})->{views}->{$view}; |
15
|
0
|
0
|
|
|
|
|
if ($v) { |
16
|
0
|
|
|
|
|
|
return view_path($self->path, $view); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get_view_iterator { |
21
|
0
|
|
|
0
|
1
|
|
my ($self,$view,%options) = @_; |
22
|
0
|
0
|
|
|
|
|
my $vpath = $self->get_view_path($view) or die |
23
|
|
|
|
|
|
|
"no such view $view"; |
24
|
0
|
|
|
|
|
|
$self->parent->couch_view_iterator($vpath,%options); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub get_view_results { |
28
|
0
|
|
|
0
|
1
|
|
my ($self,$view,%options) = @_; |
29
|
0
|
|
|
|
|
|
my $vpath = $self->get_view_path($view); |
30
|
0
|
0
|
|
|
|
|
if (!$vpath) { |
31
|
0
|
|
|
|
|
|
die("No such view '$view'"); |
32
|
|
|
|
|
|
|
} |
33
|
0
|
|
|
|
|
|
$self->parent->couch_view_slurp($vpath,%options); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |