4 ms·
Groovy has had similar functionality in its standard library for years now, very handy!
by gregopet 10y ago
Groovy has had similar functionality in its standard library for years now, very handy!
- vorg 10y agoAre you refering to this http://groovy.329449.n5.nabble.com/Groovy-and-SQL-tt5710894.html#a5710895 http://groovy.329449.n5.nabble.com/Groovy-and-SQL-tt5710894.... August 2012 mailing list claim about Apache Groovy? There isn't any GROUP BY in that one.
- gregopet 10y agoNo, I'm refering to the groovy.sql.Sql class: http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.h... It allows you to simply write SQL in a GString using placeholders that get replaced with parameters before being sent to the database, here's an example from the Javadoc: sql.execute "insert into PROJECT (id, name, url) values ($map.id, $map.name, $map.url)" Works great with Groovy's multiline strings.