@aws-sdk/client-rds-data 3.310.0 → 3.315.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/protocols/Aws_restJson1.js +146 -269
- package/dist-es/protocols/Aws_restJson1.js +134 -257
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AccessDeniedException, ArrayValue, BadRequestException, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableError, StatementTimeoutException, } from "../models/models_0";
|
|
4
4
|
import { RDSDataServiceException as __BaseException } from "../models/RDSDataServiceException";
|
|
5
5
|
export const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
@@ -9,15 +9,15 @@ export const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchExecute";
|
|
11
11
|
let body;
|
|
12
|
-
body = JSON.stringify({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
database: [],
|
|
14
|
+
parameterSets: (_) => se_SqlParameterSets(_, context),
|
|
15
|
+
resourceArn: [],
|
|
16
|
+
schema: [],
|
|
17
|
+
secretArn: [],
|
|
18
|
+
sql: [],
|
|
19
|
+
transactionId: [],
|
|
20
|
+
}));
|
|
21
21
|
return new __HttpRequest({
|
|
22
22
|
protocol,
|
|
23
23
|
hostname,
|
|
@@ -35,12 +35,12 @@ export const se_BeginTransactionCommand = async (input, context) => {
|
|
|
35
35
|
};
|
|
36
36
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BeginTransaction";
|
|
37
37
|
let body;
|
|
38
|
-
body = JSON.stringify({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
38
|
+
body = JSON.stringify(take(input, {
|
|
39
|
+
database: [],
|
|
40
|
+
resourceArn: [],
|
|
41
|
+
schema: [],
|
|
42
|
+
secretArn: [],
|
|
43
|
+
}));
|
|
44
44
|
return new __HttpRequest({
|
|
45
45
|
protocol,
|
|
46
46
|
hostname,
|
|
@@ -58,11 +58,11 @@ export const se_CommitTransactionCommand = async (input, context) => {
|
|
|
58
58
|
};
|
|
59
59
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CommitTransaction";
|
|
60
60
|
let body;
|
|
61
|
-
body = JSON.stringify({
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
61
|
+
body = JSON.stringify(take(input, {
|
|
62
|
+
resourceArn: [],
|
|
63
|
+
secretArn: [],
|
|
64
|
+
transactionId: [],
|
|
65
|
+
}));
|
|
66
66
|
return new __HttpRequest({
|
|
67
67
|
protocol,
|
|
68
68
|
hostname,
|
|
@@ -80,13 +80,13 @@ export const se_ExecuteSqlCommand = async (input, context) => {
|
|
|
80
80
|
};
|
|
81
81
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExecuteSql";
|
|
82
82
|
let body;
|
|
83
|
-
body = JSON.stringify({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
83
|
+
body = JSON.stringify(take(input, {
|
|
84
|
+
awsSecretStoreArn: [],
|
|
85
|
+
database: [],
|
|
86
|
+
dbClusterOrInstanceArn: [],
|
|
87
|
+
schema: [],
|
|
88
|
+
sqlStatements: [],
|
|
89
|
+
}));
|
|
90
90
|
return new __HttpRequest({
|
|
91
91
|
protocol,
|
|
92
92
|
hostname,
|
|
@@ -104,19 +104,19 @@ export const se_ExecuteStatementCommand = async (input, context) => {
|
|
|
104
104
|
};
|
|
105
105
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Execute";
|
|
106
106
|
let body;
|
|
107
|
-
body = JSON.stringify({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
107
|
+
body = JSON.stringify(take(input, {
|
|
108
|
+
continueAfterTimeout: [],
|
|
109
|
+
database: [],
|
|
110
|
+
formatRecordsAs: [],
|
|
111
|
+
includeResultMetadata: [],
|
|
112
|
+
parameters: (_) => se_SqlParametersList(_, context),
|
|
113
|
+
resourceArn: [],
|
|
114
|
+
resultSetOptions: (_) => _json(_),
|
|
115
|
+
schema: [],
|
|
116
|
+
secretArn: [],
|
|
117
|
+
sql: [],
|
|
118
|
+
transactionId: [],
|
|
119
|
+
}));
|
|
120
120
|
return new __HttpRequest({
|
|
121
121
|
protocol,
|
|
122
122
|
hostname,
|
|
@@ -134,11 +134,11 @@ export const se_RollbackTransactionCommand = async (input, context) => {
|
|
|
134
134
|
};
|
|
135
135
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RollbackTransaction";
|
|
136
136
|
let body;
|
|
137
|
-
body = JSON.stringify({
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
});
|
|
137
|
+
body = JSON.stringify(take(input, {
|
|
138
|
+
resourceArn: [],
|
|
139
|
+
secretArn: [],
|
|
140
|
+
transactionId: [],
|
|
141
|
+
}));
|
|
142
142
|
return new __HttpRequest({
|
|
143
143
|
protocol,
|
|
144
144
|
hostname,
|
|
@@ -157,9 +157,10 @@ export const de_BatchExecuteStatementCommand = async (output, context) => {
|
|
|
157
157
|
$metadata: deserializeMetadata(output),
|
|
158
158
|
});
|
|
159
159
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
160
|
+
const doc = take(data, {
|
|
161
|
+
updateResults: (_) => de_UpdateResults(_, context),
|
|
162
|
+
});
|
|
163
|
+
Object.assign(contents, doc);
|
|
163
164
|
return contents;
|
|
164
165
|
};
|
|
165
166
|
const de_BatchExecuteStatementCommandError = async (output, context) => {
|
|
@@ -189,10 +190,9 @@ const de_BatchExecuteStatementCommandError = async (output, context) => {
|
|
|
189
190
|
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
190
191
|
default:
|
|
191
192
|
const parsedBody = parsedOutput.body;
|
|
192
|
-
throwDefaultError({
|
|
193
|
+
return throwDefaultError({
|
|
193
194
|
output,
|
|
194
195
|
parsedBody,
|
|
195
|
-
exceptionCtor: __BaseException,
|
|
196
196
|
errorCode,
|
|
197
197
|
});
|
|
198
198
|
}
|
|
@@ -205,9 +205,10 @@ export const de_BeginTransactionCommand = async (output, context) => {
|
|
|
205
205
|
$metadata: deserializeMetadata(output),
|
|
206
206
|
});
|
|
207
207
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
208
|
+
const doc = take(data, {
|
|
209
|
+
transactionId: __expectString,
|
|
210
|
+
});
|
|
211
|
+
Object.assign(contents, doc);
|
|
211
212
|
return contents;
|
|
212
213
|
};
|
|
213
214
|
const de_BeginTransactionCommandError = async (output, context) => {
|
|
@@ -237,10 +238,9 @@ const de_BeginTransactionCommandError = async (output, context) => {
|
|
|
237
238
|
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
238
239
|
default:
|
|
239
240
|
const parsedBody = parsedOutput.body;
|
|
240
|
-
throwDefaultError({
|
|
241
|
+
return throwDefaultError({
|
|
241
242
|
output,
|
|
242
243
|
parsedBody,
|
|
243
|
-
exceptionCtor: __BaseException,
|
|
244
244
|
errorCode,
|
|
245
245
|
});
|
|
246
246
|
}
|
|
@@ -253,9 +253,10 @@ export const de_CommitTransactionCommand = async (output, context) => {
|
|
|
253
253
|
$metadata: deserializeMetadata(output),
|
|
254
254
|
});
|
|
255
255
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
256
|
+
const doc = take(data, {
|
|
257
|
+
transactionStatus: __expectString,
|
|
258
|
+
});
|
|
259
|
+
Object.assign(contents, doc);
|
|
259
260
|
return contents;
|
|
260
261
|
};
|
|
261
262
|
const de_CommitTransactionCommandError = async (output, context) => {
|
|
@@ -288,10 +289,9 @@ const de_CommitTransactionCommandError = async (output, context) => {
|
|
|
288
289
|
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
289
290
|
default:
|
|
290
291
|
const parsedBody = parsedOutput.body;
|
|
291
|
-
throwDefaultError({
|
|
292
|
+
return throwDefaultError({
|
|
292
293
|
output,
|
|
293
294
|
parsedBody,
|
|
294
|
-
exceptionCtor: __BaseException,
|
|
295
295
|
errorCode,
|
|
296
296
|
});
|
|
297
297
|
}
|
|
@@ -304,9 +304,10 @@ export const de_ExecuteSqlCommand = async (output, context) => {
|
|
|
304
304
|
$metadata: deserializeMetadata(output),
|
|
305
305
|
});
|
|
306
306
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
}
|
|
307
|
+
const doc = take(data, {
|
|
308
|
+
sqlStatementResults: (_) => de_SqlStatementResults(_, context),
|
|
309
|
+
});
|
|
310
|
+
Object.assign(contents, doc);
|
|
310
311
|
return contents;
|
|
311
312
|
};
|
|
312
313
|
const de_ExecuteSqlCommandError = async (output, context) => {
|
|
@@ -333,10 +334,9 @@ const de_ExecuteSqlCommandError = async (output, context) => {
|
|
|
333
334
|
throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
|
|
334
335
|
default:
|
|
335
336
|
const parsedBody = parsedOutput.body;
|
|
336
|
-
throwDefaultError({
|
|
337
|
+
return throwDefaultError({
|
|
337
338
|
output,
|
|
338
339
|
parsedBody,
|
|
339
|
-
exceptionCtor: __BaseException,
|
|
340
340
|
errorCode,
|
|
341
341
|
});
|
|
342
342
|
}
|
|
@@ -349,21 +349,14 @@ export const de_ExecuteStatementCommand = async (output, context) => {
|
|
|
349
349
|
$metadata: deserializeMetadata(output),
|
|
350
350
|
});
|
|
351
351
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
if (data.numberOfRecordsUpdated != null) {
|
|
362
|
-
contents.numberOfRecordsUpdated = __expectLong(data.numberOfRecordsUpdated);
|
|
363
|
-
}
|
|
364
|
-
if (data.records != null) {
|
|
365
|
-
contents.records = de_SqlRecords(data.records, context);
|
|
366
|
-
}
|
|
352
|
+
const doc = take(data, {
|
|
353
|
+
columnMetadata: _json,
|
|
354
|
+
formattedRecords: __expectString,
|
|
355
|
+
generatedFields: (_) => de_FieldList(_, context),
|
|
356
|
+
numberOfRecordsUpdated: __expectLong,
|
|
357
|
+
records: (_) => de_SqlRecords(_, context),
|
|
358
|
+
});
|
|
359
|
+
Object.assign(contents, doc);
|
|
367
360
|
return contents;
|
|
368
361
|
};
|
|
369
362
|
const de_ExecuteStatementCommandError = async (output, context) => {
|
|
@@ -393,10 +386,9 @@ const de_ExecuteStatementCommandError = async (output, context) => {
|
|
|
393
386
|
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
394
387
|
default:
|
|
395
388
|
const parsedBody = parsedOutput.body;
|
|
396
|
-
throwDefaultError({
|
|
389
|
+
return throwDefaultError({
|
|
397
390
|
output,
|
|
398
391
|
parsedBody,
|
|
399
|
-
exceptionCtor: __BaseException,
|
|
400
392
|
errorCode,
|
|
401
393
|
});
|
|
402
394
|
}
|
|
@@ -409,9 +401,10 @@ export const de_RollbackTransactionCommand = async (output, context) => {
|
|
|
409
401
|
$metadata: deserializeMetadata(output),
|
|
410
402
|
});
|
|
411
403
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
404
|
+
const doc = take(data, {
|
|
405
|
+
transactionStatus: __expectString,
|
|
406
|
+
});
|
|
407
|
+
Object.assign(contents, doc);
|
|
415
408
|
return contents;
|
|
416
409
|
};
|
|
417
410
|
const de_RollbackTransactionCommandError = async (output, context) => {
|
|
@@ -444,21 +437,21 @@ const de_RollbackTransactionCommandError = async (output, context) => {
|
|
|
444
437
|
throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
|
|
445
438
|
default:
|
|
446
439
|
const parsedBody = parsedOutput.body;
|
|
447
|
-
throwDefaultError({
|
|
440
|
+
return throwDefaultError({
|
|
448
441
|
output,
|
|
449
442
|
parsedBody,
|
|
450
|
-
exceptionCtor: __BaseException,
|
|
451
443
|
errorCode,
|
|
452
444
|
});
|
|
453
445
|
}
|
|
454
446
|
};
|
|
455
|
-
const
|
|
447
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
456
448
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
457
449
|
const contents = map({});
|
|
458
450
|
const data = parsedOutput.body;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
451
|
+
const doc = take(data, {
|
|
452
|
+
message: __expectString,
|
|
453
|
+
});
|
|
454
|
+
Object.assign(contents, doc);
|
|
462
455
|
const exception = new AccessDeniedException({
|
|
463
456
|
$metadata: deserializeMetadata(parsedOutput),
|
|
464
457
|
...contents,
|
|
@@ -468,9 +461,10 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
468
461
|
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
469
462
|
const contents = map({});
|
|
470
463
|
const data = parsedOutput.body;
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
464
|
+
const doc = take(data, {
|
|
465
|
+
message: __expectString,
|
|
466
|
+
});
|
|
467
|
+
Object.assign(contents, doc);
|
|
474
468
|
const exception = new BadRequestException({
|
|
475
469
|
$metadata: deserializeMetadata(parsedOutput),
|
|
476
470
|
...contents,
|
|
@@ -480,9 +474,10 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
480
474
|
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
481
475
|
const contents = map({});
|
|
482
476
|
const data = parsedOutput.body;
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
477
|
+
const doc = take(data, {
|
|
478
|
+
message: __expectString,
|
|
479
|
+
});
|
|
480
|
+
Object.assign(contents, doc);
|
|
486
481
|
const exception = new ForbiddenException({
|
|
487
482
|
$metadata: deserializeMetadata(parsedOutput),
|
|
488
483
|
...contents,
|
|
@@ -492,6 +487,8 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
492
487
|
const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
|
|
493
488
|
const contents = map({});
|
|
494
489
|
const data = parsedOutput.body;
|
|
490
|
+
const doc = take(data, {});
|
|
491
|
+
Object.assign(contents, doc);
|
|
495
492
|
const exception = new InternalServerErrorException({
|
|
496
493
|
$metadata: deserializeMetadata(parsedOutput),
|
|
497
494
|
...contents,
|
|
@@ -501,9 +498,10 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
|
|
|
501
498
|
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
502
499
|
const contents = map({});
|
|
503
500
|
const data = parsedOutput.body;
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
501
|
+
const doc = take(data, {
|
|
502
|
+
message: __expectString,
|
|
503
|
+
});
|
|
504
|
+
Object.assign(contents, doc);
|
|
507
505
|
const exception = new NotFoundException({
|
|
508
506
|
$metadata: deserializeMetadata(parsedOutput),
|
|
509
507
|
...contents,
|
|
@@ -513,6 +511,8 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
513
511
|
const de_ServiceUnavailableErrorRes = async (parsedOutput, context) => {
|
|
514
512
|
const contents = map({});
|
|
515
513
|
const data = parsedOutput.body;
|
|
514
|
+
const doc = take(data, {});
|
|
515
|
+
Object.assign(contents, doc);
|
|
516
516
|
const exception = new ServiceUnavailableError({
|
|
517
517
|
$metadata: deserializeMetadata(parsedOutput),
|
|
518
518
|
...contents,
|
|
@@ -522,12 +522,11 @@ const de_ServiceUnavailableErrorRes = async (parsedOutput, context) => {
|
|
|
522
522
|
const de_StatementTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
523
523
|
const contents = map({});
|
|
524
524
|
const data = parsedOutput.body;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
525
|
+
const doc = take(data, {
|
|
526
|
+
dbConnectionId: __expectLong,
|
|
527
|
+
message: __expectString,
|
|
528
|
+
});
|
|
529
|
+
Object.assign(contents, doc);
|
|
531
530
|
const exception = new StatementTimeoutException({
|
|
532
531
|
$metadata: deserializeMetadata(parsedOutput),
|
|
533
532
|
...contents,
|
|
@@ -544,20 +543,13 @@ const se_ArrayOfArray = (input, context) => {
|
|
|
544
543
|
const se_ArrayValue = (input, context) => {
|
|
545
544
|
return ArrayValue.visit(input, {
|
|
546
545
|
arrayValues: (value) => ({ arrayValues: se_ArrayOfArray(value, context) }),
|
|
547
|
-
booleanValues: (value) => ({ booleanValues:
|
|
546
|
+
booleanValues: (value) => ({ booleanValues: _json(value) }),
|
|
548
547
|
doubleValues: (value) => ({ doubleValues: se_DoubleArray(value, context) }),
|
|
549
|
-
longValues: (value) => ({ longValues:
|
|
550
|
-
stringValues: (value) => ({ stringValues:
|
|
548
|
+
longValues: (value) => ({ longValues: _json(value) }),
|
|
549
|
+
stringValues: (value) => ({ stringValues: _json(value) }),
|
|
551
550
|
_: (name, value) => ({ name: value }),
|
|
552
551
|
});
|
|
553
552
|
};
|
|
554
|
-
const se_BooleanArray = (input, context) => {
|
|
555
|
-
return input
|
|
556
|
-
.filter((e) => e != null)
|
|
557
|
-
.map((entry) => {
|
|
558
|
-
return entry;
|
|
559
|
-
});
|
|
560
|
-
};
|
|
561
553
|
const se_DoubleArray = (input, context) => {
|
|
562
554
|
return input
|
|
563
555
|
.filter((e) => e != null)
|
|
@@ -577,25 +569,12 @@ const se_Field = (input, context) => {
|
|
|
577
569
|
_: (name, value) => ({ name: value }),
|
|
578
570
|
});
|
|
579
571
|
};
|
|
580
|
-
const se_LongArray = (input, context) => {
|
|
581
|
-
return input
|
|
582
|
-
.filter((e) => e != null)
|
|
583
|
-
.map((entry) => {
|
|
584
|
-
return entry;
|
|
585
|
-
});
|
|
586
|
-
};
|
|
587
|
-
const se_ResultSetOptions = (input, context) => {
|
|
588
|
-
return {
|
|
589
|
-
...(input.decimalReturnType != null && { decimalReturnType: input.decimalReturnType }),
|
|
590
|
-
...(input.longReturnType != null && { longReturnType: input.longReturnType }),
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
572
|
const se_SqlParameter = (input, context) => {
|
|
594
|
-
return {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
};
|
|
573
|
+
return take(input, {
|
|
574
|
+
name: [],
|
|
575
|
+
typeHint: [],
|
|
576
|
+
value: (_) => se_Field(_, context),
|
|
577
|
+
});
|
|
599
578
|
};
|
|
600
579
|
const se_SqlParameterSets = (input, context) => {
|
|
601
580
|
return input
|
|
@@ -611,20 +590,10 @@ const se_SqlParametersList = (input, context) => {
|
|
|
611
590
|
return se_SqlParameter(entry, context);
|
|
612
591
|
});
|
|
613
592
|
};
|
|
614
|
-
const se_StringArray = (input, context) => {
|
|
615
|
-
return input
|
|
616
|
-
.filter((e) => e != null)
|
|
617
|
-
.map((entry) => {
|
|
618
|
-
return entry;
|
|
619
|
-
});
|
|
620
|
-
};
|
|
621
593
|
const de_ArrayOfArray = (output, context) => {
|
|
622
594
|
const retVal = (output || [])
|
|
623
595
|
.filter((e) => e != null)
|
|
624
596
|
.map((entry) => {
|
|
625
|
-
if (entry === null) {
|
|
626
|
-
return null;
|
|
627
|
-
}
|
|
628
597
|
return de_ArrayValue(__expectUnion(entry), context);
|
|
629
598
|
});
|
|
630
599
|
return retVal;
|
|
@@ -637,7 +606,7 @@ const de_ArrayValue = (output, context) => {
|
|
|
637
606
|
}
|
|
638
607
|
if (output.booleanValues != null) {
|
|
639
608
|
return {
|
|
640
|
-
booleanValues:
|
|
609
|
+
booleanValues: _json(output.booleanValues),
|
|
641
610
|
};
|
|
642
611
|
}
|
|
643
612
|
if (output.doubleValues != null) {
|
|
@@ -647,12 +616,12 @@ const de_ArrayValue = (output, context) => {
|
|
|
647
616
|
}
|
|
648
617
|
if (output.longValues != null) {
|
|
649
618
|
return {
|
|
650
|
-
longValues:
|
|
619
|
+
longValues: _json(output.longValues),
|
|
651
620
|
};
|
|
652
621
|
}
|
|
653
622
|
if (output.stringValues != null) {
|
|
654
623
|
return {
|
|
655
|
-
stringValues:
|
|
624
|
+
stringValues: _json(output.stringValues),
|
|
656
625
|
};
|
|
657
626
|
}
|
|
658
627
|
return { $unknown: Object.entries(output)[0] };
|
|
@@ -661,49 +630,14 @@ const de_ArrayValueList = (output, context) => {
|
|
|
661
630
|
const retVal = (output || [])
|
|
662
631
|
.filter((e) => e != null)
|
|
663
632
|
.map((entry) => {
|
|
664
|
-
if (entry === null) {
|
|
665
|
-
return null;
|
|
666
|
-
}
|
|
667
633
|
return de_Value(__expectUnion(entry), context);
|
|
668
634
|
});
|
|
669
635
|
return retVal;
|
|
670
636
|
};
|
|
671
|
-
const de_BooleanArray = (output, context) => {
|
|
672
|
-
const retVal = (output || [])
|
|
673
|
-
.filter((e) => e != null)
|
|
674
|
-
.map((entry) => {
|
|
675
|
-
if (entry === null) {
|
|
676
|
-
return null;
|
|
677
|
-
}
|
|
678
|
-
return __expectBoolean(entry);
|
|
679
|
-
});
|
|
680
|
-
return retVal;
|
|
681
|
-
};
|
|
682
|
-
const de_ColumnMetadata = (output, context) => {
|
|
683
|
-
return {
|
|
684
|
-
arrayBaseColumnType: __expectInt32(output.arrayBaseColumnType),
|
|
685
|
-
isAutoIncrement: __expectBoolean(output.isAutoIncrement),
|
|
686
|
-
isCaseSensitive: __expectBoolean(output.isCaseSensitive),
|
|
687
|
-
isCurrency: __expectBoolean(output.isCurrency),
|
|
688
|
-
isSigned: __expectBoolean(output.isSigned),
|
|
689
|
-
label: __expectString(output.label),
|
|
690
|
-
name: __expectString(output.name),
|
|
691
|
-
nullable: __expectInt32(output.nullable),
|
|
692
|
-
precision: __expectInt32(output.precision),
|
|
693
|
-
scale: __expectInt32(output.scale),
|
|
694
|
-
schemaName: __expectString(output.schemaName),
|
|
695
|
-
tableName: __expectString(output.tableName),
|
|
696
|
-
type: __expectInt32(output.type),
|
|
697
|
-
typeName: __expectString(output.typeName),
|
|
698
|
-
};
|
|
699
|
-
};
|
|
700
637
|
const de_DoubleArray = (output, context) => {
|
|
701
638
|
const retVal = (output || [])
|
|
702
639
|
.filter((e) => e != null)
|
|
703
640
|
.map((entry) => {
|
|
704
|
-
if (entry === null) {
|
|
705
|
-
return null;
|
|
706
|
-
}
|
|
707
641
|
return __limitedParseDouble(entry);
|
|
708
642
|
});
|
|
709
643
|
return retVal;
|
|
@@ -740,70 +674,33 @@ const de_FieldList = (output, context) => {
|
|
|
740
674
|
const retVal = (output || [])
|
|
741
675
|
.filter((e) => e != null)
|
|
742
676
|
.map((entry) => {
|
|
743
|
-
if (entry === null) {
|
|
744
|
-
return null;
|
|
745
|
-
}
|
|
746
677
|
return de_Field(__expectUnion(entry), context);
|
|
747
678
|
});
|
|
748
679
|
return retVal;
|
|
749
680
|
};
|
|
750
|
-
const de_LongArray = (output, context) => {
|
|
751
|
-
const retVal = (output || [])
|
|
752
|
-
.filter((e) => e != null)
|
|
753
|
-
.map((entry) => {
|
|
754
|
-
if (entry === null) {
|
|
755
|
-
return null;
|
|
756
|
-
}
|
|
757
|
-
return __expectLong(entry);
|
|
758
|
-
});
|
|
759
|
-
return retVal;
|
|
760
|
-
};
|
|
761
|
-
const de_Metadata = (output, context) => {
|
|
762
|
-
const retVal = (output || [])
|
|
763
|
-
.filter((e) => e != null)
|
|
764
|
-
.map((entry) => {
|
|
765
|
-
if (entry === null) {
|
|
766
|
-
return null;
|
|
767
|
-
}
|
|
768
|
-
return de_ColumnMetadata(entry, context);
|
|
769
|
-
});
|
|
770
|
-
return retVal;
|
|
771
|
-
};
|
|
772
681
|
const de__Record = (output, context) => {
|
|
773
|
-
return {
|
|
774
|
-
values:
|
|
775
|
-
};
|
|
682
|
+
return take(output, {
|
|
683
|
+
values: (_) => de_Row(_, context),
|
|
684
|
+
});
|
|
776
685
|
};
|
|
777
686
|
const de_Records = (output, context) => {
|
|
778
687
|
const retVal = (output || [])
|
|
779
688
|
.filter((e) => e != null)
|
|
780
689
|
.map((entry) => {
|
|
781
|
-
if (entry === null) {
|
|
782
|
-
return null;
|
|
783
|
-
}
|
|
784
690
|
return de__Record(entry, context);
|
|
785
691
|
});
|
|
786
692
|
return retVal;
|
|
787
693
|
};
|
|
788
694
|
const de_ResultFrame = (output, context) => {
|
|
789
|
-
return {
|
|
790
|
-
records:
|
|
791
|
-
resultSetMetadata:
|
|
792
|
-
};
|
|
793
|
-
};
|
|
794
|
-
const de_ResultSetMetadata = (output, context) => {
|
|
795
|
-
return {
|
|
796
|
-
columnCount: __expectLong(output.columnCount),
|
|
797
|
-
columnMetadata: output.columnMetadata != null ? de_Metadata(output.columnMetadata, context) : undefined,
|
|
798
|
-
};
|
|
695
|
+
return take(output, {
|
|
696
|
+
records: (_) => de_Records(_, context),
|
|
697
|
+
resultSetMetadata: _json,
|
|
698
|
+
});
|
|
799
699
|
};
|
|
800
700
|
const de_Row = (output, context) => {
|
|
801
701
|
const retVal = (output || [])
|
|
802
702
|
.filter((e) => e != null)
|
|
803
703
|
.map((entry) => {
|
|
804
|
-
if (entry === null) {
|
|
805
|
-
return null;
|
|
806
|
-
}
|
|
807
704
|
return de_Value(__expectUnion(entry), context);
|
|
808
705
|
});
|
|
809
706
|
return retVal;
|
|
@@ -812,58 +709,38 @@ const de_SqlRecords = (output, context) => {
|
|
|
812
709
|
const retVal = (output || [])
|
|
813
710
|
.filter((e) => e != null)
|
|
814
711
|
.map((entry) => {
|
|
815
|
-
if (entry === null) {
|
|
816
|
-
return null;
|
|
817
|
-
}
|
|
818
712
|
return de_FieldList(entry, context);
|
|
819
713
|
});
|
|
820
714
|
return retVal;
|
|
821
715
|
};
|
|
822
716
|
const de_SqlStatementResult = (output, context) => {
|
|
823
|
-
return {
|
|
824
|
-
numberOfRecordsUpdated: __expectLong
|
|
825
|
-
resultFrame:
|
|
826
|
-
};
|
|
717
|
+
return take(output, {
|
|
718
|
+
numberOfRecordsUpdated: __expectLong,
|
|
719
|
+
resultFrame: (_) => de_ResultFrame(_, context),
|
|
720
|
+
});
|
|
827
721
|
};
|
|
828
722
|
const de_SqlStatementResults = (output, context) => {
|
|
829
723
|
const retVal = (output || [])
|
|
830
724
|
.filter((e) => e != null)
|
|
831
725
|
.map((entry) => {
|
|
832
|
-
if (entry === null) {
|
|
833
|
-
return null;
|
|
834
|
-
}
|
|
835
726
|
return de_SqlStatementResult(entry, context);
|
|
836
727
|
});
|
|
837
728
|
return retVal;
|
|
838
729
|
};
|
|
839
|
-
const de_StringArray = (output, context) => {
|
|
840
|
-
const retVal = (output || [])
|
|
841
|
-
.filter((e) => e != null)
|
|
842
|
-
.map((entry) => {
|
|
843
|
-
if (entry === null) {
|
|
844
|
-
return null;
|
|
845
|
-
}
|
|
846
|
-
return __expectString(entry);
|
|
847
|
-
});
|
|
848
|
-
return retVal;
|
|
849
|
-
};
|
|
850
730
|
const de_StructValue = (output, context) => {
|
|
851
|
-
return {
|
|
852
|
-
attributes:
|
|
853
|
-
};
|
|
731
|
+
return take(output, {
|
|
732
|
+
attributes: (_) => de_ArrayValueList(_, context),
|
|
733
|
+
});
|
|
854
734
|
};
|
|
855
735
|
const de_UpdateResult = (output, context) => {
|
|
856
|
-
return {
|
|
857
|
-
generatedFields:
|
|
858
|
-
};
|
|
736
|
+
return take(output, {
|
|
737
|
+
generatedFields: (_) => de_FieldList(_, context),
|
|
738
|
+
});
|
|
859
739
|
};
|
|
860
740
|
const de_UpdateResults = (output, context) => {
|
|
861
741
|
const retVal = (output || [])
|
|
862
742
|
.filter((e) => e != null)
|
|
863
743
|
.map((entry) => {
|
|
864
|
-
if (entry === null) {
|
|
865
|
-
return null;
|
|
866
|
-
}
|
|
867
744
|
return de_UpdateResult(entry, context);
|
|
868
745
|
});
|
|
869
746
|
return retVal;
|