@aws-sdk/client-redshift-data 3.312.0 → 3.316.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.
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand";
2
3
  import { CancelStatementCommand, } from "./commands/CancelStatementCommand";
3
4
  import { DescribeStatementCommand, } from "./commands/DescribeStatementCommand";
@@ -9,145 +10,18 @@ import { ListSchemasCommand } from "./commands/ListSchemasCommand";
9
10
  import { ListStatementsCommand, } from "./commands/ListStatementsCommand";
10
11
  import { ListTablesCommand } from "./commands/ListTablesCommand";
11
12
  import { RedshiftDataClient } from "./RedshiftDataClient";
13
+ const commands = {
14
+ BatchExecuteStatementCommand,
15
+ CancelStatementCommand,
16
+ DescribeStatementCommand,
17
+ DescribeTableCommand,
18
+ ExecuteStatementCommand,
19
+ GetStatementResultCommand,
20
+ ListDatabasesCommand,
21
+ ListSchemasCommand,
22
+ ListStatementsCommand,
23
+ ListTablesCommand,
24
+ };
12
25
  export class RedshiftData extends RedshiftDataClient {
13
- batchExecuteStatement(args, optionsOrCb, cb) {
14
- const command = new BatchExecuteStatementCommand(args);
15
- if (typeof optionsOrCb === "function") {
16
- this.send(command, optionsOrCb);
17
- }
18
- else if (typeof cb === "function") {
19
- if (typeof optionsOrCb !== "object")
20
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
21
- this.send(command, optionsOrCb || {}, cb);
22
- }
23
- else {
24
- return this.send(command, optionsOrCb);
25
- }
26
- }
27
- cancelStatement(args, optionsOrCb, cb) {
28
- const command = new CancelStatementCommand(args);
29
- if (typeof optionsOrCb === "function") {
30
- this.send(command, optionsOrCb);
31
- }
32
- else if (typeof cb === "function") {
33
- if (typeof optionsOrCb !== "object")
34
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
35
- this.send(command, optionsOrCb || {}, cb);
36
- }
37
- else {
38
- return this.send(command, optionsOrCb);
39
- }
40
- }
41
- describeStatement(args, optionsOrCb, cb) {
42
- const command = new DescribeStatementCommand(args);
43
- if (typeof optionsOrCb === "function") {
44
- this.send(command, optionsOrCb);
45
- }
46
- else if (typeof cb === "function") {
47
- if (typeof optionsOrCb !== "object")
48
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
49
- this.send(command, optionsOrCb || {}, cb);
50
- }
51
- else {
52
- return this.send(command, optionsOrCb);
53
- }
54
- }
55
- describeTable(args, optionsOrCb, cb) {
56
- const command = new DescribeTableCommand(args);
57
- if (typeof optionsOrCb === "function") {
58
- this.send(command, optionsOrCb);
59
- }
60
- else if (typeof cb === "function") {
61
- if (typeof optionsOrCb !== "object")
62
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
63
- this.send(command, optionsOrCb || {}, cb);
64
- }
65
- else {
66
- return this.send(command, optionsOrCb);
67
- }
68
- }
69
- executeStatement(args, optionsOrCb, cb) {
70
- const command = new ExecuteStatementCommand(args);
71
- if (typeof optionsOrCb === "function") {
72
- this.send(command, optionsOrCb);
73
- }
74
- else if (typeof cb === "function") {
75
- if (typeof optionsOrCb !== "object")
76
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
77
- this.send(command, optionsOrCb || {}, cb);
78
- }
79
- else {
80
- return this.send(command, optionsOrCb);
81
- }
82
- }
83
- getStatementResult(args, optionsOrCb, cb) {
84
- const command = new GetStatementResultCommand(args);
85
- if (typeof optionsOrCb === "function") {
86
- this.send(command, optionsOrCb);
87
- }
88
- else if (typeof cb === "function") {
89
- if (typeof optionsOrCb !== "object")
90
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
91
- this.send(command, optionsOrCb || {}, cb);
92
- }
93
- else {
94
- return this.send(command, optionsOrCb);
95
- }
96
- }
97
- listDatabases(args, optionsOrCb, cb) {
98
- const command = new ListDatabasesCommand(args);
99
- if (typeof optionsOrCb === "function") {
100
- this.send(command, optionsOrCb);
101
- }
102
- else if (typeof cb === "function") {
103
- if (typeof optionsOrCb !== "object")
104
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
105
- this.send(command, optionsOrCb || {}, cb);
106
- }
107
- else {
108
- return this.send(command, optionsOrCb);
109
- }
110
- }
111
- listSchemas(args, optionsOrCb, cb) {
112
- const command = new ListSchemasCommand(args);
113
- if (typeof optionsOrCb === "function") {
114
- this.send(command, optionsOrCb);
115
- }
116
- else if (typeof cb === "function") {
117
- if (typeof optionsOrCb !== "object")
118
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
119
- this.send(command, optionsOrCb || {}, cb);
120
- }
121
- else {
122
- return this.send(command, optionsOrCb);
123
- }
124
- }
125
- listStatements(args, optionsOrCb, cb) {
126
- const command = new ListStatementsCommand(args);
127
- if (typeof optionsOrCb === "function") {
128
- this.send(command, optionsOrCb);
129
- }
130
- else if (typeof cb === "function") {
131
- if (typeof optionsOrCb !== "object")
132
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
133
- this.send(command, optionsOrCb || {}, cb);
134
- }
135
- else {
136
- return this.send(command, optionsOrCb);
137
- }
138
- }
139
- listTables(args, optionsOrCb, cb) {
140
- const command = new ListTablesCommand(args);
141
- if (typeof optionsOrCb === "function") {
142
- this.send(command, optionsOrCb);
143
- }
144
- else if (typeof cb === "function") {
145
- if (typeof optionsOrCb !== "object")
146
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
147
- this.send(command, optionsOrCb || {}, cb);
148
- }
149
- else {
150
- return this.send(command, optionsOrCb);
151
- }
152
- }
153
26
  }
27
+ createAggregatedClient(commands, RedshiftData);