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

            
simplify filtering system
yuki-kimoto authored on 2010-05-01
8
__PACKAGE__->attr([qw/sql columns default_filter filter 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 DBIx::Custom commit ...
yuki-kimoto authored on 2010-07-14
22
=head2 C<sql>
packaging one directory
yuki-kimoto authored on 2009-11-16
23

            
cleanup
yuki-kimoto authored on 2010-08-03
24
    my $sql = $query->sql;
cleanup
yuki-kimoto authored on 2010-08-05
25
    $query  = $query->sql('select * from books where author = ?;');
packaging one directory
yuki-kimoto authored on 2009-11-16
26

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
27
SQL statement.
removed reconnect method
yuki-kimoto authored on 2010-05-28
28

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

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

            
removed DESTROY method(not b...
yuki-kimoto authored on 2010-07-18
34
Column names.
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<default_filter>
update document
yuki-kimoto authored on 2009-11-19
37

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

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

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

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

            
cleanup
yuki-kimoto authored on 2010-08-05
49
Filters when parameter binding is executed.
cleanup
yuki-kimoto authored on 2010-08-05
50
This overwrites C<default_filter>.
packaging one directory
yuki-kimoto authored on 2009-11-16
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