korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.48k stars 222 forks source link

sql concat in korma? #252

Closed piyushmandovra closed 9 years ago

piyushmandovra commented 9 years ago

hello folks, is there any way to write sql concat function using korma?

like: (use :reload-all 'korma.core)

(select :customers (aggregate (concat :first_name :last_name) :full-name))

immoh commented 9 years ago
(sql-only (select :customers 
            (fields [(sqlfn concat :first_name :last_name) :full_name])))
=> "SELECT CONCAT(\"customers\".\"first_name\", \"customers\".\"last_name\") AS \"full_name\" FROM \"customers\""
piyushmandovra commented 9 years ago

thank you it's working