use of com.teradata.jaqy.utils.exp.ColumnNode in project jaqy by Teradata.
the class ProjectColumnList method bind.
public void bind(JaqyResultSet rs, JaqyInterpreter interpreter) throws SQLException {
int numCols = m_columnList.size();
ExpNode[] exps = new ExpNode[numCols];
FullColumnInfo[] columnInfos = new FullColumnInfo[numCols];
ResultSetMetaData rsmd = rs.getMetaData().getMetaData();
JaqyHelper helper = rs.getHelper();
for (int i = 0; i < numCols; ++i) {
ProjectColumn column = m_columnList.get(i);
int index = rs.findColumn(column.name);
columnInfos[i] = ResultSetMetaDataUtils.getColumnInfo(rsmd, index, helper);
columnInfos[i].name = column.asName;
columnInfos[i].label = column.asName;
ColumnNode exp = new ColumnNode(column.name);
exp.bind(rs, null, interpreter);
exps[i] = exp;
}
m_project = new ExpNodeProject(exps);
m_meta = new JaqyResultSetMetaData(new InMemoryResultSetMetaData(columnInfos), DummyHelper.getInstance());
}
Aggregations