[Jifty-commit] r6473 - Jifty-DBI/branches/tisql/lib/Jifty/DBI
Jifty commits
jifty-commit at lists.jifty.org
Thu Feb 26 10:07:23 EST 2009
Author: ruz
Date: Thu Feb 26 10:07:23 2009
New Revision: 6473
Modified:
Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm
Log:
* don't use IN if it's only one value there
Modified: Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm
==============================================================================
--- Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm (original)
+++ Jifty-DBI/branches/tisql/lib/Jifty/DBI/Tisql.pm Thu Feb 26 10:07:23 2009
@@ -308,7 +308,6 @@
my @chain = @{ $meta->{'chain'} };
pop @chain unless $args{'resolve_last'};
-
my @aliases = ();
while ( my $joint = shift @chain ) {
my $linear = $self->linearize_join( $last{'item'}, $joint->{'name'} );
@@ -346,7 +345,8 @@
my $phs = $joint->{'placeholders'}[ $1 - 1 ];
return unless defined $phs;
if ( ref $phs ) {
- $limit{'value'} = [ map $parser->dq($_), @{ $phs } ],
+ $limit{'value'} = [ map $parser->dq($_), @{ $phs } ];
+ $limit{'value'} = $limit{'value'}->[0] if @{ $limit{'value'} } == 1;
}
elsif ( $phs eq '?' ) {
die "Not enough binding values provided for the query"
More information about the Jifty-commit
mailing list