Feature: Custom SQL Functions
For example, postgres has the RANDOM() function. In order to replicate these sort of functions, it would be nice to have a Function type to allow custom queries and functions to be used in a order_by()
Right now, you have to use raw sql for these operations
You're right, this needs adding.
We have something similar called WhereRaw:
https://piccolo-orm.readthedocs.io/en/latest/piccolo/query_clauses/where.html#whereraw
We need to add SelectRaw.
I just re-read this issue, and realised that you want to have custom SQL in the order by clause.
Yea
SelectRaw too would be nice
But really it would be nice to have a Function type
any updates?
I just need to refactor my PR, so we also have RawOrder.
Ah ok thanks
Fixed in 0.97.0