[Dbix-class] PATCH: Support for arbitrary SQL in relationship definition

Daniel Ruoso daniel at ruoso.com
Fri Jun 12 13:16:46 GMT 2009


Em Qui, 2009-06-11 às 13:10 +0200, Peter Rabbitson escreveu:
> It would be much better to introduce real arbitrary support via SQLA
> where condition parsing. Only real problem is that a hashref is already
> resrved for foreign./self. pairs, and what's even worse - it recently
> started taking single unqualified column names too.
> My vote would be to add an additional key to this hash, something like
> -extra_cond => $arbitrary_sqla_where_structure. Or we could put the
> join cond in the join attributes.

I'm not that all against it, but...

> In any case - just allowing scalar refs is really weak and incomplete.
> We already have all the code to parse arbitrarily complex conditions.
> All we need is a consensus on how to do it.

Using scalar ref to allow arbitrary SQL is consistent with SQLA, since
you can use it in regular SQLA where data structures, so I think it's
not really weak or incomplete...

daniel




More information about the DBIx-Class mailing list