libZSservicesZSamazonka-rds-dataZSamazonka-rds-data
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.RDSData.BatchExecuteStatement

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.

Synopsis

Creating a Request

data BatchExecuteStatement Source #

The request parameters represent the input of a SQL statement over an array of data.

See: newBatchExecuteStatement smart constructor.

Constructors

BatchExecuteStatement' 

Fields

  • database :: Maybe Text

    The name of the database.

  • parameterSets :: Maybe [[SqlParameter]]

    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 ExecuteStatement operation instead of the BatchExecuteStatement operation.

    Array parameters are not supported.

  • transactionId :: Maybe Text

    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.

  • schema :: Maybe Text

    The name of the database schema.

  • resourceArn :: Text

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

  • secretArn :: Text

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

  • sql :: Text

    The SQL statement to run.

Instances

Instances details
Eq BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Read BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Show BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Generic BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Associated Types

type Rep BatchExecuteStatement :: Type -> Type #

NFData BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Methods

rnf :: BatchExecuteStatement -> () #

Hashable BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

ToJSON BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

AWSRequest BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Associated Types

type AWSResponse BatchExecuteStatement #

ToHeaders BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

ToPath BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

ToQuery BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

type Rep BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

type Rep BatchExecuteStatement = D1 ('MetaData "BatchExecuteStatement" "Amazonka.RDSData.BatchExecuteStatement" "libZSservicesZSamazonka-rds-dataZSamazonka-rds-data" 'False) (C1 ('MetaCons "BatchExecuteStatement'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "parameterSets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [[SqlParameter]])) :*: S1 ('MetaSel ('Just "transactionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "schema") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sql") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse BatchExecuteStatement Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

newBatchExecuteStatement Source #

Create a value of BatchExecuteStatement with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:database:BatchExecuteStatement', batchExecuteStatement_database - The name of the database.

$sel:parameterSets:BatchExecuteStatement', batchExecuteStatement_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 ExecuteStatement operation instead of the BatchExecuteStatement operation.

Array parameters are not supported.

$sel:transactionId:BatchExecuteStatement', batchExecuteStatement_transactionId - 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.

$sel:schema:BatchExecuteStatement', batchExecuteStatement_schema - The name of the database schema.

$sel:resourceArn:BatchExecuteStatement', batchExecuteStatement_resourceArn - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

$sel:secretArn:BatchExecuteStatement', batchExecuteStatement_secretArn - The name or ARN of the secret that enables access to the DB cluster.

$sel:sql:BatchExecuteStatement', batchExecuteStatement_sql - The SQL statement to run.

Request Lenses

batchExecuteStatement_parameterSets :: Lens' BatchExecuteStatement (Maybe [[SqlParameter]]) Source #

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 ExecuteStatement operation instead of the BatchExecuteStatement operation.

Array parameters are not supported.

batchExecuteStatement_transactionId :: Lens' BatchExecuteStatement (Maybe Text) Source #

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.

batchExecuteStatement_resourceArn :: Lens' BatchExecuteStatement Text Source #

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

batchExecuteStatement_secretArn :: Lens' BatchExecuteStatement Text Source #

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

Destructuring the Response

data BatchExecuteStatementResponse Source #

The response elements represent the output of a SQL statement over an array of data.

See: newBatchExecuteStatementResponse smart constructor.

Constructors

BatchExecuteStatementResponse' 

Fields

Instances

Instances details
Eq BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Read BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Show BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Generic BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

Associated Types

type Rep BatchExecuteStatementResponse :: Type -> Type #

NFData BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

type Rep BatchExecuteStatementResponse Source # 
Instance details

Defined in Amazonka.RDSData.BatchExecuteStatement

type Rep BatchExecuteStatementResponse = D1 ('MetaData "BatchExecuteStatementResponse" "Amazonka.RDSData.BatchExecuteStatement" "libZSservicesZSamazonka-rds-dataZSamazonka-rds-data" 'False) (C1 ('MetaCons "BatchExecuteStatementResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "updateResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UpdateResult])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newBatchExecuteStatementResponse Source #

Create a value of BatchExecuteStatementResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:updateResults:BatchExecuteStatementResponse', batchExecuteStatementResponse_updateResults - The execution results of each batch entry.

$sel:httpStatus:BatchExecuteStatementResponse', batchExecuteStatementResponse_httpStatus - The response's http status code.

Response Lenses