MCPcopy Create free account
hub / github.com/BaseXdb/basex / eval

Method eval

basex-core/src/main/java/org/basex/query/func/unit/Unit.java:282–293  ·  view source on GitHub ↗

Evaluates a function. @param func function to evaluate @throws QueryException query exception

(final StaticFunc func)

Source from the content-addressed store, hash-verified

280 * @throws QueryException query exception
281 */
282 private void eval(final StaticFunc func) throws QueryException {
283 current = func;
284
285 try(QueryContext qc = job.pushJob(new QueryContext(ctx))) {
286 qc.parse(input, file.path());
287 qc.assign(func);
288 // ignore results
289 for(final Iter iter = qc.iter(); qc.next(iter) != null;);
290 } finally {
291 job.popJob();
292 }
293 }
294
295 /**
296 * Returns a token representation of the measured time.

Callers 1

testMethod · 0.95

Calls 7

pushJobMethod · 0.80
popJobMethod · 0.80
iterMethod · 0.65
nextMethod · 0.65
parseMethod · 0.45
pathMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected