@aws-sdk/client-rds-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.
- package/dist-cjs/RDSData.js +10 -84
- package/dist-cjs/protocols/Aws_restJson1.js +146 -269
- package/dist-es/RDSData.js +10 -84
- package/dist-es/protocols/Aws_restJson1.js +134 -257
- package/dist-types/RDSData.d.ts +21 -59
- package/dist-types/ts3.4/RDSData.d.ts +2 -1
- package/package.json +6 -6
package/dist-cjs/RDSData.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RDSData = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const BatchExecuteStatementCommand_1 = require("./commands/BatchExecuteStatementCommand");
|
|
5
6
|
const BeginTransactionCommand_1 = require("./commands/BeginTransactionCommand");
|
|
6
7
|
const CommitTransactionCommand_1 = require("./commands/CommitTransactionCommand");
|
|
@@ -8,90 +9,15 @@ const ExecuteSqlCommand_1 = require("./commands/ExecuteSqlCommand");
|
|
|
8
9
|
const ExecuteStatementCommand_1 = require("./commands/ExecuteStatementCommand");
|
|
9
10
|
const RollbackTransactionCommand_1 = require("./commands/RollbackTransactionCommand");
|
|
10
11
|
const RDSDataClient_1 = require("./RDSDataClient");
|
|
12
|
+
const commands = {
|
|
13
|
+
BatchExecuteStatementCommand: BatchExecuteStatementCommand_1.BatchExecuteStatementCommand,
|
|
14
|
+
BeginTransactionCommand: BeginTransactionCommand_1.BeginTransactionCommand,
|
|
15
|
+
CommitTransactionCommand: CommitTransactionCommand_1.CommitTransactionCommand,
|
|
16
|
+
ExecuteSqlCommand: ExecuteSqlCommand_1.ExecuteSqlCommand,
|
|
17
|
+
ExecuteStatementCommand: ExecuteStatementCommand_1.ExecuteStatementCommand,
|
|
18
|
+
RollbackTransactionCommand: RollbackTransactionCommand_1.RollbackTransactionCommand,
|
|
19
|
+
};
|
|
11
20
|
class RDSData extends RDSDataClient_1.RDSDataClient {
|
|
12
|
-
batchExecuteStatement(args, optionsOrCb, cb) {
|
|
13
|
-
const command = new BatchExecuteStatementCommand_1.BatchExecuteStatementCommand(args);
|
|
14
|
-
if (typeof optionsOrCb === "function") {
|
|
15
|
-
this.send(command, optionsOrCb);
|
|
16
|
-
}
|
|
17
|
-
else if (typeof cb === "function") {
|
|
18
|
-
if (typeof optionsOrCb !== "object")
|
|
19
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
20
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return this.send(command, optionsOrCb);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
beginTransaction(args, optionsOrCb, cb) {
|
|
27
|
-
const command = new BeginTransactionCommand_1.BeginTransactionCommand(args);
|
|
28
|
-
if (typeof optionsOrCb === "function") {
|
|
29
|
-
this.send(command, optionsOrCb);
|
|
30
|
-
}
|
|
31
|
-
else if (typeof cb === "function") {
|
|
32
|
-
if (typeof optionsOrCb !== "object")
|
|
33
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
34
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return this.send(command, optionsOrCb);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
commitTransaction(args, optionsOrCb, cb) {
|
|
41
|
-
const command = new CommitTransactionCommand_1.CommitTransactionCommand(args);
|
|
42
|
-
if (typeof optionsOrCb === "function") {
|
|
43
|
-
this.send(command, optionsOrCb);
|
|
44
|
-
}
|
|
45
|
-
else if (typeof cb === "function") {
|
|
46
|
-
if (typeof optionsOrCb !== "object")
|
|
47
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
48
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return this.send(command, optionsOrCb);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
executeSql(args, optionsOrCb, cb) {
|
|
55
|
-
const command = new ExecuteSqlCommand_1.ExecuteSqlCommand(args);
|
|
56
|
-
if (typeof optionsOrCb === "function") {
|
|
57
|
-
this.send(command, optionsOrCb);
|
|
58
|
-
}
|
|
59
|
-
else if (typeof cb === "function") {
|
|
60
|
-
if (typeof optionsOrCb !== "object")
|
|
61
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
62
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
return this.send(command, optionsOrCb);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
executeStatement(args, optionsOrCb, cb) {
|
|
69
|
-
const command = new ExecuteStatementCommand_1.ExecuteStatementCommand(args);
|
|
70
|
-
if (typeof optionsOrCb === "function") {
|
|
71
|
-
this.send(command, optionsOrCb);
|
|
72
|
-
}
|
|
73
|
-
else if (typeof cb === "function") {
|
|
74
|
-
if (typeof optionsOrCb !== "object")
|
|
75
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
76
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
return this.send(command, optionsOrCb);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
rollbackTransaction(args, optionsOrCb, cb) {
|
|
83
|
-
const command = new RollbackTransactionCommand_1.RollbackTransactionCommand(args);
|
|
84
|
-
if (typeof optionsOrCb === "function") {
|
|
85
|
-
this.send(command, optionsOrCb);
|
|
86
|
-
}
|
|
87
|
-
else if (typeof cb === "function") {
|
|
88
|
-
if (typeof optionsOrCb !== "object")
|
|
89
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
90
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
return this.send(command, optionsOrCb);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
21
|
}
|
|
97
22
|
exports.RDSData = RDSData;
|
|
23
|
+
(0, smithy_client_1.createAggregatedClient)(commands, RDSData);
|