adding sql functions to order_by clause handling
|Reported by:||rb.online@…||Owned by:||nobody|
|Cc:||sam@…||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
The attached patch enables the use of a sql function in a order_by clause.
will produce the following SQL:
... ORDER BY YEAR(date) DESC
when ordering according to multiple fields to group by year, and then say by publication type, if we use the date to order, the publication type is used only if the whole date is the same.
to group publications by year in the order clause, I could not find a solution.
does not work but
I suspect there are other use cases.
The provided patch does not changes the way the deprecated syntax for ordering is handled (in orderlist2sql)
Change History (4)
Changed 7 years ago by rb.online@…
comment:1 Changed 7 years ago by Simon G. <dev@…>
- Triage Stage changed from Unreviewed to Design decision needed
- Version changed from 0.96 to SVN