return expr.resultType();
}
@Override
public TEvaluatableExpression build() {
final TEvaluatableExpression eval = expr.build();
return new TEvaluatableExpression() {
@Override
public ValueSource resultValue() {
return value;
}
@Override
public void evaluate() {
eval.evaluate();
ValueSource inSrc = eval.resultValue();
if (inSrc.isNull())
value.putNull();
else
value.putString(inSrc.getString(), null);
}
@Override
public void with(Row row) {
eval.with(row);
}
@Override
public void with(QueryContext context) {
eval.with(context);
}
@Override
public void with(QueryBindings bindings) {
eval.with(bindings);
}
private final Value value = new Value(MString.VARCHAR.instance(255, true));
};
}