SQL-Abstract - Re: SQL functions in WHERE clause

Posted on Fri Apr 15 12:25:10 2005 by zby in response to 321 (See the whole thread of 2)
Re: SQL functions in WHERE clause
Here is a patch against the version:
$Id: Abstract.pm,v 1.17 2004/08/25 20:11:27 nwiger Exp $
diff Abstract.pm Abstract.pm.orig 577,582c577 < if ($k eq 'clause'){ < use Data::Dumper; < print Dumper($v); < push @sqlf, $v->{clause}; < push @sqlv, @{$v->{binds}}; < }elsif (! defined($v)) { --- > if (! defined($v)) {
It allowes to do
my $sqlparams; $sqlparams->{clause} = { clause => 'name @@ ?', binds => [1]}; my($where, @bind) = $sql->where($sqlparams, ['name'], 10, 10);
But it takes the 'clause' key as special.
Write a response