function post_api_explain (req, res) { if (req.suffix.length !== 0) { actions.resultNotFound(req, res, ERRORS.errors.ERROR_HTTP_NOT_FOUND.code, ERRORS.errors.ERROR_HTTP_NOT_FOUND.message); return; } var json = actions.getJsonBody(req, res); if (json === undefined) { return; } var result = EXPLAIN(json.query, json.bindVars); if (result instanceof Error) { actions.resultException(req, res, result, undefined, false); return; } result = { "plan" : result }; actions.resultOk(req, res, actions.HTTP_OK, result); }
ArangoStatement.prototype.explain = function () { return internal.AQL_EXPLAIN(this._query, this._bindVars); };
ArangoStatement.prototype.explain = function () { return EXPLAIN(this._query); };