DBIx-Custom / lib / DBI / Custom.pm /
Newer Older
551 lines | 13.07kb
first commit
yuki-kimoto authored on 2009-10-13
1
package DBI::Custom;
2
use Object::Simple;
add test
yuki-kimoto authored on 2009-10-16
3

            
4
our $VERSION = '0.0101';
5

            
6
use Carp 'croak';
add some method
yuki-kimoto authored on 2009-10-14
7
use DBI;
first commit
yuki-kimoto authored on 2009-10-13
8

            
cleanup
yuki-kimoto authored on 2009-10-15
9
# Model
10
sub model : ClassAttr { auto_build => \&_inherit_model }
first commit
yuki-kimoto authored on 2009-10-13
11

            
cleanup
yuki-kimoto authored on 2009-10-15
12
# Inherit super class model
13
sub _inherit_model {
add test
yuki-kimoto authored on 2009-10-16
14
    my $class = shift;
cleanup
yuki-kimoto authored on 2009-10-15
15
    my $super = do {
16
        no strict 'refs';
17
        ${"${class}::ISA"}[0];
18
    };
19
    my $model = eval{$super->can('model')}
20
                         ? $super->model->clone
21
                         : $class->Object::Simple::new;
cleanup
yuki-kimoto authored on 2009-10-14
22
    
23
    $class->model($model);
first commit
yuki-kimoto authored on 2009-10-13
24
}
25

            
cleanup
yuki-kimoto authored on 2009-10-15
26
# New
27
sub new {
28
    my $self = shift->Object::Simple::new(@_);
29
    my $class = ref $self;
30
    return bless {%{$class->model->clone}, %{$self}}, $class;
first commit
yuki-kimoto authored on 2009-10-13
31
}
32

            
cleanup
yuki-kimoto authored on 2009-10-15
33
# Initialize modle
34
sub initialize_model {
35
    my ($class, $callback) = @_;
first commit
yuki-kimoto authored on 2009-10-13
36
    
cleanup
yuki-kimoto authored on 2009-10-15
37
    # Callback to initialize model
38
    $callback->($class->model);
first commit
yuki-kimoto authored on 2009-10-13
39
}
40

            
cleanup
yuki-kimoto authored on 2009-10-15
41
# Clone
42
sub clone {
cleanup
yuki-kimoto authored on 2009-10-14
43
    my $self = shift;
cleanup
yuki-kimoto authored on 2009-10-15
44
    my $new = $self->Object::Simple::new;
add test
yuki-kimoto authored on 2009-10-16
45
    $new->connect_info(%{$self->connect_info || {}});
cleanup
yuki-kimoto authored on 2009-10-15
46
    $new->filters(%{$self->filters || {}});
add test
yuki-kimoto authored on 2009-10-16
47
    $new->bind_filter($self->bind_filter);
48
    $new->fetch_filter($self->fetch_filter);
add various things
yuki-kimoto authored on 2009-10-17
49
    $new->result_class($self->result_class);
cleanup
yuki-kimoto authored on 2009-10-14
50
}
51

            
cleanup
yuki-kimoto authored on 2009-10-15
52
# Attribute
53
sub connect_info       : Attr { type => 'hash',  auto_build => sub { shift->connect_info({}) } }
cleanup
yuki-kimoto authored on 2009-10-15
54

            
add tests
yuki-kimoto authored on 2009-10-18
55
sub bind_filter  : Attr {}
add test
yuki-kimoto authored on 2009-10-16
56
sub fetch_filter : Attr {}
cleanup
yuki-kimoto authored on 2009-10-15
57

            
add test
yuki-kimoto authored on 2009-10-16
58
sub filters : Attr { type => 'hash', deref => 1, auto_build => sub { shift->filters({}) } }
cleanup
yuki-kimoto authored on 2009-10-15
59
sub add_filter { shift->filters(@_) }
60

            
add tests
yuki-kimoto authored on 2009-10-18
61
sub result_class : Attr { auto_build => sub { shift->result_class('DBI::Custom::Result') }}
add tests
yuki-kimoto authored on 2009-10-18
62
sub dbh          : Attr {}
add test
yuki-kimoto authored on 2009-10-17
63
sub sql_template : Attr { auto_build => sub { shift->sql_template(DBI::Custom::SQLTemplate->new) } }
add various
yuki-kimoto authored on 2009-10-18
64

            
65
# Auto commit
66
sub auto_commit {
67
    my $self = shift;
68
    
69
    croak("Cannot change AutoCommit becouse of not connected")
70
        unless $self->dbh;
71
    
72
    if (@_) {
73
        $self->dbh->{AutoCommit} = $_[0];
74
        return $self;
75
    }
76
    return $self->dbh->{AutoCommit};
77
}
add test
yuki-kimoto authored on 2009-10-16
78

            
add various things
yuki-kimoto authored on 2009-10-17
79

            
add test
yuki-kimoto authored on 2009-10-16
80
our %VALID_CONNECT_INFO = map {$_ => 1} qw/data_source user password options/;
cleanup
yuki-kimoto authored on 2009-10-14
81

            
add various things
yuki-kimoto authored on 2009-10-17
82
# Connect
add some method
yuki-kimoto authored on 2009-10-14
83
sub connect {
84
    my $self = shift;
85
    my $connect_info = $self->connect_info;
86
    
add test
yuki-kimoto authored on 2009-10-16
87
    foreach my $key (keys %{$self->connect_info}) {
add test module
yuki-kimoto authored on 2009-10-19
88
        croak("connect_info '$key' is wrong name")
add test
yuki-kimoto authored on 2009-10-17
89
          unless $VALID_CONNECT_INFO{$key};
add test
yuki-kimoto authored on 2009-10-16
90
    }
91
    
add some method
yuki-kimoto authored on 2009-10-14
92
    my $dbh = DBI->connect(
add test
yuki-kimoto authored on 2009-10-16
93
        $connect_info->{data_source},
add some method
yuki-kimoto authored on 2009-10-14
94
        $connect_info->{user},
95
        $connect_info->{password},
96
        {
97
            RaiseError => 1,
98
            PrintError => 0,
99
            AutoCommit => 1,
100
            %{$connect_info->{options} || {} }
101
        }
102
    );
103
    
104
    $self->dbh($dbh);
add various
yuki-kimoto authored on 2009-10-18
105
    return $self;
add some method
yuki-kimoto authored on 2009-10-14
106
}
first commit
yuki-kimoto authored on 2009-10-13
107

            
add tests
yuki-kimoto authored on 2009-10-18
108
sub DESTROY {
109
    my $self = shift;
add tests
yuki-kimoto authored on 2009-10-18
110
    $self->disconnect if $self->connected;
add tests
yuki-kimoto authored on 2009-10-18
111
}
112

            
add various things
yuki-kimoto authored on 2009-10-17
113
# Is connected?
114
sub connected {
115
    my $self = shift;
add tests
yuki-kimoto authored on 2009-10-18
116
    return exists $self->{dbh} && eval {$self->{dbh}->can('prepare')};
add various things
yuki-kimoto authored on 2009-10-17
117
}
118

            
119
# Disconnect
120
sub disconnect {
121
    my $self = shift;
add tests
yuki-kimoto authored on 2009-10-18
122
    if ($self->connected) {
add various things
yuki-kimoto authored on 2009-10-17
123
        $self->dbh->disconnect;
124
        delete $self->{dbh};
125
    }
126
}
127

            
128
# Reconnect
129
sub reconnect {
130
    my $self = shift;
add tests
yuki-kimoto authored on 2009-10-18
131
    $self->disconnect if $self->connected;
add various things
yuki-kimoto authored on 2009-10-17
132
    $self->connect;
133
}
134

            
add tests
yuki-kimoto authored on 2009-10-18
135
# Commit
136
sub commit {
137
    my $self = shift;
add various
yuki-kimoto authored on 2009-10-18
138
    croak("Connection is not established") unless $self->connected;
add tests
yuki-kimoto authored on 2009-10-18
139
    return $self->dbh->commit;
140
}
141

            
142
# Rollback
143
sub rollback {
144
    my $self = shift;
add various
yuki-kimoto authored on 2009-10-18
145
    croak("Connection is not established") unless $self->connected;
add tests
yuki-kimoto authored on 2009-10-18
146
    return $self->dbh->rollback;
147
}
148

            
add tests
yuki-kimoto authored on 2009-10-18
149
sub dbh_option {
150
    my $self = shift;
151
    croak("Not connected") unless $self->connected;
152
    my $dbh = $self->dbh;
153
    if (@_ > 1) {
154
        $dbh->{$_[0]} = $_[1];
155
        return $self;
156
    }
157
    return $dbh->{$_[0]}
158
}
159

            
cleanup
yuki-kimoto authored on 2009-10-18
160
# Create SQL from SQL template
add test
yuki-kimoto authored on 2009-10-17
161
sub create_sql {
162
    my $self = shift;
163
    
164
    my ($sql, @bind) = $self->sql_template->create_sql(@_);
165
    
166
    return ($sql, @bind);
167
}
168

            
cleanup
yuki-kimoto authored on 2009-10-18
169
# Prepare and execute SQL
add some method
yuki-kimoto authored on 2009-10-14
170
sub query {
try varioud way
yuki-kimoto authored on 2009-10-17
171
    my ($self, $template, $values, $filter)  = @_;
172
    
add tests
yuki-kimoto authored on 2009-10-18
173
    my $sth_options;
174
    
175
    # Rearrange when argumets is hash referecne 
176
    if (ref $template eq 'HASH') {
177
        my $args = $template;
178
        ($template, $values, $filter, $sth_options)
179
          = @{$args}{qw/template values filter sth_options/};
180
    }
181
    
try varioud way
yuki-kimoto authored on 2009-10-17
182
    $filter ||= $self->bind_filter;
183
    
add various things
yuki-kimoto authored on 2009-10-17
184
    my ($sql, @bind) = $self->create_sql($template, $values, $filter);
add tests
yuki-kimoto authored on 2009-10-18
185
    
186
    $self->connect unless $self->connected;
187
    
add various things
yuki-kimoto authored on 2009-10-17
188
    my $sth = $self->dbh->prepare($sql);
add tests
yuki-kimoto authored on 2009-10-18
189
    
190
    if ($sth_options) {
191
        foreach my $key (keys %$sth_options) {
192
            $sth->{$key} = $sth_options->{$key};
193
        }
194
    }
195
    
cleanup
yuki-kimoto authored on 2009-10-18
196
    # Execute
add tests
yuki-kimoto authored on 2009-10-18
197
    my $ret_val = $sth->execute(@bind);
add various things
yuki-kimoto authored on 2009-10-17
198
    
cleanup
yuki-kimoto authored on 2009-10-18
199
    # Return resultset if select statement is executed
add various things
yuki-kimoto authored on 2009-10-17
200
    if ($sth->{NUM_OF_FIELDS}) {
201
        my $result_class = $self->result_class;
add various
yuki-kimoto authored on 2009-10-18
202
        my $result = $result_class->new({
203
            sth => $sth,
204
            fetch_filter => $self->fetch_filter
205
        });
add various things
yuki-kimoto authored on 2009-10-17
206
        return $result;
207
    }
add tests
yuki-kimoto authored on 2009-10-18
208
    return $ret_val;
add test
yuki-kimoto authored on 2009-10-17
209
}
210

            
cleanup
yuki-kimoto authored on 2009-10-18
211
# Prepare and execute raw SQL
add test
yuki-kimoto authored on 2009-10-17
212
sub query_raw_sql {
cleanup
yuki-kimoto authored on 2009-10-18
213
    my ($self, $sql, @bind_values) = @_;
add tests
yuki-kimoto authored on 2009-10-18
214
    
cleanup
yuki-kimoto authored on 2009-10-18
215
    # Connect
add various
yuki-kimoto authored on 2009-10-18
216
    $self->connect unless $self->connected;
cleanup
yuki-kimoto authored on 2009-10-18
217
    
218
    # Add semicolon if not exist;
add tests
yuki-kimoto authored on 2009-10-18
219
    $sql .= ';' unless $sql =~ /;$/;
cleanup
yuki-kimoto authored on 2009-10-18
220
    
221
    # Prepare
add various things
yuki-kimoto authored on 2009-10-17
222
    my $sth = $self->dbh->prepare($sql);
cleanup
yuki-kimoto authored on 2009-10-18
223
    
224
    # Execute
225
    $sth->execute(@bind_values);
226
    
add various things
yuki-kimoto authored on 2009-10-17
227
    return $sth;
add test
yuki-kimoto authored on 2009-10-17
228
}
229

            
230
Object::Simple->build_class;
231

            
add various things
yuki-kimoto authored on 2009-10-17
232
package DBI::Custom::Result;
233
use Object::Simple;
234

            
add various
yuki-kimoto authored on 2009-10-18
235
sub sth          : Attr {}
236
sub fetch_filter : Attr {}
add various things
yuki-kimoto authored on 2009-10-17
237

            
add various
yuki-kimoto authored on 2009-10-18
238
sub fetch {
239
    my ($self, $type) = @_;
240
    my $sth = $self->sth;
241
    $type ||= 'array';
add various things
yuki-kimoto authored on 2009-10-17
242
    
add various
yuki-kimoto authored on 2009-10-18
243
    my $fetch_filter = $self->fetch_filter;
add various
yuki-kimoto authored on 2009-10-18
244
    if ($type eq 'hash') {
245
        my $hash = $sth->fetchrow_hashref;
246
        return unless $hash;
247
        if ($fetch_filter) {
248
            foreach my $key (keys %$hash) {
249
                $hash->{$key} = $fetch_filter->($key, $hash->{$key});
250
            }
add various
yuki-kimoto authored on 2009-10-18
251
        }
add various
yuki-kimoto authored on 2009-10-18
252
        return wantarray ? %$hash : $hash;
add various
yuki-kimoto authored on 2009-10-18
253
    }
add various
yuki-kimoto authored on 2009-10-18
254
    else {
255
        my $array = $sth->fetchrow_arrayref;
256
        return unless $array;
257
        if ($fetch_filter) {
258
            my $keys = $sth->{NAME_lc};
259
            for (my $i = 0; $i < @$keys; $i++) {
260
                $array->[$i] = $fetch_filter->($keys->[$i], $array->[$i]);
261
            }
add various
yuki-kimoto authored on 2009-10-18
262
        }
add various
yuki-kimoto authored on 2009-10-18
263
        return wantarray ? @$array : $array;
add various
yuki-kimoto authored on 2009-10-18
264
    }
265
}
add various things
yuki-kimoto authored on 2009-10-17
266

            
add various
yuki-kimoto authored on 2009-10-18
267
sub fetch_all {
268
    my ($self, $type) = @_;
269
    $type ||= 'array';
add various
yuki-kimoto authored on 2009-10-18
270
    
add various
yuki-kimoto authored on 2009-10-18
271
    if ($type eq 'hash') {
272
        my $array_of_hash = [];
273
        while(my %hash = $self->fetch('hash')) {
274
            push @$array_of_hash, {%hash};
275
        }
276
        return wantarray ? @$array_of_hash : $array_of_hash;
277
    }
278
    else {
279
        my $array_of_array = [];
280
        while(my %array = $self->fetch('hash')) {
281
            push @$array_of_array, {%array};
add various
yuki-kimoto authored on 2009-10-18
282
        }
add various
yuki-kimoto authored on 2009-10-18
283
        return wantarray ? @$array_of_array : $array_of_array;
add various
yuki-kimoto authored on 2009-10-18
284
    }
285
}
add various things
yuki-kimoto authored on 2009-10-17
286

            
287
sub err    { shift->sth->err }
288
sub errstr { shift->sth->errstr }
289
sub state  { shift->sth->state }
add various
yuki-kimoto authored on 2009-10-18
290
sub finish { shift->sth->finish }
add various things
yuki-kimoto authored on 2009-10-17
291

            
292
Object::Simple->build_class;
293

            
294

            
add test
yuki-kimoto authored on 2009-10-17
295
package DBI::Custom::SQLTemplate;
296
use Object::Simple;
try various way
yuki-kimoto authored on 2009-10-17
297
use Carp 'croak';
add test
yuki-kimoto authored on 2009-10-17
298

            
try varioud way
yuki-kimoto authored on 2009-10-17
299
### Attributes;
try various way
yuki-kimoto authored on 2009-10-17
300
sub tag_start   : Attr { default => '{' }
301
sub tag_end     : Attr { default => '}' }
302
sub template    : Attr {};
303
sub tree        : Attr { auto_build => sub { shift->tree([]) } }
304
sub bind_filter : Attr {}
305
sub values      : Attr {}
306
sub upper_case  : Attr {default => 0}
try varioud way
yuki-kimoto authored on 2009-10-17
307

            
add test
yuki-kimoto authored on 2009-10-17
308
sub create_sql {
try varioud way
yuki-kimoto authored on 2009-10-17
309
    my ($self, $template, $values, $filter)  = @_;
310
    
try various way
yuki-kimoto authored on 2009-10-17
311
    $filter ||= $self->bind_filter;
312
    
try varioud way
yuki-kimoto authored on 2009-10-17
313
    $self->parse($template);
314
    
try various way
yuki-kimoto authored on 2009-10-17
315
    my ($sql, @bind) = $self->build_sql({bind_filter => $filter, values => $values});
try varioud way
yuki-kimoto authored on 2009-10-17
316
    
317
    return ($sql, @bind);
318
}
319

            
320
our $TAG_SYNTAX = <<'EOS';
321
[tag]            [expand]
add test module
yuki-kimoto authored on 2009-10-19
322
{? name}         ?
try varioud way
yuki-kimoto authored on 2009-10-17
323
{= name}         name = ?
try various way
yuki-kimoto authored on 2009-10-17
324
{<> name}        name <> ?
try varioud way
yuki-kimoto authored on 2009-10-17
325

            
326
{< name}         name < ?
327
{> name}         name > ?
328
{>= name}        name >= ?
329
{<= name}        name <= ?
330

            
331
{like name}      name like ?
332
{in name}        name in [?, ?, ..]
333

            
334
{insert_values}  (key1, key2, key3) values (?, ?, ?)
335
{update_values}  set key1 = ?, key2 = ?, key3 = ?
336
EOS
337

            
try various way
yuki-kimoto authored on 2009-10-17
338
our %VALID_TAG_NAMES = map {$_ => 1} qw/= <> < > >= <= like in insert_values update_set/;
try varioud way
yuki-kimoto authored on 2009-10-17
339
sub parse {
340
    my ($self, $template) = @_;
341
    $self->template($template);
342
    
343
    # Clean start;
344
    delete $self->{tree};
345
    
346
    # Tags
347
    my $tag_start = quotemeta $self->tag_start;
348
    my $tag_end   = quotemeta $self->tag_end;
first commit
yuki-kimoto authored on 2009-10-13
349
    
try varioud way
yuki-kimoto authored on 2009-10-17
350
    # Tokenize
351
    my $state = 'text';
352
    
353
    # Save original template
354
    my $original_template = $template;
355
    
356
    # Text
357
    while ($template =~ s/([^$tag_start]*?)$tag_start([^$tag_end].*?)$tag_end//sm) {
try various way
yuki-kimoto authored on 2009-10-17
358
        my $text = $1;
try varioud way
yuki-kimoto authored on 2009-10-17
359
        my $tag  = $2;
360
        
try various way
yuki-kimoto authored on 2009-10-17
361
        push @{$self->tree}, {type => 'text', args => [$text]} if $text;
try varioud way
yuki-kimoto authored on 2009-10-17
362
        
363
        if ($tag) {
364
            
try various way
yuki-kimoto authored on 2009-10-17
365
            my ($tag_name, @args) = split /\s+/, $tag;
try varioud way
yuki-kimoto authored on 2009-10-17
366
            
try various way
yuki-kimoto authored on 2009-10-17
367
            $tag ||= '';
add test module
yuki-kimoto authored on 2009-10-19
368
            croak("Tag '$tag' in SQL template is not exist.\n\n" .
try various way
yuki-kimoto authored on 2009-10-17
369
                  "SQL template tag syntax\n$TAG_SYNTAX\n\n" .
370
                  "Your SQL template is \n$original_template\n\n")
371
              unless $VALID_TAG_NAMES{$tag_name};
try varioud way
yuki-kimoto authored on 2009-10-17
372
            
try various way
yuki-kimoto authored on 2009-10-17
373
            push @{$self->tree}, {type => 'tag', tag_name => $tag_name, args => [@args]};
try varioud way
yuki-kimoto authored on 2009-10-17
374
        }
375
    }
376
    
try various way
yuki-kimoto authored on 2009-10-17
377
    push @{$self->tree}, {type => 'text', args => [$template]} if $template;
first commit
yuki-kimoto authored on 2009-10-13
378
}
379

            
try various way
yuki-kimoto authored on 2009-10-17
380
our %EXPAND_PLACE_HOLDER = map {$_ => 1} qw/= <> < > >= <= like/;
381
sub build_sql {
382
    my ($self, $args) = @_;
383
    
384
    my $tree        = $args->{tree} || $self->tree;
385
    my $bind_filter = $args->{bind_filter} || $self->bind_filter;
386
    my $values      = exists $args->{values} ? $args->{values} : $self->values;
387
    
388
    my @bind_values;
389
    my $sql = '';
390
    foreach my $node (@$tree) {
391
        my $type     = $node->{type};
392
        my $tag_name = $node->{tag_name};
393
        my $args     = $node->{args};
394
        
395
        if ($type eq 'text') {
396
            # Join text
397
            $sql .= $args->[0];
398
        }
399
        elsif ($type eq 'tag') {
400
            if ($EXPAND_PLACE_HOLDER{$tag_name}) {
401
                my $key = $args->[0];
402
                
403
                # Filter Value
404
                if ($bind_filter) {
try various way
yuki-kimoto authored on 2009-10-17
405
                    push @bind_values, scalar $bind_filter->($key, $values->{$key});
try various way
yuki-kimoto authored on 2009-10-17
406
                }
407
                else {
408
                    push @bind_values, $values->{$key};
409
                }
410
                $tag_name = uc $tag_name if $self->upper_case;
411
                my $place_holder = "$key $tag_name ?";
412
                $sql .= $place_holder;
413
            }
try various way
yuki-kimoto authored on 2009-10-17
414
            elsif ($tag_name eq 'insert_values') {
415
                my $statement_keys          = '(';
416
                my $statement_place_holders = '(';
417
                
418
                $values = $values->{insert_values};
419
                
420
                foreach my $key (sort keys %$values) {
421
                    if ($bind_filter) {
422
                        push @bind_values, scalar $bind_filter->($key, $values->{$key});
423
                    }
424
                    else {
425
                        push @bind_values, $values->{$key};
426
                    }
427
                    
428
                    $statement_keys          .= "$key, ";
429
                    $statement_place_holders .= "?, ";
430
                }
431
                
432
                $statement_keys =~ s/, $//;
433
                $statement_keys .= ')';
434
                
435
                $statement_place_holders =~ s/, $//;
436
                $statement_place_holders .= ')';
437
                
438
                $sql .= "$statement_keys values $statement_place_holders";
439
            }
440
            elsif ($tag_name eq 'update_set') {
441
                my $statement          = 'set ';
442
                
443
                $values = $values->{update_set};
444
                
445
                foreach my $key (sort keys %$values) {
446
                    if ($bind_filter) {
447
                        push @bind_values, scalar $bind_filter->($key, $values->{$key});
448
                    }
449
                    else {
450
                        push @bind_values, $values->{$key};
451
                    }
452
                    
453
                    $statement          .= "$key = ?, ";
454
                }
455
                
456
                $statement =~ s/, $//;
457
                
458
                $sql .= $statement;
459
            }
try various way
yuki-kimoto authored on 2009-10-17
460
        }
461
    }
462
    $sql .= ';' unless $sql =~ /;$/;
463
    return ($sql, @bind_values);
464
}
try varioud way
yuki-kimoto authored on 2009-10-17
465

            
466

            
first commit
yuki-kimoto authored on 2009-10-13
467
Object::Simple->build_class;
468

            
add various things
yuki-kimoto authored on 2009-10-17
469
package DBI::Custom;
470
1;
471

            
first commit
yuki-kimoto authored on 2009-10-13
472
=head1 NAME
473

            
add test
yuki-kimoto authored on 2009-10-17
474
DBI::Custom - Customizable simple DBI
first commit
yuki-kimoto authored on 2009-10-13
475

            
476
=head1 VERSION
477

            
add test
yuki-kimoto authored on 2009-10-16
478
Version 0.0101
first commit
yuki-kimoto authored on 2009-10-13
479

            
480
=cut
481

            
482
=head1 SYNOPSIS
483

            
add test
yuki-kimoto authored on 2009-10-16
484
  my $dbi = DBI::Custom->new;
first commit
yuki-kimoto authored on 2009-10-13
485

            
add test
yuki-kimoto authored on 2009-10-16
486
=head1 METHODS
first commit
yuki-kimoto authored on 2009-10-13
487

            
add test
yuki-kimoto authored on 2009-10-16
488
=head2 add_filter
first commit
yuki-kimoto authored on 2009-10-13
489

            
add test module
yuki-kimoto authored on 2009-10-19
490
    
491

            
add test
yuki-kimoto authored on 2009-10-16
492
=head2 bind_filter
first commit
yuki-kimoto authored on 2009-10-13
493

            
add test
yuki-kimoto authored on 2009-10-16
494
=head2 clone
first commit
yuki-kimoto authored on 2009-10-13
495

            
add test
yuki-kimoto authored on 2009-10-16
496
=head2 connect
first commit
yuki-kimoto authored on 2009-10-13
497

            
add test
yuki-kimoto authored on 2009-10-16
498
=head2 connect_info
first commit
yuki-kimoto authored on 2009-10-13
499

            
add test
yuki-kimoto authored on 2009-10-16
500
=head2 dbh
first commit
yuki-kimoto authored on 2009-10-13
501

            
add test
yuki-kimoto authored on 2009-10-16
502
=head2 fetch_filter
first commit
yuki-kimoto authored on 2009-10-13
503

            
add test
yuki-kimoto authored on 2009-10-16
504
=head2 filters
first commit
yuki-kimoto authored on 2009-10-13
505

            
add test
yuki-kimoto authored on 2009-10-16
506
=head2 initialize_model
first commit
yuki-kimoto authored on 2009-10-13
507

            
add test
yuki-kimoto authored on 2009-10-16
508
=head2 model
first commit
yuki-kimoto authored on 2009-10-13
509

            
add test
yuki-kimoto authored on 2009-10-16
510
=head2 new
511

            
512
=head2 query
first commit
yuki-kimoto authored on 2009-10-13
513

            
add test
yuki-kimoto authored on 2009-10-17
514
=head2 create_sql
515

            
516
=head2 query_raw_sql
517

            
518
=head2 sql_template
519

            
add tests
yuki-kimoto authored on 2009-10-18
520
=head2 auto_commit
521

            
522
=head2 connected
523

            
524
=head2 dbh_option
525

            
526
=head2 disconnect
527

            
528
=head2 reconnect
529

            
530
=head2 result_class
531

            
add various
yuki-kimoto authored on 2009-10-18
532
=head2 commit
first commit
yuki-kimoto authored on 2009-10-13
533

            
add various
yuki-kimoto authored on 2009-10-18
534
=head2 rollback
first commit
yuki-kimoto authored on 2009-10-13
535

            
536

            
add various
yuki-kimoto authored on 2009-10-18
537
=head1 AUTHOR
first commit
yuki-kimoto authored on 2009-10-13
538

            
add various
yuki-kimoto authored on 2009-10-18
539
Yuki Kimoto, C<< <kimoto.yuki at gmail.com> >>
first commit
yuki-kimoto authored on 2009-10-13
540

            
541
=head1 COPYRIGHT & LICENSE
542

            
543
Copyright 2009 Yuki Kimoto, all rights reserved.
544

            
545
This program is free software; you can redistribute it and/or modify it
546
under the same terms as Perl itself.
547

            
548

            
549
=cut
550

            
551
1; # End of DBI::Custom