honeysql

danielneal 2026-01-28T22:15:07.093339Z

Is there a way to make the following?

(honey.sql/format
    {:select [[:a :some.kw.with.dots]]
     :from [:b]
     :order-by [[:some.kw.with.dots :asc]]}
    {:quoted true
     :dialect :mysql})

produce 

SELECT `a` AS `some.kw.with.dots` FROM `b` ORDER BY `some.kw.with.dots` ASC`

as opposed to 

SELECT `a` AS `some.kw.with.dots` FROM `b` ORDER BY `some`.`kw`.`with`.`dots` ASC
` It looks like I can provide [:alias :.with.dots], but that would have other consequences elsewhere (big ol’ codebase) so wondering in case I’ve missed a trick

danielneal 2026-01-29T14:28:10.404439Z

Awesome, got it, thanks for your help!!

seancorfield 2026-01-28T22:24:12.994469Z

Column names like :a.b.c are always mapped to "a"."b"."c" quoted (with backtick instead of double-quote for MySQL). Aliases explicitly follow different rules -- they are single names, not schema.table.column -- hence the :alias special form to treat a dotted-keyword as if it were an alias.

seancorfield 2026-01-28T22:27:04.791779Z

See https://github.com/seancorfield/honeysql/issues/497 from mid-2023.