[Dbix-class] search NOT IN

Stuart Dodds stuart at doddsweb.co.uk
Mon Jul 6 14:26:27 GMT 2009


Is it possible to do a search on a field where it is not equal to a list
of values.

For example, the sql I would like to produce is as follows:

WHERE id NOT IN (?,?,?)

however doing:

->search({
  id => { '!=', \@id_list }
});

doesn't do the right thing as you get:

WHERE id != ? OR id != ? OR id != ?

the only other way I can think is to do a search_literal with some
string concatenation.

Any help would be great,

Stuart.






More information about the DBIx-Class mailing list