[Dbix-class] ANNOUNCE: SQL::Abstract 1.59 (was: Writing a query
with a BETWEEN in the WHERE clause and the to_date(function))
Peter Rabbitson
rabbit+dbic at rabbit.us
Tue Sep 22 08:44:52 GMT 2009
Will Hawes wrote:
>
> Ah - I had expected the following to work, but it doesn't:
>
> my $where = {
> datetime => {
> "between",
> [
> \[ "to_date(?, 'YYYYMMDD HH24:MM:SS')", "$start 00:00:00" ],
> \[ "to_date(?, 'YYYYMMDD HH24:MM:SS')", "$end 00:00:00" ]
> ]
> }
> };
>
> It seems that while a reference to an arrayref can be used with
> "between", elements within said arrayref are currently limited to
> either scalars or references to scalars. Maybe a candidate for a
> patch?
>
SQL::Abstract 1.59 just released on CPAN should nicely support all
combinations of the above.
Cheers
More information about the DBIx-Class
mailing list