Issue Feature Closed

#84814Support literal orderBy clauses

Michael Stopp 04/20/18, 16:16 updated 10/02/18, 10:47

Description

With the QueryBuilder it’s currently not possible to do orderings that go beyond simple field list, i.e. something like in these real-life examples:

ORDER BY FIELD(eventtype, 0, 4, 1, 2, 3), sorting

or

ORDER BY CAST(SUBSTRING_INDEX(c.IP, '.', -1) AS UNSIGNED)

There should be something equivalent to selectLiteral for orderBy.

Without this, it can be difficult to properly migrate extensions from $GLOBALS[‘TYPO3_DB’] to Doctrine DBAL syntax.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.