[Bast-commits] r6672 - in DBIx-Class/0.08/trunk/lib/DBIx/Class: .
Storage
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Jun 14 09:33:22 GMT 2009
Author: ribasushi
Date: 2009-06-14 09:33:22 +0000 (Sun, 14 Jun 2009)
New Revision: 6672
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
Forgotten piece of as_query refactor
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-06-14 09:09:25 UTC (rev 6671)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-06-14 09:33:22 UTC (rev 6672)
@@ -1930,7 +1930,13 @@
my $attrs = $self->_resolved_attrs_copy;
- my ($sqlbind, $bind_attrs) = $self->result_source->storage
+ # For future use:
+ #
+ # in list ctx:
+ # my ($sql, \@bind, \%dbi_bind_attrs) = _select_args_to_query (...)
+ # $sql also has no wrapping parenthesis in list ctx
+ #
+ my $sqlbind = $self->result_source->storage
->_select_args_to_query ($attrs->{from}, $attrs->{select}, $attrs->{where}, $attrs);
return $sqlbind;
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-06-14 09:09:25 UTC (rev 6671)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2009-06-14 09:33:22 UTC (rev 6672)
@@ -1217,8 +1217,12 @@
# my ($sql, $prepared_bind) = $self->_prep_for_execute($op, $bind, $ident, [ $select, $cond, $order, $rows, $offset ]);
my ($sql, $prepared_bind) = $self->_prep_for_execute($op, $bind, $ident, \@args);
+ $prepared_bind ||= [];
- return \[ "($sql)", @{ $prepared_bind || [] }];
+ return wantarray
+ ? ($sql, $prepared_bind, $bind_attrs)
+ : \[ "($sql)", @$prepared_bind ]
+ ;
}
sub _select_args {
More information about the Bast-commits
mailing list