in reply to Re^2: dbix::class find() question
in thread dbix::class find() question

Sort of. The queries are different but what they return should be the same.

# based on the usual DBIC example tables my @ids = (1..4); my $rs = $schema->resultset('Cd') ->search({ cd_id => \@ids }); warn "query: ", ${$rs->as_query()}->[0], "\n"; $rs = $schema->resultset('Cd') ->search({ cd_id => { in => \@ids } }); warn "query: ", ${$rs->as_query()}->[0], "\n"; __END__ query: (SELECT me.cdid, me.artistid, me.title, me.year FROM cd me WHER +E ( ( cd_id = ? OR cd_id = ? OR cd_id = ? OR cd_id = ? ) )) query: (SELECT me.cdid, me.artistid, me.title, me.year FROM cd me WHER +E ( cd_id IN ( ?, ?, ?, ? ) ))

Replies are listed 'Best First'.
Re^4: dbix::class find() question
by Your Mother (Archbishop) on Jan 18, 2016 at 21:41 UTC

    Very nice++.