[Dbix-class] Re: NULLS FIRST
Bill Moseley
moseley at hank.org
Sun Aug 25 00:33:58 GMT 2013
On Sat, Aug 24, 2013 at 6:50 AM, Dagfinn Ilmari Manns=E5ker <ilmari at ilmari.=
org
> wrote:
> Bill Moseley <moseley at hank.org> writes:
>
> > I have some code that builds up hash references of sort keys.
> >
> > order_by =3D> [
> > { -desc =3D> 'value' },
> > { -asc =3D> 'modified_time' },
> > ],
> >
> >
> > Is there support for NULLS { FIRST | LAST } with that syntax?
>
> There isn't currently. There's rudimentary support in git branches of
> SQL::Abstract=B9 and DBIx::Class=B2, but because several of the limit dia=
lects
> require mangling the ordering clause of the original query, this can't
> really be done sensibly until the porting to Data::Query is done.
>
What I ended up doing was use a scalar reference. For example:
order_by =3D> [
{ -desc =3D> 'foo' },
\'bar DESC NULLS FIRST',
],
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130824/0ec=
7a3de/attachment.htm
More information about the DBIx-Class
mailing list