diff --git a/arangod/RestHandler/RestQueryHandler.cpp b/arangod/RestHandler/RestQueryHandler.cpp index 3a0f26a5fb..cc0c4f4833 100644 --- a/arangod/RestHandler/RestQueryHandler.cpp +++ b/arangod/RestHandler/RestQueryHandler.cpp @@ -546,65 +546,7 @@ bool RestQueryHandler::replaceProperties () { } //////////////////////////////////////////////////////////////////////////////// -/// @startDocuBlock JSF_post_api_query /// @brief parse an AQL query and return information about it -/// -/// @RESTHEADER{POST /_api/query, Parse an AQL query} -/// -/// @RESTBODYPARAM{query,json,required} -/// To validate a query string without executing it, the query string can be -/// passed to the server via an HTTP POST request. -/// -/// The query string needs to be passed in the attribute *query* of a JSON -/// object as the body of the POST request. -/// -/// @RESTRETURNCODES -/// -/// @RESTRETURNCODE{200} -/// If the query is valid, the server will respond with *HTTP 200* and -/// return the names of the bind parameters it found in the query (if any) in -/// the *bindVars* attribute of the response. It will also return an array -/// of the collections used in the query in the *collections* attribute. -/// If a query can be parsed successfully, the *ast* attribute of the returned -/// JSON will contain the abstract syntax tree representation of the query. -/// The format of the *ast* is subject to change in future versions of -/// ArangoDB, but it can be used to inspect how ArangoDB interprets a given -/// query. Note that the abstract syntax tree will be returned without any -/// optimizations applied to it. -/// -/// @RESTRETURNCODE{400} -/// The server will respond with *HTTP 400* in case of a malformed request, -/// or if the query contains a parse error. The body of the response will -/// contain the error details embedded in a JSON object. -/// -/// @EXAMPLES -/// -/// Valid query: -/// -/// @EXAMPLE_ARANGOSH_RUN{RestQueryValid} -/// var url = "/_api/query"; -/// var body = '{ "query" : "FOR p IN products FILTER p.name == @name LIMIT 2 RETURN p.n" }'; -/// -/// var response = logCurlRequest('POST', url, body); -/// -/// assert(response.code === 200); -/// -/// logJsonResponse(response); -/// @END_EXAMPLE_ARANGOSH_RUN -/// -/// Invalid query: -/// -/// @EXAMPLE_ARANGOSH_RUN{RestQueryInvalid} -/// var url = "/_api/query"; -/// var body = '{ "query" : "FOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.n" }'; -/// -/// var response = logCurlRequest('POST', url, body); -/// -/// assert(response.code === 400); -/// -/// logJsonResponse(response); -/// @END_EXAMPLE_ARANGOSH_RUN -/// @endDocuBlock //////////////////////////////////////////////////////////////////////////////// bool RestQueryHandler::parseQuery () {