line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Node.pm 5801 2008-01-29 10:01:14Z daisuke $ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package DBIx::Replicate::Node; |
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
5
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
6
|
1
|
|
|
1
|
|
8
|
use base qw(Class::Accessor::Fast); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1226
|
|
7
|
1
|
|
|
1
|
|
17460
|
use Carp::Clan; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
8
|
1
|
|
|
1
|
|
17403
|
use UNIVERSAL::require; |
|
1
|
|
|
|
|
2935
|
|
|
1
|
|
|
|
|
15
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors($_) for qw(conn table); # sql_maker |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
15
|
0
|
|
0
|
|
|
|
my $args = shift || {}; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
foreach my $p (qw/conn table/) { |
18
|
0
|
0
|
|
|
|
|
croak "required parameter $p is missing\n" |
19
|
|
|
|
|
|
|
unless $args->{$p}; |
20
|
|
|
|
|
|
|
} |
21
|
0
|
|
|
|
|
|
my $conn = $args->{conn}; |
22
|
0
|
|
|
|
|
|
my $table = $args->{table}; |
23
|
|
|
|
|
|
|
# my $sql_maker_class = $args->{sql_maker_class} || 'SQL::Abstract::Limit'; |
24
|
|
|
|
|
|
|
# my $sql_maker_args = $args->{sql_maker_args} || { limit_dialect => $conn }; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# $sql_maker_class->require or die; |
27
|
|
|
|
|
|
|
# my $sql_maker = $sql_maker_class->new( %{ $sql_maker_args } ); |
28
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new({ |
29
|
|
|
|
|
|
|
conn => $conn, |
30
|
|
|
|
|
|
|
table => $table, |
31
|
|
|
|
|
|
|
# sql_maker => $sql_maker |
32
|
|
|
|
|
|
|
}); |
33
|
0
|
|
|
|
|
|
$self; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|