use of com.wplatform.ddal.value.ValueResultSet in project jdbc-shards by wplatform.
the class FunctionTable method getValueResultSet.
private ValueResultSet getValueResultSet(Session session) {
functionExpr = functionExpr.optimize(session);
Value v = functionExpr.getValue(session);
if (v == ValueNull.INSTANCE) {
return null;
}
return (ValueResultSet) v;
}
use of com.wplatform.ddal.value.ValueResultSet in project jdbc-shards by wplatform.
the class FunctionTable method getResult.
/**
* Read the result from the function. This method buffers the result in a
* temporary file.
*
* @param session the session
* @return the result
*/
public ResultInterface getResult(Session session) {
ValueResultSet v = getValueResultSet(session);
if (v == null) {
return null;
}
if (cachedResult != null && cachedValue == v) {
cachedResult.reset();
return cachedResult;
}
LocalResult result = LocalResult.read(session, v.getResultSet(), 0);
if (function.isDeterministic()) {
cachedResult = result;
cachedValue = v;
}
return result;
}
Aggregations