as this involves a MySQL-specific syntax, the easiest way to just make this
happen without any hassle is to use literal_column(), such as:
q1 = s.query(
func.group_concat(
literal_column(
"DISTINCT lower(`role`.`name`) ORDER BY lower(`role`.`name`)
SEPARATOR '|'"
I want to execute the following MySQL query:
SELECT group_concat(DISTINCT lower(`role`.`name`) ORDER BY
lower(`role`.`name`) SEPARATOR '|')
FROM ...
GROUP BY ...
Using the latest stable release of SQLAlchemy (1.3.20), I've written the
following code:
class Role(Base):
__tablename__ =