EXPERIMENTAL type_rule_off is not passed form execute...
...method
... | ... |
@@ -1,4 +1,9 @@ |
1 |
+0.1692 |
|
2 |
+ - EXPERIMENTAL type_rule_off is not passed form execute method |
|
3 |
+ to DBIx::Custom::Result object |
|
1 | 4 |
0.1691 |
5 |
+ - DBIx::Custom::Result end_filter, remove_filter, remove_end_filter is DEPRECATED! |
|
6 |
+ - apply_filter is DEPRECATED! |
|
2 | 7 |
- EXPERIMETAL column method and table_alias think about "-" separator |
3 | 8 |
- EXPERIMTANL column method think about separator |
4 | 9 |
- removed EXPERIMENTAL col method. |
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
package DBIx::Custom; |
2 | 2 |
|
3 |
-our $VERSION = '0.1690'; |
|
3 |
+our $VERSION = '0.1691'; |
|
4 | 4 |
use 5.008001; |
5 | 5 |
|
6 | 6 |
use Object::Simple -base; |
... | ... |
@@ -522,7 +522,6 @@ sub execute { |
522 | 522 |
filter => $filter->{in} || {}, |
523 | 523 |
end_filter => $filter->{end} || {}, |
524 | 524 |
type_rule => $self->type_rule, |
525 |
- type_rule_off => $type_rule_off |
|
526 | 525 |
); |
527 | 526 |
|
528 | 527 |
return $result; |
... | ... |
@@ -1908,49 +1907,6 @@ and implements the following new ones. |
1908 | 1907 |
|
1909 | 1908 |
Get available data type. |
1910 | 1909 |
|
1911 |
-=head2 C<apply_filter> DEPRECATED! |
|
1912 |
- |
|
1913 |
- $dbi->apply_filter( |
|
1914 |
- 'book', |
|
1915 |
- 'issue_date' => { |
|
1916 |
- out => 'tp_to_date', |
|
1917 |
- in => 'date_to_tp', |
|
1918 |
- end => 'tp_to_displaydate' |
|
1919 |
- }, |
|
1920 |
- 'write_date' => { |
|
1921 |
- out => 'tp_to_date', |
|
1922 |
- in => 'date_to_tp', |
|
1923 |
- end => 'tp_to_displaydate' |
|
1924 |
- } |
|
1925 |
- ); |
|
1926 |
- |
|
1927 |
-Apply filter to columns. |
|
1928 |
-C<out> filter is executed before data is send to database. |
|
1929 |
-C<in> filter is executed after a row is fetch. |
|
1930 |
-C<end> filter is execute after C<in> filter is executed. |
|
1931 |
- |
|
1932 |
-Filter is applied to the follwoing tree column name pattern. |
|
1933 |
- |
|
1934 |
- PETTERN EXAMPLE |
|
1935 |
- 1. Column : author |
|
1936 |
- 2. Table.Column : book.author |
|
1937 |
- 3. Table__Column : book__author |
|
1938 |
- 4. Table-Column : book-author |
|
1939 |
- |
|
1940 |
-If column name is duplicate with other table, |
|
1941 |
-Main filter specified by C<table> option is used. |
|
1942 |
- |
|
1943 |
-You can set multiple filters at once. |
|
1944 |
- |
|
1945 |
- $dbi->apply_filter( |
|
1946 |
- 'book', |
|
1947 |
- [qw/issue_date write_date/] => { |
|
1948 |
- out => 'tp_to_date', |
|
1949 |
- in => 'date_to_tp', |
|
1950 |
- end => 'tp_to_displaydate' |
|
1951 |
- } |
|
1952 |
- ); |
|
1953 |
- |
|
1954 | 1910 |
=head2 C<assign_param> EXPERIMENTAL |
1955 | 1911 |
|
1956 | 1912 |
my $assign_param = $dbi->assign_param({title => 'a', age => 2}); |
... | ... |
@@ -2887,6 +2843,49 @@ Column names is |
2887 | 2843 |
|
2888 | 2844 |
['title', 'author'] |
2889 | 2845 |
|
2846 |
+=head2 C<apply_filter> DEPRECATED! |
|
2847 |
+ |
|
2848 |
+ $dbi->apply_filter( |
|
2849 |
+ 'book', |
|
2850 |
+ 'issue_date' => { |
|
2851 |
+ out => 'tp_to_date', |
|
2852 |
+ in => 'date_to_tp', |
|
2853 |
+ end => 'tp_to_displaydate' |
|
2854 |
+ }, |
|
2855 |
+ 'write_date' => { |
|
2856 |
+ out => 'tp_to_date', |
|
2857 |
+ in => 'date_to_tp', |
|
2858 |
+ end => 'tp_to_displaydate' |
|
2859 |
+ } |
|
2860 |
+ ); |
|
2861 |
+ |
|
2862 |
+Apply filter to columns. |
|
2863 |
+C<out> filter is executed before data is send to database. |
|
2864 |
+C<in> filter is executed after a row is fetch. |
|
2865 |
+C<end> filter is execute after C<in> filter is executed. |
|
2866 |
+ |
|
2867 |
+Filter is applied to the follwoing tree column name pattern. |
|
2868 |
+ |
|
2869 |
+ PETTERN EXAMPLE |
|
2870 |
+ 1. Column : author |
|
2871 |
+ 2. Table.Column : book.author |
|
2872 |
+ 3. Table__Column : book__author |
|
2873 |
+ 4. Table-Column : book-author |
|
2874 |
+ |
|
2875 |
+If column name is duplicate with other table, |
|
2876 |
+Main filter specified by C<table> option is used. |
|
2877 |
+ |
|
2878 |
+You can set multiple filters at once. |
|
2879 |
+ |
|
2880 |
+ $dbi->apply_filter( |
|
2881 |
+ 'book', |
|
2882 |
+ [qw/issue_date write_date/] => { |
|
2883 |
+ out => 'tp_to_date', |
|
2884 |
+ in => 'date_to_tp', |
|
2885 |
+ end => 'tp_to_displaydate' |
|
2886 |
+ } |
|
2887 |
+ ); |
|
2888 |
+ |
|
2890 | 2889 |
=head1 Parameter |
2891 | 2890 |
|
2892 | 2891 |
Parameter start at ':'. This is replaced to place holoder |
... | ... |
@@ -420,17 +420,6 @@ and implements the following new ones. |
420 | 420 |
|
421 | 421 |
This is alias for C<fetch_hash_all>. |
422 | 422 |
|
423 |
-=head2 C<end_filter> |
|
424 |
- |
|
425 |
- $result = $result->end_filter(title => 'to_something', |
|
426 |
- author => 'to_something'); |
|
427 |
- |
|
428 |
- $result = $result->end_filter([qw/title author/] => 'to_something'); |
|
429 |
- |
|
430 |
-End filters. |
|
431 |
-These each filters is executed after the filters applied by C<apply_filter> of |
|
432 |
-L<DBIx::Custom> or C<filter> method. |
|
433 |
- |
|
434 | 423 |
=head2 C<fetch> |
435 | 424 |
|
436 | 425 |
my $row = $result->fetch; |
... | ... |
@@ -498,12 +487,6 @@ L<DBIx::Custom>. |
498 | 487 |
|
499 | 488 |
This is alias for C<fetch_hash_first>. |
500 | 489 |
|
501 |
-=head2 C<remove_end_filter> DEPRECATED! |
|
502 |
- |
|
503 |
- $result->remove_end_filter; |
|
504 |
- |
|
505 |
-Remove end filter. |
|
506 |
- |
|
507 | 490 |
=head2 C<remove_filter> |
508 | 491 |
|
509 | 492 |
$result->remove_filter; |
... | ... |
@@ -518,4 +501,21 @@ Remove filter. End filter is not removed. |
518 | 501 |
|
519 | 502 |
Stash is hash reference to save your data. |
520 | 503 |
|
504 |
+=head2 C<remove_end_filter> DEPRECATED! |
|
505 |
+ |
|
506 |
+ $result->remove_end_filter; |
|
507 |
+ |
|
508 |
+Remove end filter. |
|
509 |
+ |
|
510 |
+=head2 C<end_filter> DEPRECATED! |
|
511 |
+ |
|
512 |
+ $result = $result->end_filter(title => 'to_something', |
|
513 |
+ author => 'to_something'); |
|
514 |
+ |
|
515 |
+ $result = $result->end_filter([qw/title author/] => 'to_something'); |
|
516 |
+ |
|
517 |
+End filters. |
|
518 |
+These each filters is executed after the filters applied by C<apply_filter> of |
|
519 |
+L<DBIx::Custom> or C<filter> method. |
|
520 |
+ |
|
521 | 521 |
=cut |
... | ... |
@@ -6,7 +6,7 @@ use utf8; |
6 | 6 |
use Encode qw/encode_utf8 decode_utf8/; |
7 | 7 |
use Data::Dumper; |
8 | 8 |
|
9 |
-#$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DEPRECATED/}; |
|
9 |
+$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DEPRECATED/}; |
|
10 | 10 |
|
11 | 11 |
BEGIN { |
12 | 12 |
eval { require DBD::SQLite; 1 } |
... | ... |
@@ -2704,7 +2704,7 @@ $dbi->type_rule( |
2704 | 2704 |
); |
2705 | 2705 |
$dbi->insert({key1 => 2}, table => 'table1', type_rule_off => 1); |
2706 | 2706 |
$result = $dbi->select(table => 'table1', type_rule_off => 1); |
2707 |
-is($result->fetch->[0], 2); |
|
2707 |
+is($result->fetch->[0], 4); |
|
2708 | 2708 |
|
2709 | 2709 |
$dbi = DBIx::Custom->connect(dsn => 'dbi:SQLite:dbname=:memory:'); |
2710 | 2710 |
$dbi->execute("create table table1 (key1 Date, key2 datetime)"); |