Newer Older
63 lines | 0.947kb
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

            
update document
yuki-kimoto authored on 2010-05-27
14
DBIx::Custom::Query - query used by DBIx::Custom
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
    # New
19
    my $query = DBIx::Custom::Query->new;
20
    
update document
yuki-kimoto authored on 2010-01-30
21
=head1 ATTRIBUTES
packaging one directory
yuki-kimoto authored on 2009-11-16
22

            
23
=head2 sth
24

            
update document
yuki-kimoto authored on 2010-05-27
25
Statement handle.
update document
yuki-kimoto authored on 2009-11-19
26

            
version 0.0901
yuki-kimoto authored on 2009-12-17
27
    $query = $query->sth($sth);
28
    $sth   = $query->sth;
packaging one directory
yuki-kimoto authored on 2009-11-16
29

            
30
=head2 sql
31

            
update document
yuki-kimoto authored on 2010-05-27
32
SQL statement.
update document
yuki-kimoto authored on 2009-11-19
33

            
version 0.0901
yuki-kimoto authored on 2009-12-17
34
    $query = $query->sql($sql);
35
    $sql   = $query->sql;
packaging one directory
yuki-kimoto authored on 2009-11-16
36

            
many many changes
yuki-kimoto authored on 2010-04-30
37
=head2 default_filter
packaging one directory
yuki-kimoto authored on 2009-11-16
38

            
update document
yuki-kimoto authored on 2010-05-27
39
Default filter.
update document
yuki-kimoto authored on 2009-11-19
40

            
update document
yuki-kimoto authored on 2010-05-27
41
    $query          = $query->default_filter($filter);
many many changes
yuki-kimoto authored on 2010-04-30
42
    $default_filter = $query->default_filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
43

            
many many changes
yuki-kimoto authored on 2010-04-30
44
=head2 filter
packaging one directory
yuki-kimoto authored on 2009-11-16
45

            
update document
yuki-kimoto authored on 2010-05-27
46
Filter.
update document
yuki-kimoto authored on 2009-11-19
47

            
update document
yuki-kimoto authored on 2010-05-27
48
    $query  = $query->filter({%filter});
many many changes
yuki-kimoto authored on 2010-04-30
49
    $filter = $query->filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
50

            
simplify filtering system
yuki-kimoto authored on 2010-05-01
51
=head2 columns
packaging one directory
yuki-kimoto authored on 2009-11-16
52

            
update document
yuki-kimoto authored on 2010-05-27
53
Column names.
update document
yuki-kimoto authored on 2009-11-19
54

            
update document
yuki-kimoto authored on 2010-05-27
55
    $query   = $query->columns([@columns]);
simplify filtering system
yuki-kimoto authored on 2010-05-01
56
    $columns = $query->columns;
packaging one directory
yuki-kimoto authored on 2009-11-16
57

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

            
60
This class is L<Object::Simple> subclass.
update document
yuki-kimoto authored on 2010-05-27
61
You can use all methods of L<Object::Simple>.
catch up with Object::Simple...
yuki-kimoto authored on 2010-01-22
62

            
63
=cut