Newer Older
70 lines | 1.127kb
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 2009-11-17
14
DBIx::Custom::Query - DBIx::Custom 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
    # New
19
    my $query = DBIx::Custom::Query->new;
20
    
21
    # Create by using create_query
22
    my $query = DBIx::Custom->create_query($template);
23
    
update document
yuki-kimoto authored on 2010-01-30
24
=head1 ATTRIBUTES
packaging one directory
yuki-kimoto authored on 2009-11-16
25

            
26
=head2 sth
27

            
update document
yuki-kimoto authored on 2010-01-30
28
Statement handle
update document
yuki-kimoto authored on 2009-11-19
29

            
version 0.0901
yuki-kimoto authored on 2009-12-17
30
    $query = $query->sth($sth);
31
    $sth   = $query->sth;
packaging one directory
yuki-kimoto authored on 2009-11-16
32

            
33
=head2 sql
34

            
update document
yuki-kimoto authored on 2010-01-30
35
SQL
update document
yuki-kimoto authored on 2009-11-19
36

            
version 0.0901
yuki-kimoto authored on 2009-12-17
37
    $query = $query->sql($sql);
38
    $sql   = $query->sql;
packaging one directory
yuki-kimoto authored on 2009-11-16
39

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

            
update document
yuki-kimoto authored on 2010-01-30
42
Filter excuted when value is bind
update document
yuki-kimoto authored on 2009-11-19
43

            
many many changes
yuki-kimoto authored on 2010-04-30
44
    $query          = $query->default_filter($default_filter);
45
    $default_filter = $query->default_filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
46

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

            
many many changes
yuki-kimoto authored on 2010-04-30
49
Filter excuted when value is bind
update document
yuki-kimoto authored on 2009-11-19
50

            
many many changes
yuki-kimoto authored on 2010-04-30
51
    $query  = $query->filter($filter);
52
    $filter = $query->filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
53

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

            
update document
yuki-kimoto authored on 2010-01-30
56
Key informations
update document
yuki-kimoto authored on 2009-11-19
57

            
simplify filtering system
yuki-kimoto authored on 2010-05-01
58
    $query   = $query->columns($columns);
59
    $columns = $query->columns;
packaging one directory
yuki-kimoto authored on 2009-11-16
60

            
update document
yuki-kimoto authored on 2010-01-30
61
=head1 METHODS
62

            
63
This class is L<Object::Simple> subclass.
64
You can use all methods of L<Object::Simple>
cleanup
yuki-kimoto authored on 2009-12-22
65

            
66
=head2 new
67

            
68
    my $query = DBIx::Custom::Query->new;
catch up with Object::Simple...
yuki-kimoto authored on 2010-01-22
69

            
70
=cut