Newer Older
74 lines | 1.318kb
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

            
rename bind_filter to query_...
yuki-kimoto authored on 2010-04-28
8
__PACKAGE__->attr([qw/sql key_infos query_filter fetch_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
    
many change
yuki-kimoto authored on 2010-02-11
24
    # Attributes
rename bind_filter to query_...
yuki-kimoto authored on 2010-04-28
25
    $query->query_filter($dbi->filters->{default_query_filter});
packaging one directory
yuki-kimoto authored on 2009-11-16
26
    $query->fetch_filter($dbi->filters->{default_fetch_filter});
27

            
update document
yuki-kimoto authored on 2010-01-30
28
=head1 ATTRIBUTES
packaging one directory
yuki-kimoto authored on 2009-11-16
29

            
30
=head2 sth
31

            
update document
yuki-kimoto authored on 2010-01-30
32
Statement handle
update document
yuki-kimoto authored on 2009-11-19
33

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

            
37
=head2 sql
38

            
update document
yuki-kimoto authored on 2010-01-30
39
SQL
update document
yuki-kimoto authored on 2009-11-19
40

            
version 0.0901
yuki-kimoto authored on 2009-12-17
41
    $query = $query->sql($sql);
42
    $sql   = $query->sql;
packaging one directory
yuki-kimoto authored on 2009-11-16
43

            
rename bind_filter to query_...
yuki-kimoto authored on 2010-04-28
44
=head2 query_filter
packaging one directory
yuki-kimoto authored on 2009-11-16
45

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

            
rename bind_filter to query_...
yuki-kimoto authored on 2010-04-28
48
    $query       = $query->query_filter($query_filter);
49
    $query_filter = $query->query_filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
50

            
51
=head2 fetch_filter
52

            
update document
yuki-kimoto authored on 2010-01-30
53
Filter excuted when data is fetched
update document
yuki-kimoto authored on 2009-11-19
54

            
version 0.0901
yuki-kimoto authored on 2009-12-17
55
    $query        = $query->fetch_filter($fetch_filter);
56
    $fetch_filter = $query->fetch_filter;
packaging one directory
yuki-kimoto authored on 2009-11-16
57

            
58
=head2 key_infos
59

            
update document
yuki-kimoto authored on 2010-01-30
60
Key informations
update document
yuki-kimoto authored on 2009-11-19
61

            
version 0.0901
yuki-kimoto authored on 2009-12-17
62
    $query     = $query->key_infos($key_infos);
63
    $key_infos = $query->key_infos;
packaging one directory
yuki-kimoto authored on 2009-11-16
64

            
update document
yuki-kimoto authored on 2010-01-30
65
=head1 METHODS
66

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

            
70
=head2 new
71

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

            
74
=cut