use of org.talend.sqlbuilder.dataset.dataset.DataSet in project tdi-studio-se by Talend.
the class RowCountTab method getDataSet.
public DataSet getDataSet() throws Exception {
String nodeName = getNode().toString();
INode node = getNode();
if (node == null) {
return null;
}
if (node.getSession() == null) {
return null;
}
if (node instanceof TableNode) {
TableNode tableNode = (TableNode) getNode();
nodeName = tableNode.getQualifiedName();
}
//$NON-NLS-1$
return new DataSet(null, "select count(*) from " + nodeName, null, getNode().getSession().getInteractiveConnection());
}
Aggregations