libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-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.RedshiftData.GetStatementResult

Description

Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.

This operation returns paginated results.

Synopsis

Creating a Request

data GetStatementResult Source #

See: newGetStatementResult smart constructor.

Constructors

GetStatementResult' 

Fields

  • nextToken :: Maybe Text

    A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

  • id :: Text

    The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.

Instances

Instances details
Eq GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Read GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Show GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Generic GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type Rep GetStatementResult :: Type -> Type #

NFData GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Methods

rnf :: GetStatementResult -> () #

Hashable GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToJSON GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

AWSPager GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

AWSRequest GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type AWSResponse GetStatementResult #

ToHeaders GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToPath GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToQuery GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResult = D1 ('MetaData "GetStatementResult" "Amazonka.RedshiftData.GetStatementResult" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "GetStatementResult'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

newGetStatementResult Source #

Create a value of GetStatementResult 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:nextToken:GetStatementResult', getStatementResult_nextToken - A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

$sel:id:GetStatementResult', getStatementResult_id - The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.

Request Lenses

getStatementResult_nextToken :: Lens' GetStatementResult (Maybe Text) Source #

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

getStatementResult_id :: Lens' GetStatementResult Text Source #

The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.

Destructuring the Response

data GetStatementResultResponse Source #

See: newGetStatementResultResponse smart constructor.

Constructors

GetStatementResultResponse' 

Fields

  • totalNumRows :: Maybe Integer

    The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results.

  • nextToken :: Maybe Text

    A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

  • columnMetadata :: Maybe [ColumnMetadata]

    The properties (metadata) of a column.

  • httpStatus :: Int

    The response's http status code.

  • records :: [[Field]]

    The results of the SQL statement.

Instances

Instances details
Eq GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Read GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Show GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Generic GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type Rep GetStatementResultResponse :: Type -> Type #

NFData GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResultResponse = D1 ('MetaData "GetStatementResultResponse" "Amazonka.RedshiftData.GetStatementResult" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "GetStatementResultResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "totalNumRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "columnMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ColumnMetadata])) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "records") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [[Field]])))))

newGetStatementResultResponse Source #

Create a value of GetStatementResultResponse 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:totalNumRows:GetStatementResultResponse', getStatementResultResponse_totalNumRows - The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results.

$sel:nextToken:GetStatementResult', getStatementResultResponse_nextToken - A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

$sel:columnMetadata:GetStatementResultResponse', getStatementResultResponse_columnMetadata - The properties (metadata) of a column.

$sel:httpStatus:GetStatementResultResponse', getStatementResultResponse_httpStatus - The response's http status code.

$sel:records:GetStatementResultResponse', getStatementResultResponse_records - The results of the SQL statement.

Response Lenses

getStatementResultResponse_totalNumRows :: Lens' GetStatementResultResponse (Maybe Integer) Source #

The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results.

getStatementResultResponse_nextToken :: Lens' GetStatementResultResponse (Maybe Text) Source #

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.