Showing 4 changed files with 12 additions and 7 deletions
+5 -2
Changes
... ...
@@ -1,12 +1,15 @@
1
+0.1686
2
+    - 
1 3
 0.1685
2 4
     - insert_at, update_at, delete_at, select_at is DEPRECATED!
3 5
       use insert, update, delete, select method and id option.
4
-    - insert, insert_at, update, update_at can receive odd number arguments,      first one is parameter.
6
+    - insert, insert_at, update, update_at can receive odd number arguments,
7
+      first one is parameter.
5 8
 0.1684
6 9
     - added DBIx::Custom::Result all method, this is alias for fetch_hash_all
7 10
     - added DBIx::Custom::Result one method, this is alias for fetch_hash_first
8 11
     - DBIx::Custom::Result fetch_hash_first can recieve argument
9
-    - select() column option can receive hash reference
12
+    - select() column option can receive hash reference. This is EXPERIMENTAL
10 13
     - update_param_tag is DEPRECATED! use update_param instead.
11 14
     - insert_param_tag is DEPRECATED! use insert_param instead.
12 15
     - assing_param_tag is DEPRECATED! use assign_param instead.
+4 -4
lib/DBIx/Custom.pm
... ...
@@ -773,7 +773,7 @@ sub new {
773 773
     }
774 774
     
775 775
     # Register tag
776
-    $self->register_tag(
776
+    $self->query_builder->{tags} = {
777 777
         '?'     => \&DBIx::Custom::Tag::placeholder,
778 778
         '='     => \&DBIx::Custom::Tag::equal,
779 779
         '<>'    => \&DBIx::Custom::Tag::not_equal,
... ...
@@ -785,7 +785,7 @@ sub new {
785 785
         'in'    => \&DBIx::Custom::Tag::in,
786 786
         'insert_param' => \&DBIx::Custom::Tag::insert_param,
787 787
         'update_param' => \&DBIx::Custom::Tag::update_param
788
-    );
788
+    };
789 789
     
790 790
     return $self;
791 791
 }
... ...
@@ -2339,9 +2339,9 @@ Default is '*' if C<column> is not specified.
2339 2339
     # Default
2340 2340
     $dbi->select(column => '*');
2341 2341
 
2342
-You can specify hash reference.
2342
+You can specify hash reference. This is EXPERIMENTAL.
2343 2343
 
2344
-    # Hash reference
2344
+    # Hash reference EXPERIMENTAL
2345 2345
     $dbi->select(column => [
2346 2346
         {book => [qw/author title/]},
2347 2347
         {person => [qw/name age/]}
+2 -1
t/dbix-custom-core-sqlite.t
... ...
@@ -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 }
... ...
@@ -110,6 +110,7 @@ test 'Insert query return value';
110 110
 $dbi->execute($DROP_TABLE->{0});
111 111
 $dbi->execute($CREATE_TABLE->{0});
112 112
 $source = "insert into table1 {insert_param key1 key2}";
113
+$DB::single = 1;
113 114
 $query = $dbi->create_query($source);
114 115
 $ret_val = $dbi->execute($query, param => {key1 => 1, key2 => 2});
115 116
 ok($ret_val);
+1
t/dbix-custom-core.t
... ...
@@ -28,6 +28,7 @@ $dbi = DBIx::Custom->new(
28 28
     result_class => 'g',
29 29
     query_builder => $query_builder,
30 30
 );
31
+delete $dbi->{tags};
31 32
 is_deeply($dbi,{user => 'a', password => 'b', dsn => 'c', 
32 33
                 filters => {f => 3}, default_bind_filter => 'f',
33 34
                 default_fetch_filter => 'g', result_class => 'g',