Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL.
Synopsis
- data ExecuteStatement = ExecuteStatement' {}
- newExecuteStatement :: Text -> ExecuteStatement
- executeStatement_consistentRead :: Lens' ExecuteStatement (Maybe Bool)
- executeStatement_nextToken :: Lens' ExecuteStatement (Maybe Text)
- executeStatement_parameters :: Lens' ExecuteStatement (Maybe (NonEmpty AttributeValue))
- executeStatement_statement :: Lens' ExecuteStatement Text
- data ExecuteStatementResponse = ExecuteStatementResponse' {
- items :: Maybe [HashMap Text AttributeValue]
- nextToken :: Maybe Text
- httpStatus :: Int
- newExecuteStatementResponse :: Int -> ExecuteStatementResponse
- executeStatementResponse_items :: Lens' ExecuteStatementResponse (Maybe [HashMap Text AttributeValue])
- executeStatementResponse_nextToken :: Lens' ExecuteStatementResponse (Maybe Text)
- executeStatementResponse_httpStatus :: Lens' ExecuteStatementResponse Int
Creating a Request
data ExecuteStatement Source #
See: newExecuteStatement
smart constructor.
ExecuteStatement' | |
|
Instances
Create a value of ExecuteStatement
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:consistentRead:ExecuteStatement'
, executeStatement_consistentRead
- The consistency of a read operation. If set to true
, then a strongly
consistent read is used; otherwise, an eventually consistent read is
used.
$sel:nextToken:ExecuteStatement'
, executeStatement_nextToken
- Set this value to get remaining results, if NextToken
was returned in
the statement response.
$sel:parameters:ExecuteStatement'
, executeStatement_parameters
- The parameters for the PartiQL statement, if any.
$sel:statement:ExecuteStatement'
, executeStatement_statement
- The PartiQL statement representing the operation to run.
Request Lenses
executeStatement_consistentRead :: Lens' ExecuteStatement (Maybe Bool) Source #
The consistency of a read operation. If set to true
, then a strongly
consistent read is used; otherwise, an eventually consistent read is
used.
executeStatement_nextToken :: Lens' ExecuteStatement (Maybe Text) Source #
Set this value to get remaining results, if NextToken
was returned in
the statement response.
executeStatement_parameters :: Lens' ExecuteStatement (Maybe (NonEmpty AttributeValue)) Source #
The parameters for the PartiQL statement, if any.
executeStatement_statement :: Lens' ExecuteStatement Text Source #
The PartiQL statement representing the operation to run.
Destructuring the Response
data ExecuteStatementResponse Source #
See: newExecuteStatementResponse
smart constructor.
ExecuteStatementResponse' | |
|
Instances
newExecuteStatementResponse Source #
Create a value of ExecuteStatementResponse
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:items:ExecuteStatementResponse'
, executeStatementResponse_items
- If a read operation was used, this property will contain the result of
the reade operation; a map of attribute names and their values. For the
write operations this value will be empty.
$sel:nextToken:ExecuteStatement'
, executeStatementResponse_nextToken
- If the response of a read request exceeds the response payload limit
DynamoDB will set this value in the response. If set, you can use that
this value in the subsequent request to get the remaining results.
$sel:httpStatus:ExecuteStatementResponse'
, executeStatementResponse_httpStatus
- The response's http status code.
Response Lenses
executeStatementResponse_items :: Lens' ExecuteStatementResponse (Maybe [HashMap Text AttributeValue]) Source #
If a read operation was used, this property will contain the result of the reade operation; a map of attribute names and their values. For the write operations this value will be empty.
executeStatementResponse_nextToken :: Lens' ExecuteStatementResponse (Maybe Text) Source #
If the response of a read request exceeds the response payload limit DynamoDB will set this value in the response. If set, you can use that this value in the subsequent request to get the remaining results.
executeStatementResponse_httpStatus :: Lens' ExecuteStatementResponse Int Source #
The response's http status code.