line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#=============================================================================== |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# DESCRIPTION: Flow SQL |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# AUTHOR: Aliaksandr P. Zahatski, |
6
|
|
|
|
|
|
|
#=============================================================================== |
7
|
|
|
|
|
|
|
#$Id$ |
8
|
|
|
|
|
|
|
package Collection::Utl::Flow; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Collection::Utl::Flow - extention for flow sql queries |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Flow; |
17
|
|
|
|
|
|
|
my $f = $collection->list_ids( exp=>{ type=>1, }, |
18
|
|
|
|
|
|
|
page=>0, onpage=>10, ); |
19
|
|
|
|
|
|
|
my $fr = create_flow($f, sub { warn Dumper \@_}); |
20
|
|
|
|
|
|
|
$fr->run(); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
extention for flow sql queries |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
28
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
29
|
1
|
|
|
1
|
|
1607
|
use Flow; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use strict; |
31
|
|
|
|
|
|
|
use warnings; |
32
|
|
|
|
|
|
|
use base 'Flow'; |
33
|
|
|
|
|
|
|
sub flow { |
34
|
|
|
|
|
|
|
my $self = shift; |
35
|
|
|
|
|
|
|
if (my $h = $self->get_handler) { |
36
|
|
|
|
|
|
|
my $collection = $self->{__collection__}; |
37
|
|
|
|
|
|
|
my $args = $self->{__flow_sql__}; |
38
|
|
|
|
|
|
|
$collection->__flow_sql__($h, @$args); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |