Newer Older
63 lines | 1.172kb
packaging one directory
yuki-kimoto authored on 2009-11-16
1
package DBIx::Custom::Query;
2

            
update document
yuki-kimoto authored on 2009-11-17
3
use strict;
4
use warnings;
5

            
update document
yuki-kimoto authored on 2010-01-30
6
use base 'Object::Simple';
7

            
cleanup
yuki-kimoto authored on 2010-10-17
8
__PACKAGE__->attr([qw/columns default_filter filter sql sth/]);
cleanup
yuki-kimoto authored on 2010-01-21
9

            
update document
yuki-kimoto authored on 2010-01-30
10
1;
11

            
packaging one directory
yuki-kimoto authored on 2009-11-16
12
=head1 NAME
13

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
14
DBIx::Custom::Query - Query
packaging one directory
yuki-kimoto authored on 2009-11-16
15

            
16
=head1 SYNOPSIS
17
    
version 0.0901
yuki-kimoto authored on 2009-12-17
18
    my $query = DBIx::Custom::Query->new;
19
    
update document
yuki-kimoto authored on 2010-01-30
20
=head1 ATTRIBUTES
packaging one directory
yuki-kimoto authored on 2009-11-16
21

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
22
=head2 C<columns>
removed reconnect method
yuki-kimoto authored on 2010-05-28
23

            
cleanup
yuki-kimoto authored on 2010-08-03
24
    my $columns = $query->columns;
cleanup
yuki-kimoto authored on 2010-08-05
25
    $query      = $query->columns(['auhtor', 'title']);
removed reconnect method
yuki-kimoto authored on 2010-05-28
26

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
27
Column names.
packaging one directory
yuki-kimoto authored on 2009-11-16
28

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
29
=head2 C<default_filter>
update document
yuki-kimoto authored on 2009-11-19
30

            
cleanup
yuki-kimoto authored on 2010-08-03
31
    my $default_filter = $query->default_filter;
cleanup
yuki-kimoto authored on 2010-08-05
32
    $query             = $query->default_filter('encode_utf8');
packaging one directory
yuki-kimoto authored on 2009-11-16
33

            
cleanup
yuki-kimoto authored on 2010-08-05
34
Default filter when parameter binding is executed.
packaging one directory
yuki-kimoto authored on 2009-11-16
35

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
36
=head2 C<filter>
update document
yuki-kimoto authored on 2009-11-19
37

            
cleanup
yuki-kimoto authored on 2010-08-03
38
    my $filter = $query->filter;
cleanup
yuki-kimoto authored on 2010-08-05
39
    $query     = $query->filter({author => 'encode_utf8',
40
                                 title  => 'encode_utf8'});
packaging one directory
yuki-kimoto authored on 2009-11-16
41

            
cleanup
yuki-kimoto authored on 2010-08-05
42
Filters when parameter binding is executed.
cleanup
yuki-kimoto authored on 2010-08-05
43
This overwrites C<default_filter>.
packaging one directory
yuki-kimoto authored on 2009-11-16
44

            
cleanup
yuki-kimoto authored on 2010-10-17
45
=head2 C<sql>
46

            
47
    my $sql = $query->sql;
48
    $query  = $query->sql('select * from books where author = ?;');
49

            
50
SQL statement.
51

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
52
=head2 C<sth>
update document
yuki-kimoto authored on 2009-11-19
53

            
cleanup
yuki-kimoto authored on 2010-08-03
54
    my $sth = $query->sth;
55
    $query  = $query->sth($sth);
packaging one directory
yuki-kimoto authored on 2009-11-16
56

            
cleanup
yuki-kimoto authored on 2010-08-05
57
Statement handle of L<DBI>
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
58

            
update document
yuki-kimoto authored on 2010-01-30
59
=head1 METHODS
60

            
cleanup
yuki-kimoto authored on 2010-08-05
61
L<DBIx::Custom::Query> inherits all methods from L<Object::Simple>.
catch up with Object::Simple...
yuki-kimoto authored on 2010-01-22
62

            
63
=cut