[Bast-commits] r5144 - in SQL-Abstract/1.x/branches/1.50_RC: .
lib/SQL/Abstract
norbi at dev.catalyst.perl.org
norbi at dev.catalyst.perl.org
Sun Nov 16 21:20:44 GMT 2008
Author: norbi
Date: 2008-11-16 21:20:44 +0000 (Sun, 16 Nov 2008)
New Revision: 5144
Modified:
SQL-Abstract/1.x/branches/1.50_RC/
SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract/Test.pm
Log:
r5169 at vger: mendel | 2008-11-16 21:20:46 +0100
* Made stringify_bind() work with 'bindtype' set to 'columns' and 'array_datatypes' set to true.
Property changes on: SQL-Abstract/1.x/branches/1.50_RC
___________________________________________________________________
Name: svk:merge
- 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5114
+ 4d5fae46-8e6a-4e08-abee-817e9fb894a2:/local/bast/SQL-Abstract/1.x/branches/1.50_RC:5169
Modified: SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract/Test.pm
===================================================================
--- SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract/Test.pm 2008-11-16 19:17:17 UTC (rev 5143)
+++ SQL-Abstract/1.x/branches/1.50_RC/lib/SQL/Abstract/Test.pm 2008-11-16 21:20:44 UTC (rev 5144)
@@ -52,8 +52,17 @@
# some bind values can be arrayrefs (see L<SQL::Abstract/bindtype>),
# so stringify them.
- my @strings = map {ref $_ eq 'ARRAY' ? join('=>', @$_) : ($_ || '')}
- @$bind_ref;
+ # furthermore, if L<SQL::Abstract/array_datatypes> is set to true, elements
+ # of those arrayrefs can be arrayrefs, too.
+ my @strings = map {
+ ref $_ eq 'ARRAY'
+ ? join('=>', map {
+ ref $_ eq 'ARRAY'
+ ? ('[' . join('=>', @$_) . ']')
+ : (defined $_ ? $_ : '')
+ } @$_)
+ : (defined $_ ? $_ : '')
+ } @$bind_ref;
# join all values into a single string
return join "///", @strings;
More information about the Bast-commits
mailing list