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;
# 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 {