Showing 3 changed files with 1 additions and 39 deletions
+1
Changes
... ...
@@ -1,4 +1,5 @@
1 1
 0.1722
2
+    - removed EXPERIMENTAL wrap option from select method
2 3
     - insert_param, update_param, and assign param can
3 4
       be wrapeed by DB function by C<wrap> option
4 5
     - added EXPERIMENTAL pass attribute to DBIx::Custom::Mapper
-17
lib/DBIx/Custom.pm
... ...
@@ -902,7 +902,6 @@ sub select {
902 902
     warn "select() param option is DEPRECATED!"
903 903
       if keys %$param;
904 904
     my $where_param = delete $args{where_param} || $param || {};
905
-    my $wrap = delete $args{wrap};
906 905
     my $id = delete $args{id};
907 906
     my $primary_key = delete $args{primary_key};
908 907
     croak "update method primary_key option " .
... ...
@@ -997,14 +996,6 @@ sub select {
997 996
     # Append
998 997
     push @sql, $append if defined $append;
999 998
     
1000
-    # Wrap
1001
-    if ($wrap) {
1002
-        croak "wrap option must be array refrence " . _subname
1003
-          unless ref $wrap eq 'ARRAY';
1004
-        unshift @sql, $wrap->[0];
1005
-        push @sql, $wrap->[1];
1006
-    }
1007
-    
1008 999
     # SQL
1009 1000
     my $sql = join (' ', @sql);
1010 1001
     
... ...
@@ -3294,14 +3285,6 @@ Same as C<execute> method's C<type_rule2_off> option.
3294 3285
 
3295 3286
 Where clause.
3296 3287
     
3297
-=item C<wrap> EXPERIMENTAL
3298
-
3299
-Wrap statement. This is array reference.
3300
-
3301
-    wrap => ['select * from (', ') as t where ROWNUM < 10']
3302
-
3303
-This option is for Oracle and SQL Server paging process.
3304
-
3305 3288
 =back
3306 3289
 
3307 3290
 =head2 C<update>
-22
t/common.t
... ...
@@ -3178,28 +3178,6 @@ $source = "a {= {}";
3178 3178
 eval{$builder->build_query($source)};
3179 3179
 like($@, qr/unexpected "{"/, "error : 2");
3180 3180
 
3181
-test 'select() wrap option';
3182
-$dbi = DBIx::Custom->connect;
3183
-eval { $dbi->execute("drop table $table1") };
3184
-$dbi->execute($create_table1);
3185
-$dbi->insert(table => $table1, param => {$key1 => 1, $key2 => 2});
3186
-$dbi->insert(table => $table1, param => {$key1 => 2, $key2 => 3});
3187
-$rows = $dbi->select(
3188
-    table => $table1,
3189
-    column => $key1,
3190
-    wrap => ["select * from (", ") t where $key1 = 1"]
3191
-)->all;
3192
-is_deeply($rows, [{$key1 => 1}]);
3193
-
3194
-eval {
3195
-$dbi->select(
3196
-    table => $table1,
3197
-    column => $key1,
3198
-    wrap => 'select * from ('
3199
-)
3200
-};
3201
-like($@, qr/array/);
3202
-
3203 3181
 test 'select() sqlfilter option';
3204 3182
 $dbi = DBIx::Custom->connect;
3205 3183
 $dbi->user_table_info($user_table_info);