Masterminds / squirrel

Fluent SQL generation for golang
Other
6.67k stars 458 forks source link

feat: add support for row (and optional column) aliases #335

Closed Vesquen closed 6 months ago

Vesquen commented 1 year ago

Add support for MySQL 8's row alias

From the MySQL 8 docs:

The use of VALUES() to refer to the new row and columns is deprecated beginning with MySQL 8.0.20, and is subject to removal in a future version of MySQL.

lann commented 1 year ago

I have generally avoided adding dialect-specific syntax to squirrel, and it appears that this is Mysql-specific. This sort of syntax is exactly what .Suffix is for.