}
@Override
protected Binding assembleBinding(ResultSetJDBC rsHolder, Binding parent)
{
BindingMap b = BindingFactory.create(parent) ;
ResultSet rs = rsHolder.get() ;
for ( Var v : super.getProject() )
{
if ( ! v.isNamedVar() )
// Skip bNodes and system variables
continue ;
String codename = super.getSqlName(v) ;
if ( codename == null )
// Not mentioned in query.
continue ;
try {
int type = rs.getInt(SQLUtils.gen(codename,"type")) ;
// returns 0 on null : type 0 is not allocated
// Test with "wasNull()" for safety
if ( rs.wasNull() )
continue ;
String lexColName = SQLUtils.gen(codename,"lex") ;
// Get lexical - overriden by Oracle-specific code.
String lex = getLexFromResultSet(rs, codename);
// String lex = rs.getString(lexColName) ;
if ( lex == null )
lex = "" ;
String datatype = rs.getString(SQLUtils.gen(codename,"datatype")) ;
String lang = rs.getString(SQLUtils.gen(codename,"lang")) ;
ValueType vType = ValueType.lookup(type) ;
Node r = makeNode(lex, datatype, lang, vType) ;
b.add(v, r) ;
} catch (SQLException ex)
{ // Unknown variable?
//log.warn("Not reconstructed: "+n) ;
}
}