Skip to content

/AWS1/CL_RDD=>EXECUTESTATEMENT()

About ExecuteStatement

Runs a SQL statement against a database.

If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically.

If the binary response data from the database is more than 1 MB, the call is terminated.

Method Signature

IMPORTING

Required arguments:

IV_RESOURCEARN TYPE /AWS1/RDDARN /AWS1/RDDARN

The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

IV_SECRETARN TYPE /AWS1/RDDARN /AWS1/RDDARN

The ARN of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret.

For information about creating the secret, see Create a database secret.

IV_SQL TYPE /AWS1/RDDSQLSTATEMENT /AWS1/RDDSQLSTATEMENT

The SQL statement to run.

Optional arguments:

IV_DATABASE TYPE /AWS1/RDDDBNAME /AWS1/RDDDBNAME

The name of the database.

IV_SCHEMA TYPE /AWS1/RDDDBNAME /AWS1/RDDDBNAME

The name of the database schema.

Currently, the schema parameter isn't supported.

IT_PARAMETERS TYPE /AWS1/CL_RDDSQLPARAMETER=>TT_SQLPARAMETERSLIST TT_SQLPARAMETERSLIST

The parameters for the SQL statement.

Array parameters are not supported.

IV_TRANSACTIONID TYPE /AWS1/RDDID /AWS1/RDDID

The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in.

If the SQL statement is not part of a transaction, don't set this parameter.

IV_INCLUDERESULTMETADATA TYPE /AWS1/RDDBOOLEAN /AWS1/RDDBOOLEAN

A value that indicates whether to include metadata in the results.

IV_CONTINUEAFTERTIMEOUT TYPE /AWS1/RDDBOOLEAN /AWS1/RDDBOOLEAN

A value that indicates whether to continue running the statement after the call times out. By default, the statement stops running when the call times out.

For DDL statements, we recommend continuing to run the statement after the call times out. When a DDL statement terminates before it is finished running, it can result in errors and possibly corrupted data structures.

IO_RESULTSETOPTIONS TYPE REF TO /AWS1/CL_RDDRESULTSETOPTIONS /AWS1/CL_RDDRESULTSETOPTIONS

Options that control how the result set is returned.

IV_FORMATRECORDSAS TYPE /AWS1/RDDRECORDSFORMATTYPE /AWS1/RDDRECORDSFORMATTYPE

A value that indicates whether to format the result set as a single JSON string. This parameter only applies to SELECT statements and is ignored for other types of statements. Allowed values are NONE and JSON. The default value is NONE. The result is returned in the formattedRecords field.

For usage information about the JSON format for result sets, see Using the Data API in the Amazon Aurora User Guide.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_RDDEXECUTESTMTRSP /AWS1/CL_RDDEXECUTESTMTRSP