Learn R Programming

paws.database (version 0.1.12)

rdsdataservice_batch_execute_statement: Runs a batch SQL statement over an array of data

Description

Runs a batch SQL statement over an array of data.

You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations.

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.

Usage

rdsdataservice_batch_execute_statement(database, parameterSets,
  resourceArn, schema, secretArn, sql, transactionId)

Value

A list with the following syntax:

list(
  updateResults = list(
    list(
      generatedFields = list(
        list(
          arrayValue = list(
            arrayValues = list(
              list()
            ),
            booleanValues = list(
              TRUE|FALSE
            ),
            doubleValues = list(
              123.0
            ),
            longValues = list(
              123
            ),
            stringValues = list(
              "string"
            )
          ),
          blobValue = raw,
          booleanValue = TRUE|FALSE,
          doubleValue = 123.0,
          isNull = TRUE|FALSE,
          longValue = 123,
          stringValue = "string"
        )
      )
    )
  )
)

Arguments

database

The name of the database.

parameterSets

The parameter set for the batch operation.

The SQL statement is executed as many times as the number of parameter sets provided. To execute a SQL statement with no parameters, use one of the following options:

  • Specify one or more empty parameter sets.

  • Use the execute_statement operation instead of the batch_execute_statement operation.

Array parameters are not supported.

resourceArn

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

schema

The name of the database schema.

secretArn

[required] The name or ARN of the secret that enables access to the DB cluster.

sql

[required] The SQL statement to run.

transactionId

The identifier of a transaction that was started by using the begin_transaction 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.

Request syntax

svc$batch_execute_statement(
  database = "string",
  parameterSets = list(
    list(
      list(
        name = "string",
        typeHint = "DATE"|"DECIMAL"|"TIME"|"TIMESTAMP",
        value = list(
          arrayValue = list(
            arrayValues = list(
              list()
            ),
            booleanValues = list(
              TRUE|FALSE
            ),
            doubleValues = list(
              123.0
            ),
            longValues = list(
              123
            ),
            stringValues = list(
              "string"
            )
          ),
          blobValue = raw,
          booleanValue = TRUE|FALSE,
          doubleValue = 123.0,
          isNull = TRUE|FALSE,
          longValue = 123,
          stringValue = "string"
        )
      )
    )
  ),
  resourceArn = "string",
  schema = "string",
  secretArn = "string",
  sql = "string",
  transactionId = "string"
)