[Dbix-class] match against ...
Will Crawford
billcrawford1970 at gmail.com
Thu Apr 3 09:55:44 GMT 2014
On 2 April 2014 10:47, RAPPAZ Francois <francois.rappaz at unifr.ch> wrote:
> I'm struggling with code as
...
> my ($where, @bind)= $sqlmaker->where("ti, ex, ad", "tri", $bla);
> $self->{log}->debug($where);
> my $rs = $self->{schema}->resultset('Jrn')->search_rs(undef, {where=> $where});
Couple of things that might help:
· you don't seem to be passing anything into $sqlmaker->where(...)
that would match the regex you provided for special_ops (so how would
it know to create your "match ... against" sql)
· you'll probably need to pass the SQL into DBIC as { where => \[
$sql, @binds ] }
This may or may not be enough. A (much simpler) example that works for me is:
my $user = $rs->search( undef, { where => \[ 'id = ?', [ id =>
52521 ] ] } )->first;
More information about the DBIx-Class
mailing list