Skip to content

/AWS1/CL_NED=>EXECUTEOPENCYPHERQUERY()

About ExecuteOpenCypherQuery

Executes an openCypher query. See Accessing the Neptune Graph with openCypher for more information.

Neptune supports building graph applications using openCypher, which is currently one of the most popular query languages among developers working with graph databases. Developers, business analysts, and data scientists like openCypher's declarative, SQL-inspired syntax because it provides a familiar structure in which to querying property graphs.

The openCypher language was originally developed by Neo4j, then open-sourced in 2015 and contributed to the openCypher project under an Apache 2 open-source license.

Note that 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 one of the following IAM actions in that cluster, depending on the query:

Note also 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).

Method Signature

IMPORTING

Required arguments:

iv_opencypherquery TYPE /AWS1/NEDSTRING /AWS1/NEDSTRING

The openCypher query string to be executed.

Optional arguments:

iv_parameters TYPE /AWS1/NEDSTRING /AWS1/NEDSTRING

The openCypher query parameters for query execution. See Examples of openCypher parameterized queries for more information.

RETURNING

oo_output TYPE REF TO /aws1/cl_nedexecuteopencyphe03 /AWS1/CL_NEDEXECUTEOPENCYPHE03

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_ned~executeopencypherquery(
  iv_opencypherquery = |string|
  iv_parameters = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_value = lo_result->get_results( ).
  IF lo_value IS NOT INITIAL.
  ENDIF.
ENDIF.