Almost exactly as you wrote it:
$rs = $rs->search_rs({ a => { -not_like => '%pattern%' }});
Am 2012-01-20 11:26, schrieb Johannes Kilian:
Hi,
I'm learning to use DBIC correctly, but cannot figure out how to do the
following: I've got a resultset from a previous search. Now I want to make
further refinements on this resultset, doing something like this:
"Take current resultset and remove all items, whose attribute "A" does not fit a
given pattern (best: given by RegEx or SQL-LIKE Expression)"
Pseudocode:
my $newRS = $RS->search('A' => {not => {'.*pattern.*'}});
Remarks:
* It has to be a pattern (either RegEx or SQL LIKE-Expression)
* It's not possible to define the "negative" pattern ("SELECT ALL WHERE "A"
LIKE INVPattern ... is not possible ...)
Any idea how to do this?
Tia
Jo
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be
privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]