@aws-sdk/client-redshift-data 3.32.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/{dist/cjs → dist-cjs}/RedshiftData.js +1 -2
- package/{dist/cjs → dist-cjs}/RedshiftDataClient.js +8 -9
- package/{dist/cjs → dist-cjs}/commands/BatchExecuteStatementCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/CancelStatementCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/DescribeStatementCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/DescribeTableCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/ExecuteStatementCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/GetStatementResultCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/ListDatabasesCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/ListSchemasCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/ListStatementsCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/commands/ListTablesCommand.js +2 -3
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/DescribeTablePaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/pagination/GetStatementResultPaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListDatabasesPaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/pagination/ListSchemasPaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/pagination/ListStatementsPaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/pagination/ListTablesPaginator.js +1 -2
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -1
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
- package/{dist/es → dist-es}/RedshiftData.js +2 -10
- package/{dist/es → dist-es}/RedshiftDataClient.js +2 -15
- package/dist-es/commands/BatchExecuteStatementCommand.js +39 -0
- package/{dist/es → dist-es}/commands/CancelStatementCommand.js +4 -30
- package/{dist/es → dist-es}/commands/DescribeStatementCommand.js +4 -32
- package/dist-es/commands/DescribeTableCommand.js +39 -0
- package/dist-es/commands/ExecuteStatementCommand.js +39 -0
- package/{dist/es → dist-es}/commands/GetStatementResultCommand.js +4 -31
- package/dist-es/commands/ListDatabasesCommand.js +39 -0
- package/dist-es/commands/ListSchemasCommand.js +39 -0
- package/{dist/es → dist-es}/commands/ListStatementsCommand.js +4 -31
- package/dist-es/commands/ListTablesCommand.js +39 -0
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -97
- package/{dist/es → dist-es}/pagination/DescribeTablePaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/GetStatementResultPaginator.js +17 -30
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListDatabasesPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListSchemasPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListStatementsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListTablesPaginator.js +17 -30
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +178 -184
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/RedshiftData.d.ts +2 -2
- package/{dist/types → dist-types}/RedshiftDataClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/BatchExecuteStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/CancelStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeTableCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ExecuteStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetStatementResultCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListDatabasesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListSchemasCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListStatementsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListTablesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/DescribeTablePaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/GetStatementResultPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListDatabasesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListStatementsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTablesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +1 -0
- package/{dist/types/ts3.4 → dist-types}/runtimeConfig.d.ts +37 -36
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +1 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/RedshiftData.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/RedshiftDataClient.d.ts +8 -8
- package/{dist/types → dist-types}/ts3.4/commands/BatchExecuteStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/CancelStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/DescribeStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/DescribeTableCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/ExecuteStatementCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/GetStatementResultCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/ListDatabasesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/ListSchemasCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/ListStatementsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/commands/ListTablesCommand.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/pagination/DescribeTablePaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/GetStatementResultPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListDatabasesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListSchemasPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListStatementsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTablesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/{dist/types → dist-types/ts3.4}/runtimeConfig.d.ts +37 -36
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
- package/package.json +52 -49
- package/RedshiftData.ts +0 -451
- package/RedshiftDataClient.ts +0 -272
- package/commands/BatchExecuteStatementCommand.ts +0 -108
- package/commands/CancelStatementCommand.ts +0 -94
- package/commands/DescribeStatementCommand.ts +0 -96
- package/commands/DescribeTableCommand.ts +0 -109
- package/commands/ExecuteStatementCommand.ts +0 -108
- package/commands/GetStatementResultCommand.ts +0 -95
- package/commands/ListDatabasesCommand.ts +0 -108
- package/commands/ListSchemasCommand.ts +0 -108
- package/commands/ListStatementsCommand.ts +0 -95
- package/commands/ListTablesCommand.ts +0 -109
- package/dist/cjs/RedshiftData.js.map +0 -1
- package/dist/cjs/RedshiftDataClient.js.map +0 -1
- package/dist/cjs/commands/BatchExecuteStatementCommand.js.map +0 -1
- package/dist/cjs/commands/CancelStatementCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeStatementCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeTableCommand.js.map +0 -1
- package/dist/cjs/commands/ExecuteStatementCommand.js.map +0 -1
- package/dist/cjs/commands/GetStatementResultCommand.js.map +0 -1
- package/dist/cjs/commands/ListDatabasesCommand.js.map +0 -1
- package/dist/cjs/commands/ListSchemasCommand.js.map +0 -1
- package/dist/cjs/commands/ListStatementsCommand.js.map +0 -1
- package/dist/cjs/commands/ListTablesCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/pagination/DescribeTablePaginator.js.map +0 -1
- package/dist/cjs/pagination/GetStatementResultPaginator.js.map +0 -1
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListDatabasesPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListStatementsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTablesPaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/RedshiftData.js.map +0 -1
- package/dist/es/RedshiftDataClient.js.map +0 -1
- package/dist/es/commands/BatchExecuteStatementCommand.js +0 -79
- package/dist/es/commands/BatchExecuteStatementCommand.js.map +0 -1
- package/dist/es/commands/CancelStatementCommand.js.map +0 -1
- package/dist/es/commands/DescribeStatementCommand.js.map +0 -1
- package/dist/es/commands/DescribeTableCommand.js +0 -80
- package/dist/es/commands/DescribeTableCommand.js.map +0 -1
- package/dist/es/commands/ExecuteStatementCommand.js +0 -79
- package/dist/es/commands/ExecuteStatementCommand.js.map +0 -1
- package/dist/es/commands/GetStatementResultCommand.js.map +0 -1
- package/dist/es/commands/ListDatabasesCommand.js +0 -79
- package/dist/es/commands/ListDatabasesCommand.js.map +0 -1
- package/dist/es/commands/ListSchemasCommand.js +0 -79
- package/dist/es/commands/ListSchemasCommand.js.map +0 -1
- package/dist/es/commands/ListStatementsCommand.js.map +0 -1
- package/dist/es/commands/ListTablesCommand.js +0 -80
- package/dist/es/commands/ListTablesCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -21
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/pagination/DescribeTablePaginator.js.map +0 -1
- package/dist/es/pagination/GetStatementResultPaginator.js.map +0 -1
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListDatabasesPaginator.js.map +0 -1
- package/dist/es/pagination/ListSchemasPaginator.js.map +0 -1
- package/dist/es/pagination/ListStatementsPaginator.js.map +0 -1
- package/dist/es/pagination/ListTablesPaginator.js.map +0 -1
- package/dist/es/protocols/Aws_json1_1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1379
- package/pagination/DescribeTablePaginator.ts +0 -58
- package/pagination/GetStatementResultPaginator.ts +0 -57
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListDatabasesPaginator.ts +0 -58
- package/pagination/ListSchemasPaginator.ts +0 -54
- package/pagination/ListStatementsPaginator.ts +0 -58
- package/pagination/ListTablesPaginator.ts +0 -54
- package/protocols/Aws_json1_1.ts +0 -1614
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import {
|
|
4
|
-
DescribeTableCommand,
|
|
5
|
-
DescribeTableCommandInput,
|
|
6
|
-
DescribeTableCommandOutput,
|
|
7
|
-
} from "../commands/DescribeTableCommand";
|
|
8
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: RedshiftDataClient,
|
|
16
|
-
input: DescribeTableCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new DescribeTableCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: RedshiftData,
|
|
27
|
-
input: DescribeTableCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<DescribeTableCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.describeTable(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateDescribeTable(
|
|
34
|
-
config: RedshiftDataPaginationConfiguration,
|
|
35
|
-
input: DescribeTableCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<DescribeTableCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: DescribeTableCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
input["MaxResults"] = config.pageSize;
|
|
45
|
-
if (config.client instanceof RedshiftData) {
|
|
46
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
47
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
48
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
49
|
-
} else {
|
|
50
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
51
|
-
}
|
|
52
|
-
yield page;
|
|
53
|
-
token = page.NextToken;
|
|
54
|
-
hasNext = !!token;
|
|
55
|
-
}
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import {
|
|
4
|
-
GetStatementResultCommand,
|
|
5
|
-
GetStatementResultCommandInput,
|
|
6
|
-
GetStatementResultCommandOutput,
|
|
7
|
-
} from "../commands/GetStatementResultCommand";
|
|
8
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: RedshiftDataClient,
|
|
16
|
-
input: GetStatementResultCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<GetStatementResultCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new GetStatementResultCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: RedshiftData,
|
|
27
|
-
input: GetStatementResultCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<GetStatementResultCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.getStatementResult(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateGetStatementResult(
|
|
34
|
-
config: RedshiftDataPaginationConfiguration,
|
|
35
|
-
input: GetStatementResultCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<GetStatementResultCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: GetStatementResultCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
if (config.client instanceof RedshiftData) {
|
|
45
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
47
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else {
|
|
49
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
50
|
-
}
|
|
51
|
-
yield page;
|
|
52
|
-
token = page.NextToken;
|
|
53
|
-
hasNext = !!token;
|
|
54
|
-
}
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
package/pagination/Interfaces.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
4
|
-
|
|
5
|
-
export interface RedshiftDataPaginationConfiguration extends PaginationConfiguration {
|
|
6
|
-
client: RedshiftData | RedshiftDataClient;
|
|
7
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import {
|
|
4
|
-
ListDatabasesCommand,
|
|
5
|
-
ListDatabasesCommandInput,
|
|
6
|
-
ListDatabasesCommandOutput,
|
|
7
|
-
} from "../commands/ListDatabasesCommand";
|
|
8
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: RedshiftDataClient,
|
|
16
|
-
input: ListDatabasesCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new ListDatabasesCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: RedshiftData,
|
|
27
|
-
input: ListDatabasesCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<ListDatabasesCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.listDatabases(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateListDatabases(
|
|
34
|
-
config: RedshiftDataPaginationConfiguration,
|
|
35
|
-
input: ListDatabasesCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<ListDatabasesCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: ListDatabasesCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
input["MaxResults"] = config.pageSize;
|
|
45
|
-
if (config.client instanceof RedshiftData) {
|
|
46
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
47
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
48
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
49
|
-
} else {
|
|
50
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
51
|
-
}
|
|
52
|
-
yield page;
|
|
53
|
-
token = page.NextToken;
|
|
54
|
-
hasNext = !!token;
|
|
55
|
-
}
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import { ListSchemasCommand, ListSchemasCommandInput, ListSchemasCommandOutput } from "../commands/ListSchemasCommand";
|
|
4
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
5
|
-
import { Paginator } from "@aws-sdk/types";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const makePagedClientRequest = async (
|
|
11
|
-
client: RedshiftDataClient,
|
|
12
|
-
input: ListSchemasCommandInput,
|
|
13
|
-
...args: any
|
|
14
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
return await client.send(new ListSchemasCommand(input), ...args);
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
const makePagedRequest = async (
|
|
22
|
-
client: RedshiftData,
|
|
23
|
-
input: ListSchemasCommandInput,
|
|
24
|
-
...args: any
|
|
25
|
-
): Promise<ListSchemasCommandOutput> => {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
return await client.listSchemas(input, ...args);
|
|
28
|
-
};
|
|
29
|
-
export async function* paginateListSchemas(
|
|
30
|
-
config: RedshiftDataPaginationConfiguration,
|
|
31
|
-
input: ListSchemasCommandInput,
|
|
32
|
-
...additionalArguments: any
|
|
33
|
-
): Paginator<ListSchemasCommandOutput> {
|
|
34
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
35
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
36
|
-
let hasNext = true;
|
|
37
|
-
let page: ListSchemasCommandOutput;
|
|
38
|
-
while (hasNext) {
|
|
39
|
-
input.NextToken = token;
|
|
40
|
-
input["MaxResults"] = config.pageSize;
|
|
41
|
-
if (config.client instanceof RedshiftData) {
|
|
42
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
43
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
44
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
45
|
-
} else {
|
|
46
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
47
|
-
}
|
|
48
|
-
yield page;
|
|
49
|
-
token = page.NextToken;
|
|
50
|
-
hasNext = !!token;
|
|
51
|
-
}
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import {
|
|
4
|
-
ListStatementsCommand,
|
|
5
|
-
ListStatementsCommandInput,
|
|
6
|
-
ListStatementsCommandOutput,
|
|
7
|
-
} from "../commands/ListStatementsCommand";
|
|
8
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: RedshiftDataClient,
|
|
16
|
-
input: ListStatementsCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<ListStatementsCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new ListStatementsCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: RedshiftData,
|
|
27
|
-
input: ListStatementsCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<ListStatementsCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.listStatements(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateListStatements(
|
|
34
|
-
config: RedshiftDataPaginationConfiguration,
|
|
35
|
-
input: ListStatementsCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<ListStatementsCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: ListStatementsCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
input["MaxResults"] = config.pageSize;
|
|
45
|
-
if (config.client instanceof RedshiftData) {
|
|
46
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
47
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
48
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
49
|
-
} else {
|
|
50
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
51
|
-
}
|
|
52
|
-
yield page;
|
|
53
|
-
token = page.NextToken;
|
|
54
|
-
hasNext = !!token;
|
|
55
|
-
}
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { RedshiftData } from "../RedshiftData";
|
|
2
|
-
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
3
|
-
import { ListTablesCommand, ListTablesCommandInput, ListTablesCommandOutput } from "../commands/ListTablesCommand";
|
|
4
|
-
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
5
|
-
import { Paginator } from "@aws-sdk/types";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const makePagedClientRequest = async (
|
|
11
|
-
client: RedshiftDataClient,
|
|
12
|
-
input: ListTablesCommandInput,
|
|
13
|
-
...args: any
|
|
14
|
-
): Promise<ListTablesCommandOutput> => {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
return await client.send(new ListTablesCommand(input), ...args);
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
const makePagedRequest = async (
|
|
22
|
-
client: RedshiftData,
|
|
23
|
-
input: ListTablesCommandInput,
|
|
24
|
-
...args: any
|
|
25
|
-
): Promise<ListTablesCommandOutput> => {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
return await client.listTables(input, ...args);
|
|
28
|
-
};
|
|
29
|
-
export async function* paginateListTables(
|
|
30
|
-
config: RedshiftDataPaginationConfiguration,
|
|
31
|
-
input: ListTablesCommandInput,
|
|
32
|
-
...additionalArguments: any
|
|
33
|
-
): Paginator<ListTablesCommandOutput> {
|
|
34
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
35
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
36
|
-
let hasNext = true;
|
|
37
|
-
let page: ListTablesCommandOutput;
|
|
38
|
-
while (hasNext) {
|
|
39
|
-
input.NextToken = token;
|
|
40
|
-
input["MaxResults"] = config.pageSize;
|
|
41
|
-
if (config.client instanceof RedshiftData) {
|
|
42
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
43
|
-
} else if (config.client instanceof RedshiftDataClient) {
|
|
44
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
45
|
-
} else {
|
|
46
|
-
throw new Error("Invalid client, expected RedshiftData | RedshiftDataClient");
|
|
47
|
-
}
|
|
48
|
-
yield page;
|
|
49
|
-
token = page.NextToken;
|
|
50
|
-
hasNext = !!token;
|
|
51
|
-
}
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|