Showing 3 changed files with 10 additions and 42 deletions
+2
Changes
... ...
@@ -1,3 +1,5 @@
1
+0.1748
2
+    - DBIx::Custom::Query is DEPRECATED!
1 3
 0.1747
2 4
     - fixed bug DBIx::Custom::Result fetch_hash_multi throw warnings
3 5
       which cannnot fetch any more
+7 -6
lib/DBIx/Custom.pm
... ...
@@ -431,7 +431,7 @@ sub execute {
431 431
           unless $opt{primary_key};
432 432
         $opt{primary_key} = [$opt{primary_key}] unless ref $opt{primary_key};
433 433
         $opt{id} = [$opt{id}] unless ref $opt{id};
434
-        for (my $i = 0; $i < @{$opt{primary_key}}; $i++) {
434
+        for (my $i = 0; $i < @{$opt{id}}; $i++) {
435 435
            my $key = $opt{primary_key}->[$i];
436 436
            $key = "$main_table.$key" if $statement eq 'update' ||
437 437
              $statement eq 'delete' || $statement eq 'select';
... ...
@@ -2619,12 +2619,11 @@ and before type rule filter is executed.
2619 2619
 
2620 2620
     query => 1
2621 2621
 
2622
-C<execute> method return L<DBIx::Custom::Query> object, not executing SQL.
2623
-You can check SQL, column, or get statment handle.
2622
+C<execute> method return hash reference which contain SQL and column
2623
+infromation
2624 2624
 
2625
-    my $sql = $query->sql;
2626
-    my $sth = $query->sth;
2627
-    my $columns = $query->columns;
2625
+    my $sql = $query->{sql};
2626
+    my $columns = $query->{columns};
2628 2627
     
2629 2628
 =item C<reuse>
2630 2629
     
... ...
@@ -3478,6 +3477,8 @@ L<DBIx::Custom::Model>
3478 3477
     type # will be removed at 2017/1/1
3479 3478
 
3480 3479
 L<DBIx::Custom::Query>
3480
+
3481
+This module is DEPRECATED! # will be removed at 2017/1/1
3481 3482
     
3482 3483
     # Attribute methods
3483 3484
     default_filter # will be removed at 2017/1/1
+1 -36
lib/DBIx/Custom/Query.pm
... ...
@@ -77,40 +77,5 @@ sub filter {
77 77
 
78 78
 =head1 NAME
79 79
 
80
-DBIx::Custom::Query - Query
80
+DBIx::Custom::Query - DEPRECATED!
81 81
 
82
-=head1 SYNOPSIS
83
-    
84
-    my $query = DBIx::Custom::Query->new;
85
-    my $sth = $query->sth;
86
-    my $sql = $query->sql;
87
-    my $columns = $query->columns;
88
-    
89
-=head1 ATTRIBUTES
90
-
91
-=head2 C<columns>
92
-
93
-    my $columns = $query->columns;
94
-    $query      = $query->columns(['auhtor', 'title']);
95
-
96
-Column names.
97
-
98
-=head2 C<sql>
99
-
100
-    my $sql = $query->sql;
101
-    $query  = $query->sql('select * from books where author = ?;');
102
-
103
-SQL statement.
104
-
105
-=head2 C<sth>
106
-
107
-    my $sth = $query->sth;
108
-    $query  = $query->sth($sth);
109
-
110
-Statement handle of L<DBI>
111
-
112
-=head1 METHODS
113
-
114
-L<DBIx::Custom::Query> inherits all methods from L<Object::Simple>.
115
-
116
-=cut