[Dbix-class] Re: Support for inline where (left join with extra condition)

brew brewsterbear at gmail.com
Thu Mar 14 00:13:17 GMT 2013


Yes that is a good improvement, thanks.

For my case I would need the year to be a bind variable which doesn't 
look like it is possible, so I will use two queries or subselect.

Thanks


On 13/03/13 22:38, Dagfinn Ilmari Mannsåker wrote:
> brew <brewsterbear at gmail.com> writes:
>
>> Hi,
>>
>> Anyone know of native support queries like:
>>
>> SELECT * FROM artist a LEFT JOIN cd c *ON a.name = c.artist AND c.year =
>> 2000*
>>
>> Note the complex on clause.
> Yes, this is now supported by custom join conditions, which give you the
> full power of SQLA to build your ON clause. See the bit about "custom
> join condition coderef syntax" in:
>
> https://metacpan.org/module/DBIx::Class::Relationship::Base#condition
>




More information about the DBIx-Class mailing list