/AWS1/IF_NEG=>EXECUTEQUERY()¶
About ExecuteQuery¶
Execute an openCypher query.
When invoking this operation in a Neptune Analytics cluster, 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:
-
neptune-graph:ReadDataViaQuery
-
neptune-graph:WriteDataViaQuery
-
neptune-graph:DeleteDataViaQuery
Method Signature¶
METHODS /AWS1/IF_NEG~EXECUTEQUERY
IMPORTING
!IV_GRAPHIDENTIFIER TYPE /AWS1/NEGGRAPHIDENTIFIER OPTIONAL
!IV_QUERYSTRING TYPE /AWS1/NEGSTRING OPTIONAL
!IV_LANGUAGE TYPE /AWS1/NEGQUERYLANGUAGE OPTIONAL
!IT_PARAMETERS TYPE /AWS1/CL_RT_DOCUMENT=>TT_MAP OPTIONAL
!IV_PLANCACHE TYPE /AWS1/NEGPLANCACHETYPE OPTIONAL
!IV_EXPLAINMODE TYPE /AWS1/NEGEXPLAINMODE OPTIONAL
!IV_QUERYTIMEOUTMILLISECONDS TYPE /AWS1/NEGINTEGER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_negexecutequeryoutput
RAISING
/AWS1/CX_NEGACCESSDENIEDEX
/AWS1/CX_NEGCONFLICTEXCEPTION
/AWS1/CX_NEGINTERNALSERVEREX
/AWS1/CX_NEGTHROTTLINGEX
/AWS1/CX_NEGUNPROCESSABLEEX
/AWS1/CX_NEGVALIDATIONEX
/AWS1/CX_NEGCLIENTEXC
/AWS1/CX_NEGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_graphidentifier TYPE /AWS1/NEGGRAPHIDENTIFIER /AWS1/NEGGRAPHIDENTIFIER¶
The unique identifier of the Neptune Analytics graph.
iv_querystring TYPE /AWS1/NEGSTRING /AWS1/NEGSTRING¶
The query string to be executed.
iv_language TYPE /AWS1/NEGQUERYLANGUAGE /AWS1/NEGQUERYLANGUAGE¶
The query language the query is written in. Currently only openCypher is supported.
Optional arguments:¶
it_parameters TYPE /AWS1/CL_RT_DOCUMENT=>TT_MAP TT_MAP¶
The data parameters the query can use in JSON format. For example: {"name": "john", "age": 20}. (optional)
iv_plancache TYPE /AWS1/NEGPLANCACHETYPE /AWS1/NEGPLANCACHETYPE¶
Query plan cache is a feature that saves the query plan and reuses it on successive executions of the same query. This reduces query latency, and works for both
READandUPDATEqueries. The plan cache is an LRU cache with a 5 minute TTL and a capacity of 1000.
iv_explainmode TYPE /AWS1/NEGEXPLAINMODE /AWS1/NEGEXPLAINMODE¶
The explain mode parameter returns a query explain instead of the actual query results. A query explain can be used to gather insights about the query execution such as planning decisions, time spent on each operator, solutions flowing etc.
iv_querytimeoutmilliseconds TYPE /AWS1/NEGINTEGER /AWS1/NEGINTEGER¶
Specifies the query timeout duration, in milliseconds. (optional)
RETURNING¶
oo_output TYPE REF TO /aws1/cl_negexecutequeryoutput /AWS1/CL_NEGEXECUTEQUERYOUTPUT¶
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->executequery(
it_parameters = VALUE /aws1/cl_rt_document=>tt_map(
(
VALUE /aws1/cl_rt_document=>ts_document_maprow(
key = |string|
value = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
)
)
)
iv_explainmode = |string|
iv_graphidentifier = |string|
iv_language = |string|
iv_plancache = |string|
iv_querystring = |string|
iv_querytimeoutmilliseconds = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_queryresponseblob = lo_result->get_payload( ).
ENDIF.