On Wednesday, October 30, 2019 at 3:37:04 AM UTC-7, Adam Aiken wrote:
>
> I have just found that function `order` in dataset class supports array 
> that is not always working.
>
> Sequel[:users].order([
>     Sequel[:users][:id]
>   ]).all # OK
> # SQL: SELECT * FROM users ORDER BY (id)
>
> Sequel[:users].order([
>     Sequel.desc(Sequel[:users][:id])
>   ]).all # Not Working
> # SQL: SELECT * FROM users ORDER BY (id DESC)
>
> Is that an intentional design?
>

You are not supposed to pass an array of arguments to `order`, you are 
supposed to pass separate arguments.  The fact that it generates valid SQL 
with some arrays is not by design, simply due to implementation details.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/0ad03683-e4b8-406d-9070-0df28c6c34e0%40googlegroups.com.

Reply via email to