void executeCommand(final String cmd, final Map<QName, Object> bindings, final XQStaticContext ctx) throws XQException { checkState(ex_connection_closed); cancelled = false; try { final Map<String, Object> params = new HashMap<>(bindings.size()); for (Map.Entry<QName, Object> e: bindings.entrySet()) { params.put(toStringName(e.getKey()), e.getValue()); } if (transactional) { try { executeInTransaction(new Callable<Void>() { @Override public Void call() throws XQException { getProcessor().executeXCommand(cmd, params, ctx); return null; } }); } catch (BagriException ex) { throw getXQException(ex); } } else { getProcessor().executeXCommand(cmd, params, ctx); } } finally { if (cancelled) { throw new XQCancelledException("Command execution has been cancelled", null, null, -1, -1, -1, null, null, null); } } }
throw new XQCancelledException("Query execution has been cancelled", null, null, -1, -1, -1, null, null, null);