console.log("YQL ERROR while requesting: "+query+" : "+r.error().description());
return ;
}
DescResult desc1 = r.query().results().cast();
TableDesc t = desc1.table();
// console.log("t.meta().sampleQuery(): "+Y.dump(t.meta().sampleQuery()));
String sapmleQueryHtml = "<ul>";
JsArray<SampleQuery> sampleQUeries = t.meta().sampleQuery();
for (int i = 0; i < sampleQUeries.length(); i++) {
SampleQuery sq = sampleQUeries.get(i);
sapmleQueryHtml += "<li><p>Description: "+Y.Escape().html(sq.description())+"</p>" +
"<pre>" + sq.content()+"</pre></li>";
}
sapmleQueryHtml += "<ul>";
descriptionContainer.empty();
descriptionContainer.append(
"<table>" +
" <tr><td>TableShow Name: </td><td>"+t.name()+"</td></tr>" +
" <tr><td>TableShow Hash: </td><td>"+t.hash()+"</td></tr>" +
" <tr><td>TableShow Security: </td><td>"+t.security()+"</td></tr>" +
" <tr><td>Author: </td><td>"+t.meta().author()+"</td></tr>" +
" <tr><td>Documentation URL: </td><td><a href=\""+t.meta().documentationURL()+"\">link to docs</a></td></tr>" +
" <tr><td>sample query: </td><td>"+sapmleQueryHtml+"</td></tr>" +
"</table>"
);
}
}, yqlParams);