[database-devel] Esquleto : 'ORDER BY random()'?

Felipe Almeida Lessa felipe.lessa at gmail.com
Fri Jul 12 18:27:17 CEST 2013


I've add a unit test that works with the SQLite used on the test suite
[1].  So I think that you may need an explicit type sig:

    orderBy [asc (random_ :: SqlExpr (Value Double))]

Does that solve your problem?

[1] https://github.com/meteficha/esqueleto/commit/5545adc077947ec48f9d4261596cd75add24b546

On Fri, Jul 12, 2013 at 9:25 AM, Erik de Castro Lopo
<mle+hs at mega-nerd.com> wrote:
> Felipe Almeida Lessa wrote:
>
>> I'm on my phone and didn't test it, but can't you use
>>
>>     orderBy [asc random_]
>>
>> ? On your SQL the ASC is implicit.
>
> Not quite! Too tired to chase this now. Time for bed :-).
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> _______________________________________________
> database-devel mailing list
> database-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/database-devel



-- 
Felipe.



More information about the database-devel mailing list