|
RE: What's wrong with this syntax = markupBuilder + SQL --> Closure: msg#00139lang.groovy.user
Whoops.
Yields: Caught: groovy.lang.MissingMethodException: No
signture of method Test$_run_closure2.body() is applicable for argument types
Test$_run_closure2.body() is applicable for argument types:
(Test$_run_closure2_closure4) values:
[Test$_run_closure2_closure@1f6226] From: Furash Gary Sent: Friday, November 19, 2004 8:44 AM To: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@xxxxxxxxxxxxxxxx Subject: What's wrong with this syntax = markupBuilder + SQL import groovy.sql.*;
import groovy.xml.*; release = "3.11";
I'm trying to spit
out a td row for each line of my sql, but it complains about
closures.
sql =
Sql.newInstance("jdbc:mysql://mcaosdev2:3306/mantis_db",
"furashgf", "melissa", "org.gjt.mm.mysql.Driver"); getWorkloadSql = <<<EOS SELECT mut.last_name, mut.first_name, COUNT(*) AS total_tasks, SUM(IF(mbt.projection IS NULL OR mbt.projection = 10, 1,0)) AS unsized_tasks, SUM(mbp.value) AS workload FROM mantis_user_table AS mut LEFT OUTER JOIN mantis_bug_table AS mbt ON (mbt.handler_id = mut.id) LEFT OUTER JOIN mantis_project_version_table AS mpvt ON (mpvt.id = mbt.version_id) LEFT OUTER JOIN m_bug_status AS mbs ON (mbs.status_cd = mbt.status) LEFT OUTER JOIN m_bug_projection AS mbp ON (mbp.projection_cd = mbt.projection) WHERE mpvt.version = ${release} AND mbs.is_active_state = "Y" AND mut.role_cd IN ("DEV", "ADM") GROUP BY mut.last_name, mut.first_name ORDER BY mut.last_name, mut.first_name; EOS htmlOut = new MarkupBuilder();
htmlOut.html() { head() { title("Load By Developer for Release $release"); } body() { table() { tr() { th("Team Member"); th("Total Tasks"); th("Workload"); } sql.eachRow(getWorkloadSql) { tr() { td(it.last_name + ", " + it.first_name); td(it.total_tasks); td(it.workload); } } } } } println(htmlOut);
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Expected or unexpected, Russel Winder |
|---|---|
| Next by Date: | RE: How to use markup builder as a big string, Furash Gary |
| Previous by Thread: | Expected or unexpected, Russel Winder |
| Next by Thread: | RE: RE: What's wrong with this syntax = markupBuilder + SQL --> Closure, Laforge Guillaume |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |