Documentation ¶
Overview ¶
Package rdsdata provides the client and types for making API requests to AWS RDS DataService.
Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless DB cluster. To run these statements, you work with the Data Service API.
For more information about the Data Service API, see Using the Data API for Aurora Serverless (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the Amazon Aurora User Guide.
If you have questions or comments related to the Data API, send email to Rds-data-api-feedback@amazon.com (mailto:Rds-data-api-feedback@amazon.com).
See https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01 for more information on this service.
See rdsdata package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdata/
Using the Client ¶
To use AWS RDS DataService with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the AWS RDS DataService client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdata/#New
Index ¶
- Constants
- type ArrayValue
- type BatchExecuteStatementInput
- type BatchExecuteStatementOutput
- type BatchExecuteStatementRequest
- type BatchExecuteStatementResponse
- type BeginTransactionInput
- type BeginTransactionOutput
- type BeginTransactionRequest
- type BeginTransactionResponse
- type Client
- func (c *Client) BatchExecuteStatementRequest(input *BatchExecuteStatementInput) BatchExecuteStatementRequest
- func (c *Client) BeginTransactionRequest(input *BeginTransactionInput) BeginTransactionRequest
- func (c *Client) CommitTransactionRequest(input *CommitTransactionInput) CommitTransactionRequest
- func (c *Client) ExecuteSqlRequest(input *ExecuteSqlInput) ExecuteSqlRequest
- func (c *Client) ExecuteStatementRequest(input *ExecuteStatementInput) ExecuteStatementRequest
- func (c *Client) RollbackTransactionRequest(input *RollbackTransactionInput) RollbackTransactionRequest
- type ColumnMetadata
- type CommitTransactionInput
- type CommitTransactionOutput
- type CommitTransactionRequest
- type CommitTransactionResponse
- type DecimalReturnType
- type ExecuteSqlInput
- type ExecuteSqlOutput
- type ExecuteSqlRequest
- type ExecuteSqlResponse
- type ExecuteStatementInput
- type ExecuteStatementOutput
- type ExecuteStatementRequest
- type ExecuteStatementResponse
- type Field
- type Record
- type ResultFrame
- type ResultSetMetadata
- type ResultSetOptions
- type RollbackTransactionInput
- type RollbackTransactionOutput
- type RollbackTransactionRequest
- type RollbackTransactionResponse
- type SqlParameter
- type SqlStatementResult
- type StructValue
- type UpdateResult
- type Value
Constants ¶
const ( ServiceName = "AWS RDS DataService" // Service's name ServiceID = "RDSData" // Service's identifier EndpointsID = "rds-data" // Service's Endpoint identifier )
const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". // // There is an error in the call or in a SQL statement. ErrCodeBadRequestException = "BadRequestException" // ErrCodeForbiddenException for service response error code // "ForbiddenException". // // There are insufficient privileges to make the call. ErrCodeForbiddenException = "ForbiddenException" // ErrCodeInternalServerErrorException for service response error code // "InternalServerErrorException". // // An internal error occurred. ErrCodeInternalServerErrorException = "InternalServerErrorException" // ErrCodeNotFoundException for service response error code // "NotFoundException". // // The resourceArn, secretArn, or transactionId value can't be found. ErrCodeNotFoundException = "NotFoundException" // "ServiceUnavailableError". // // The service specified by the resourceArn parameter is not available. ErrCodeServiceUnavailableError = "ServiceUnavailableError" // ErrCodeStatementTimeoutException for service response error code // "StatementTimeoutException". // // The execution of the SQL statement timed out. ErrCodeStatementTimeoutException = "StatementTimeoutException" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayValue ¶ added in v0.13.0
type ArrayValue struct { // An array of arrays. ArrayValues []ArrayValue `locationName:"arrayValues" type:"list"` // An array of Boolean values. BooleanValues []bool `locationName:"booleanValues" type:"list"` // An array of integers. DoubleValues []float64 `locationName:"doubleValues" type:"list"` // An array of floating point numbers. LongValues []int64 `locationName:"longValues" type:"list"` // An array of strings. StringValues []string `locationName:"stringValues" type:"list"` // contains filtered or unexported fields }
Contains an array.
func (ArrayValue) MarshalFields ¶ added in v0.13.0
func (s ArrayValue) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ArrayValue) String ¶ added in v0.13.0
func (s ArrayValue) String() string
String returns the string representation
type BatchExecuteStatementInput ¶ added in v0.10.0
type BatchExecuteStatementInput struct { // The name of the database. Database *string `locationName:"database" type:"string"` // The parameter set for the batch operation. ParameterSets [][]SqlParameter `locationName:"parameterSets" type:"list"` // The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" min:"11" type:"string" required:"true"` // The name of the database schema. Schema *string `locationName:"schema" type:"string"` // The name or ARN of the secret that enables access to the DB cluster. // // SecretArn is a required field SecretArn *string `locationName:"secretArn" min:"11" type:"string" required:"true"` // The SQL statement to run. // // Sql is a required field Sql *string `locationName:"sql" type:"string" required:"true"` // 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. TransactionId *string `locationName:"transactionId" type:"string"` // contains filtered or unexported fields }
The request parameters represent the input of a SQL statement over an array of data.
func (BatchExecuteStatementInput) MarshalFields ¶ added in v0.10.0
func (s BatchExecuteStatementInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (BatchExecuteStatementInput) String ¶ added in v0.10.0
func (s BatchExecuteStatementInput) String() string
String returns the string representation
func (*BatchExecuteStatementInput) Validate ¶ added in v0.10.0
func (s *BatchExecuteStatementInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type BatchExecuteStatementOutput ¶ added in v0.10.0
type BatchExecuteStatementOutput struct { // The execution results of each batch entry. UpdateResults []UpdateResult `locationName:"updateResults" type:"list"` // contains filtered or unexported fields }
The response elements represent the output of a SQL statement over an array of data.
func (BatchExecuteStatementOutput) MarshalFields ¶ added in v0.10.0
func (s BatchExecuteStatementOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (BatchExecuteStatementOutput) String ¶ added in v0.10.0
func (s BatchExecuteStatementOutput) String() string
String returns the string representation
type BatchExecuteStatementRequest ¶ added in v0.10.0
type BatchExecuteStatementRequest struct { *aws.Request Input *BatchExecuteStatementInput Copy func(*BatchExecuteStatementInput) BatchExecuteStatementRequest }
BatchExecuteStatementRequest is the request type for the BatchExecuteStatement API operation.
func (BatchExecuteStatementRequest) Send ¶ added in v0.10.0
func (r BatchExecuteStatementRequest) Send(ctx context.Context) (*BatchExecuteStatementResponse, error)
Send marshals and sends the BatchExecuteStatement API request.
type BatchExecuteStatementResponse ¶ added in v0.10.0
type BatchExecuteStatementResponse struct { *BatchExecuteStatementOutput // contains filtered or unexported fields }
BatchExecuteStatementResponse is the response type for the BatchExecuteStatement API operation.
func (*BatchExecuteStatementResponse) SDKResponseMetdata ¶ added in v0.10.0
func (r *BatchExecuteStatementResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the BatchExecuteStatement request.
type BeginTransactionInput ¶ added in v0.10.0
type BeginTransactionInput struct { // The name of the database. Database *string `locationName:"database" type:"string"` // The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" min:"11" type:"string" required:"true"` // The name of the database schema. Schema *string `locationName:"schema" type:"string"` // The name or ARN of the secret that enables access to the DB cluster. // // SecretArn is a required field SecretArn *string `locationName:"secretArn" min:"11" type:"string" required:"true"` // contains filtered or unexported fields }
The request parameters represent the input of a request to start a SQL transaction.
func (BeginTransactionInput) MarshalFields ¶ added in v0.10.0
func (s BeginTransactionInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (BeginTransactionInput) String ¶ added in v0.10.0
func (s BeginTransactionInput) String() string
String returns the string representation
func (*BeginTransactionInput) Validate ¶ added in v0.10.0
func (s *BeginTransactionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type BeginTransactionOutput ¶ added in v0.10.0
type BeginTransactionOutput struct { // The transaction ID of the transaction started by the call. TransactionId *string `locationName:"transactionId" type:"string"` // contains filtered or unexported fields }
The response elements represent the output of a request to start a SQL transaction.
func (BeginTransactionOutput) MarshalFields ¶ added in v0.10.0
func (s BeginTransactionOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (BeginTransactionOutput) String ¶ added in v0.10.0
func (s BeginTransactionOutput) String() string
String returns the string representation
type BeginTransactionRequest ¶ added in v0.10.0
type BeginTransactionRequest struct { *aws.Request Input *BeginTransactionInput Copy func(*BeginTransactionInput) BeginTransactionRequest }
BeginTransactionRequest is the request type for the BeginTransaction API operation.
func (BeginTransactionRequest) Send ¶ added in v0.10.0
func (r BeginTransactionRequest) Send(ctx context.Context) (*BeginTransactionResponse, error)
Send marshals and sends the BeginTransaction API request.
type BeginTransactionResponse ¶ added in v0.10.0
type BeginTransactionResponse struct { *BeginTransactionOutput // contains filtered or unexported fields }
BeginTransactionResponse is the response type for the BeginTransaction API operation.
func (*BeginTransactionResponse) SDKResponseMetdata ¶ added in v0.10.0
func (r *BeginTransactionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the BeginTransaction request.
type Client ¶
Client provides the API operation methods for making requests to AWS RDS DataService. See this package's package overview docs for details on the service.
The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
New creates a new instance of the client from the provided Config.
Example:
// Create a client from just a config. svc := rdsdata.New(myConfig)
func (*Client) BatchExecuteStatementRequest ¶ added in v0.10.0
func (c *Client) BatchExecuteStatementRequest(input *BatchExecuteStatementInput) BatchExecuteStatementRequest
BatchExecuteStatementRequest returns a request value for making API operation for AWS RDS DataService.
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.
// Example sending a request using BatchExecuteStatementRequest. req := client.BatchExecuteStatementRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BatchExecuteStatement
func (*Client) BeginTransactionRequest ¶ added in v0.10.0
func (c *Client) BeginTransactionRequest(input *BeginTransactionInput) BeginTransactionRequest
BeginTransactionRequest returns a request value for making API operation for AWS RDS DataService.
Starts a SQL transaction.
<important> <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.</p> <p>A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically.</p> <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p> </important> // Example sending a request using BeginTransactionRequest. req := client.BeginTransactionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/BeginTransaction
func (*Client) CommitTransactionRequest ¶ added in v0.10.0
func (c *Client) CommitTransactionRequest(input *CommitTransactionInput) CommitTransactionRequest
CommitTransactionRequest returns a request value for making API operation for AWS RDS DataService.
Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
// Example sending a request using CommitTransactionRequest. req := client.CommitTransactionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/CommitTransaction
func (*Client) ExecuteSqlRequest ¶
func (c *Client) ExecuteSqlRequest(input *ExecuteSqlInput) ExecuteSqlRequest
ExecuteSqlRequest returns a request value for making API operation for AWS RDS DataService.
Runs one or more SQL statements.
This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
// Example sending a request using ExecuteSqlRequest. req := client.ExecuteSqlRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql
func (*Client) ExecuteStatementRequest ¶ added in v0.10.0
func (c *Client) ExecuteStatementRequest(input *ExecuteStatementInput) ExecuteStatementRequest
ExecuteStatementRequest returns a request value for making API operation for AWS RDS DataService.
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.
The response size limit is 1 MB or 1,000 records. If the call returns more than 1 MB of response data or over 1,000 records, the call is terminated.
// Example sending a request using ExecuteStatementRequest. req := client.ExecuteStatementRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteStatement
func (*Client) RollbackTransactionRequest ¶ added in v0.10.0
func (c *Client) RollbackTransactionRequest(input *RollbackTransactionInput) RollbackTransactionRequest
RollbackTransactionRequest returns a request value for making API operation for AWS RDS DataService.
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
// Example sending a request using RollbackTransactionRequest. req := client.RollbackTransactionRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/RollbackTransaction
type ColumnMetadata ¶
type ColumnMetadata struct { // The type of the column. ArrayBaseColumnType *int64 `locationName:"arrayBaseColumnType" type:"integer"` // A value that indicates whether the column increments automatically. IsAutoIncrement *bool `locationName:"isAutoIncrement" type:"boolean"` // A value that indicates whether the column is case-sensitive. IsCaseSensitive *bool `locationName:"isCaseSensitive" type:"boolean"` // A value that indicates whether the column contains currency values. IsCurrency *bool `locationName:"isCurrency" type:"boolean"` // A value that indicates whether an integer column is signed. IsSigned *bool `locationName:"isSigned" type:"boolean"` // The label for the column. Label *string `locationName:"label" type:"string"` // The name of the column. Name *string `locationName:"name" type:"string"` // A value that indicates whether the column is nullable. Nullable *int64 `locationName:"nullable" type:"integer"` // The precision value of a decimal number column. Precision *int64 `locationName:"precision" type:"integer"` // The scale value of a decimal number column. Scale *int64 `locationName:"scale" type:"integer"` // The name of the schema that owns the table that includes the column. SchemaName *string `locationName:"schemaName" type:"string"` // The name of the table that includes the column. TableName *string `locationName:"tableName" type:"string"` // The type of the column. Type *int64 `locationName:"type" type:"integer"` // The database-specific data type of the column. TypeName *string `locationName:"typeName" type:"string"` // contains filtered or unexported fields }
Contains the metadata for a column.
func (ColumnMetadata) MarshalFields ¶
func (s ColumnMetadata) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ColumnMetadata) String ¶
func (s ColumnMetadata) String() string
String returns the string representation
type CommitTransactionInput ¶ added in v0.10.0
type CommitTransactionInput struct { // The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" min:"11" type:"string" required:"true"` // The name or ARN of the secret that enables access to the DB cluster. // // SecretArn is a required field SecretArn *string `locationName:"secretArn" min:"11" type:"string" required:"true"` // The identifier of the transaction to end and commit. // // TransactionId is a required field TransactionId *string `locationName:"transactionId" type:"string" required:"true"` // contains filtered or unexported fields }
The request parameters represent the input of a commit transaction request.
func (CommitTransactionInput) MarshalFields ¶ added in v0.10.0
func (s CommitTransactionInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (CommitTransactionInput) String ¶ added in v0.10.0
func (s CommitTransactionInput) String() string
String returns the string representation
func (*CommitTransactionInput) Validate ¶ added in v0.10.0
func (s *CommitTransactionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type CommitTransactionOutput ¶ added in v0.10.0
type CommitTransactionOutput struct { // The status of the commit operation. TransactionStatus *string `locationName:"transactionStatus" type:"string"` // contains filtered or unexported fields }
The response elements represent the output of a commit transaction request.
func (CommitTransactionOutput) MarshalFields ¶ added in v0.10.0
func (s CommitTransactionOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (CommitTransactionOutput) String ¶ added in v0.10.0
func (s CommitTransactionOutput) String() string
String returns the string representation
type CommitTransactionRequest ¶ added in v0.10.0
type CommitTransactionRequest struct { *aws.Request Input *CommitTransactionInput Copy func(*CommitTransactionInput) CommitTransactionRequest }
CommitTransactionRequest is the request type for the CommitTransaction API operation.
func (CommitTransactionRequest) Send ¶ added in v0.10.0
func (r CommitTransactionRequest) Send(ctx context.Context) (*CommitTransactionResponse, error)
Send marshals and sends the CommitTransaction API request.
type CommitTransactionResponse ¶ added in v0.10.0
type CommitTransactionResponse struct { *CommitTransactionOutput // contains filtered or unexported fields }
CommitTransactionResponse is the response type for the CommitTransaction API operation.
func (*CommitTransactionResponse) SDKResponseMetdata ¶ added in v0.10.0
func (r *CommitTransactionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the CommitTransaction request.
type DecimalReturnType ¶ added in v0.13.0
type DecimalReturnType string
const ( DecimalReturnTypeDoubleOrLong DecimalReturnType = "DOUBLE_OR_LONG" DecimalReturnTypeString DecimalReturnType = "STRING" )
Enum values for DecimalReturnType
func (DecimalReturnType) MarshalValue ¶ added in v0.13.0
func (enum DecimalReturnType) MarshalValue() (string, error)
func (DecimalReturnType) MarshalValueBuf ¶ added in v0.13.0
func (enum DecimalReturnType) MarshalValueBuf(b []byte) ([]byte, error)
type ExecuteSqlInput ¶
type ExecuteSqlInput struct { // The Amazon Resource Name (ARN) of the secret that enables access to the DB // cluster. // // AwsSecretStoreArn is a required field AwsSecretStoreArn *string `locationName:"awsSecretStoreArn" min:"11" type:"string" required:"true"` // The name of the database. Database *string `locationName:"database" type:"string"` // The ARN of the Aurora Serverless DB cluster. // // DbClusterOrInstanceArn is a required field DbClusterOrInstanceArn *string `locationName:"dbClusterOrInstanceArn" min:"11" type:"string" required:"true"` // The name of the database schema. Schema *string `locationName:"schema" type:"string"` // One or more SQL statements to run on the DB cluster. // // You can separate SQL statements from each other with a semicolon (;). Any // valid SQL statement is permitted, including data definition, data manipulation, // and commit statements. // // SqlStatements is a required field SqlStatements *string `locationName:"sqlStatements" type:"string" required:"true"` // contains filtered or unexported fields }
The request parameters represent the input of a request to run one or more SQL statements.
func (ExecuteSqlInput) MarshalFields ¶
func (s ExecuteSqlInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteSqlInput) String ¶
func (s ExecuteSqlInput) String() string
String returns the string representation
func (*ExecuteSqlInput) Validate ¶
func (s *ExecuteSqlInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ExecuteSqlOutput ¶
type ExecuteSqlOutput struct { // The results of the SQL statement or statements. SqlStatementResults []SqlStatementResult `locationName:"sqlStatementResults" type:"list"` // contains filtered or unexported fields }
The response elements represent the output of a request to run one or more SQL statements.
func (ExecuteSqlOutput) MarshalFields ¶
func (s ExecuteSqlOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteSqlOutput) String ¶
func (s ExecuteSqlOutput) String() string
String returns the string representation
type ExecuteSqlRequest ¶
type ExecuteSqlRequest struct { *aws.Request Input *ExecuteSqlInput Copy func(*ExecuteSqlInput) ExecuteSqlRequest }
ExecuteSqlRequest is the request type for the ExecuteSql API operation.
func (ExecuteSqlRequest) Send ¶
func (r ExecuteSqlRequest) Send(ctx context.Context) (*ExecuteSqlResponse, error)
Send marshals and sends the ExecuteSql API request.
type ExecuteSqlResponse ¶
type ExecuteSqlResponse struct { *ExecuteSqlOutput // contains filtered or unexported fields }
ExecuteSqlResponse is the response type for the ExecuteSql API operation.
func (*ExecuteSqlResponse) SDKResponseMetdata ¶
func (r *ExecuteSqlResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the ExecuteSql request.
type ExecuteStatementInput ¶ added in v0.10.0
type ExecuteStatementInput struct { // 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. ContinueAfterTimeout *bool `locationName:"continueAfterTimeout" type:"boolean"` // The name of the database. Database *string `locationName:"database" type:"string"` // A value that indicates whether to include metadata in the results. IncludeResultMetadata *bool `locationName:"includeResultMetadata" type:"boolean"` // The parameters for the SQL statement. Parameters []SqlParameter `locationName:"parameters" type:"list"` // The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" min:"11" type:"string" required:"true"` // Options that control how the result set is returned. ResultSetOptions *ResultSetOptions `locationName:"resultSetOptions" type:"structure"` // The name of the database schema. Schema *string `locationName:"schema" type:"string"` // The name or ARN of the secret that enables access to the DB cluster. // // SecretArn is a required field SecretArn *string `locationName:"secretArn" min:"11" type:"string" required:"true"` // The SQL statement to run. // // Sql is a required field Sql *string `locationName:"sql" type:"string" required:"true"` // 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. TransactionId *string `locationName:"transactionId" type:"string"` // contains filtered or unexported fields }
The request parameters represent the input of a request to run a SQL statement against a database.
func (ExecuteStatementInput) MarshalFields ¶ added in v0.10.0
func (s ExecuteStatementInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteStatementInput) String ¶ added in v0.10.0
func (s ExecuteStatementInput) String() string
String returns the string representation
func (*ExecuteStatementInput) Validate ¶ added in v0.10.0
func (s *ExecuteStatementInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ExecuteStatementOutput ¶ added in v0.10.0
type ExecuteStatementOutput struct { // Metadata for the columns included in the results. ColumnMetadata []ColumnMetadata `locationName:"columnMetadata" type:"list"` // Values for fields generated during the request. // // <note> <p>The <code>generatedFields</code> data isn't supported by Aurora // PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> // clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning // Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note> GeneratedFields []Field `locationName:"generatedFields" type:"list"` // The number of records updated by the request. NumberOfRecordsUpdated *int64 `locationName:"numberOfRecordsUpdated" type:"long"` // The records returned by the SQL statement. Records [][]Field `locationName:"records" type:"list"` // contains filtered or unexported fields }
The response elements represent the output of a request to run a SQL statement against a database.
func (ExecuteStatementOutput) MarshalFields ¶ added in v0.10.0
func (s ExecuteStatementOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteStatementOutput) String ¶ added in v0.10.0
func (s ExecuteStatementOutput) String() string
String returns the string representation
type ExecuteStatementRequest ¶ added in v0.10.0
type ExecuteStatementRequest struct { *aws.Request Input *ExecuteStatementInput Copy func(*ExecuteStatementInput) ExecuteStatementRequest }
ExecuteStatementRequest is the request type for the ExecuteStatement API operation.
func (ExecuteStatementRequest) Send ¶ added in v0.10.0
func (r ExecuteStatementRequest) Send(ctx context.Context) (*ExecuteStatementResponse, error)
Send marshals and sends the ExecuteStatement API request.
type ExecuteStatementResponse ¶ added in v0.10.0
type ExecuteStatementResponse struct { *ExecuteStatementOutput // contains filtered or unexported fields }
ExecuteStatementResponse is the response type for the ExecuteStatement API operation.
func (*ExecuteStatementResponse) SDKResponseMetdata ¶ added in v0.10.0
func (r *ExecuteStatementResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the ExecuteStatement request.
type Field ¶ added in v0.10.0
type Field struct { // An array of values. ArrayValue *ArrayValue `locationName:"arrayValue" type:"structure"` // A value of BLOB data type. // // BlobValue is automatically base64 encoded/decoded by the SDK. BlobValue []byte `locationName:"blobValue" type:"blob"` // A value of Boolean data type. BooleanValue *bool `locationName:"booleanValue" type:"boolean"` // A value of double data type. DoubleValue *float64 `locationName:"doubleValue" type:"double"` // A NULL value. IsNull *bool `locationName:"isNull" type:"boolean"` // A value of long data type. LongValue *int64 `locationName:"longValue" type:"long"` // A value of string data type. StringValue *string `locationName:"stringValue" type:"string"` // contains filtered or unexported fields }
Contains a value.
func (Field) MarshalFields ¶ added in v0.10.0
func (s Field) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
type Record ¶
type Record struct { // The values returned in the record. Values []Value `locationName:"values" type:"list"` // contains filtered or unexported fields }
A record returned by a call.
func (Record) MarshalFields ¶
func (s Record) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
type ResultFrame ¶
type ResultFrame struct { // The records in the result set. Records []Record `locationName:"records" type:"list"` // The result-set metadata in the result set. ResultSetMetadata *ResultSetMetadata `locationName:"resultSetMetadata" type:"structure"` // contains filtered or unexported fields }
The result set returned by a SQL statement.
func (ResultFrame) MarshalFields ¶
func (s ResultFrame) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ResultFrame) String ¶
func (s ResultFrame) String() string
String returns the string representation
type ResultSetMetadata ¶
type ResultSetMetadata struct { // The number of columns in the result set. ColumnCount *int64 `locationName:"columnCount" type:"long"` // The metadata of the columns in the result set. ColumnMetadata []ColumnMetadata `locationName:"columnMetadata" type:"list"` // contains filtered or unexported fields }
The metadata of the result set returned by a SQL statement.
func (ResultSetMetadata) MarshalFields ¶
func (s ResultSetMetadata) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ResultSetMetadata) String ¶
func (s ResultSetMetadata) String() string
String returns the string representation
type ResultSetOptions ¶ added in v0.13.0
type ResultSetOptions struct { // A value that indicates how a field of DECIMAL type is represented in the // response. The value of STRING, the default, specifies that it is converted // to a String value. The value of DOUBLE_OR_LONG specifies that it is converted // to a Long value if its scale is 0, or to a Double value otherwise. // // Conversion to Double or Long can result in roundoff errors due to precision // loss. We recommend converting to String, especially when working with currency // values. DecimalReturnType DecimalReturnType `locationName:"decimalReturnType" type:"string" enum:"true"` // contains filtered or unexported fields }
Options that control how the result set is returned.
func (ResultSetOptions) MarshalFields ¶ added in v0.13.0
func (s ResultSetOptions) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ResultSetOptions) String ¶ added in v0.13.0
func (s ResultSetOptions) String() string
String returns the string representation
type RollbackTransactionInput ¶ added in v0.10.0
type RollbackTransactionInput struct { // The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" min:"11" type:"string" required:"true"` // The name or ARN of the secret that enables access to the DB cluster. // // SecretArn is a required field SecretArn *string `locationName:"secretArn" min:"11" type:"string" required:"true"` // The identifier of the transaction to roll back. // // TransactionId is a required field TransactionId *string `locationName:"transactionId" type:"string" required:"true"` // contains filtered or unexported fields }
The request parameters represent the input of a request to perform a rollback of a transaction.
func (RollbackTransactionInput) MarshalFields ¶ added in v0.10.0
func (s RollbackTransactionInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (RollbackTransactionInput) String ¶ added in v0.10.0
func (s RollbackTransactionInput) String() string
String returns the string representation
func (*RollbackTransactionInput) Validate ¶ added in v0.10.0
func (s *RollbackTransactionInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type RollbackTransactionOutput ¶ added in v0.10.0
type RollbackTransactionOutput struct { // The status of the rollback operation. TransactionStatus *string `locationName:"transactionStatus" type:"string"` // contains filtered or unexported fields }
The response elements represent the output of a request to perform a rollback of a transaction.
func (RollbackTransactionOutput) MarshalFields ¶ added in v0.10.0
func (s RollbackTransactionOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (RollbackTransactionOutput) String ¶ added in v0.10.0
func (s RollbackTransactionOutput) String() string
String returns the string representation
type RollbackTransactionRequest ¶ added in v0.10.0
type RollbackTransactionRequest struct { *aws.Request Input *RollbackTransactionInput Copy func(*RollbackTransactionInput) RollbackTransactionRequest }
RollbackTransactionRequest is the request type for the RollbackTransaction API operation.
func (RollbackTransactionRequest) Send ¶ added in v0.10.0
func (r RollbackTransactionRequest) Send(ctx context.Context) (*RollbackTransactionResponse, error)
Send marshals and sends the RollbackTransaction API request.
type RollbackTransactionResponse ¶ added in v0.10.0
type RollbackTransactionResponse struct { *RollbackTransactionOutput // contains filtered or unexported fields }
RollbackTransactionResponse is the response type for the RollbackTransaction API operation.
func (*RollbackTransactionResponse) SDKResponseMetdata ¶ added in v0.10.0
func (r *RollbackTransactionResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the RollbackTransaction request.
type SqlParameter ¶ added in v0.10.0
type SqlParameter struct { // The name of the parameter. Name *string `locationName:"name" type:"string"` // The value of the parameter. Value *Field `locationName:"value" type:"structure"` // contains filtered or unexported fields }
A parameter used in a SQL statement.
func (SqlParameter) MarshalFields ¶ added in v0.10.0
func (s SqlParameter) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (SqlParameter) String ¶ added in v0.10.0
func (s SqlParameter) String() string
String returns the string representation
type SqlStatementResult ¶
type SqlStatementResult struct { // The number of records updated by a SQL statement. NumberOfRecordsUpdated *int64 `locationName:"numberOfRecordsUpdated" type:"long"` // The result set of the SQL statement. ResultFrame *ResultFrame `locationName:"resultFrame" type:"structure"` // contains filtered or unexported fields }
The result of a SQL statement.
<important> <p>This data type is deprecated.</p> </important>
func (SqlStatementResult) MarshalFields ¶
func (s SqlStatementResult) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (SqlStatementResult) String ¶
func (s SqlStatementResult) String() string
String returns the string representation
type StructValue ¶
type StructValue struct { // The attributes returned in the record. Attributes []Value `locationName:"attributes" type:"list"` // contains filtered or unexported fields }
A structure value returned by a call.
func (StructValue) MarshalFields ¶
func (s StructValue) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (StructValue) String ¶
func (s StructValue) String() string
String returns the string representation
type UpdateResult ¶ added in v0.10.0
type UpdateResult struct { // Values for fields generated during the request. GeneratedFields []Field `locationName:"generatedFields" type:"list"` // contains filtered or unexported fields }
The response elements represent the results of an update.
func (UpdateResult) MarshalFields ¶ added in v0.10.0
func (s UpdateResult) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (UpdateResult) String ¶ added in v0.10.0
func (s UpdateResult) String() string
String returns the string representation
type Value ¶
type Value struct { // An array of column values. ArrayValues []Value `locationName:"arrayValues" type:"list"` // A value for a column of big integer data type. BigIntValue *int64 `locationName:"bigIntValue" type:"long"` // A value for a column of BIT data type. BitValue *bool `locationName:"bitValue" type:"boolean"` // A value for a column of BLOB data type. // // BlobValue is automatically base64 encoded/decoded by the SDK. BlobValue []byte `locationName:"blobValue" type:"blob"` // A value for a column of double data type. DoubleValue *float64 `locationName:"doubleValue" type:"double"` // A value for a column of integer data type. IntValue *int64 `locationName:"intValue" type:"integer"` // A NULL value. IsNull *bool `locationName:"isNull" type:"boolean"` // A value for a column of real data type. RealValue *float64 `locationName:"realValue" type:"float"` // A value for a column of string data type. StringValue *string `locationName:"stringValue" type:"string"` // A value for a column of STRUCT data type. StructValue *StructValue `locationName:"structValue" type:"structure"` // contains filtered or unexported fields }
Contains the value of a column.
<important> <p>This data type is deprecated.</p> </important>
func (Value) MarshalFields ¶
func (s Value) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package rdsdataiface provides an interface to enable mocking the AWS RDS DataService service client for testing your code.
|
Package rdsdataiface provides an interface to enable mocking the AWS RDS DataService service client for testing your code. |