From: Alexander Hartmaier Date: Tue, 22 Feb 2011 09:11:04 +0000 (+0100) Subject: use -in SQL::Abstract operator instead of literal 'IN' in cookbook X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ffaf39449a196bd9867177134e65399a9e2f6aac;p=dbsrgits%2FDBIx-Class-Historic.git use -in SQL::Abstract operator instead of literal 'IN' in cookbook --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 0d0eebd..d8d5304 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -326,10 +326,10 @@ You can write subqueries relatively easily in DBIC. }); my $rs = $schema->resultset('CD')->search({ - artist_id => { 'IN' => $inside_rs->get_column('id')->as_query }, + artist_id => { -in => $inside_rs->get_column('id')->as_query }, }); -The usual operators ( =, !=, IN, NOT IN, etc.) are supported. +The usual operators ( '=', '!=', -in, -not_in, etc.) are supported. B: You have to explicitly use '=' when doing an equality comparison. The following will B work: