X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract.pm;h=4d2e49f91d157e12b967e76e354bc3fa28aa034b;hb=88a899390925fcded12aedf9efab3c545db860bd;hp=fcded1d7891b8fedfa94b232fe360ca647834043;hpb=0336eddbbdeb91d1cba48182e6877c9f33da138a;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index fcded1d..4d2e49f 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -34,9 +34,8 @@ my @BUILTIN_UNARY_OPS = ( # the digits are backcompat stuff { regex => qr/^and (?: \s? \d+ )? $/xi, handler => '_where_op_ANDOR' }, { regex => qr/^or (?: \s? \d+ )? $/xi, handler => '_where_op_ANDOR' }, - { regex => qr/^ (?: not \s )? bool $/xi, handler => '_where_op_BOOL' }, - { regex => qr/^ ident $/xi, handler => '_where_op_IDENT' }, { regex => qr/^nest (?: \s? \d+ )? $/xi, handler => '_where_op_NEST' }, + { regex => qr/^ (?: not \s )? bool $/xi, handler => '_where_op_BOOL' }, ); #====================================================================== @@ -532,16 +531,6 @@ sub _where_func_generic { return ($sql, @bind); } -sub _where_op_IDENT { - my ($self, $op, $v) = @_; - - if (ref $v) { - puke "-$op takes a single scalar argument (a quotable identifier)"; - } - - return $self->_convert($self->_quote($v)); -} - sub _where_op_ANDOR { my ($self, $op, $v) = @_; @@ -959,12 +948,14 @@ sub _where_field_IN { push @all_bind, @bind; } - my $sql = sprintf ('%s %s ( %s )', - $label, - $op, - join (', ', @all_sql) + return ( + sprintf ('%s %s ( %s )', + $label, + $op, + join (', ', @all_sql) + ), + $self->_bindtype($k, @all_bind), ); - return ($sql, @all_bind); } else { # empty list : some databases won't understand "IN ()", so DWIM my $sql = ($op =~ /\bnot\b/i) ? $self->{sqltrue} : $self->{sqlfalse};