executeOpenCypherExplainQuery method

Future<ExecuteOpenCypherExplainQueryOutput> executeOpenCypherExplainQuery({
  1. required OpenCypherExplainMode explainMode,
  2. required String openCypherQuery,
  3. String? parameters,
})

Executes an openCypher explain request. See The openCypher explain feature for more information.

When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:ReadDataViaQuery IAM action in that cluster.

Note that the neptune-db:QueryLanguage:OpenCypher IAM condition key can be used in the policy document to restrict the use of openCypher queries (see Condition keys available in Neptune IAM data-access policy statements).

May throw BadRequestException. May throw CancelledByUserException. May throw ClientTimeoutException. May throw ConcurrentModificationException. May throw ConstraintViolationException. May throw FailureByQueryException. May throw IllegalArgumentException. May throw InvalidArgumentException. May throw InvalidNumericDataException. May throw InvalidParameterException. May throw MalformedQueryException. May throw MemoryLimitExceededException. May throw MissingParameterException. May throw ParsingException. May throw PreconditionsFailedException. May throw QueryLimitExceededException. May throw QueryLimitException. May throw QueryTooLargeException. May throw TimeLimitExceededException. May throw TooManyRequestsException. May throw UnsupportedOperationException.

Parameter explainMode : The openCypher explain mode. Can be one of: static, dynamic, or details.

Parameter openCypherQuery : The openCypher query string.

Parameter parameters : The openCypher query parameters.

Implementation

Future<ExecuteOpenCypherExplainQueryOutput> executeOpenCypherExplainQuery({
  required OpenCypherExplainMode explainMode,
  required String openCypherQuery,
  String? parameters,
}) async {
  final $payload = <String, dynamic>{
    'explain': explainMode.value,
    'query': openCypherQuery,
    if (parameters != null) 'parameters': parameters,
  };
  final response = await _protocol.sendRaw(
    payload: $payload,
    method: 'POST',
    requestUri: '/opencypher/explain',
    exceptionFnMap: _exceptionFns,
  );
  return ExecuteOpenCypherExplainQueryOutput(
    results: await response.stream.toBytes(),
  );
}