Поддержка разных СУБД. Примеры универсальных SQL

Агрегация строк

{{if .Oracle}}LISTAGG(o.title,', '){{else}}GROUP_CONCAT(o.title SEPARATOR ', '){{end}}

rownum, limit

{{if .Oracle}}and rownum = 1{{else}}limit 1{{end}}

decode, nvl

case when coalesce(ip_fl,'0')='1' then 'ИСТИНА' when coalesce(ip_fl,'0')='0' then 'ЛОЖЬ' else 'НЕКОРРЕКТНО' end

конкатенация

{{if .Oracle}}main.code || ' - ' || main.title{{else}}concat(main.code, ' - ',main.title){{end}}