@databricks/sql 0.1.8-beta.1 → 0.1.8-beta.2
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 +29 -1
- package/NOTICE +35 -0
- package/README.md +42 -19
- package/dist/DBSQLClient.d.ts +23 -39
- package/dist/DBSQLClient.js +110 -98
- package/dist/DBSQLClient.js.map +1 -1
- package/dist/DBSQLOperation/CompleteOperationHelper.d.ts +13 -0
- package/dist/DBSQLOperation/CompleteOperationHelper.js +61 -0
- package/dist/DBSQLOperation/CompleteOperationHelper.js.map +1 -0
- package/dist/DBSQLOperation/FetchResultsHelper.d.ts +14 -0
- package/dist/DBSQLOperation/FetchResultsHelper.js +79 -0
- package/dist/DBSQLOperation/FetchResultsHelper.js.map +1 -0
- package/dist/DBSQLOperation/OperationStatusHelper.d.ts +17 -0
- package/dist/DBSQLOperation/OperationStatusHelper.js +115 -0
- package/dist/DBSQLOperation/OperationStatusHelper.js.map +1 -0
- package/dist/DBSQLOperation/SchemaHelper.d.ts +10 -0
- package/dist/DBSQLOperation/SchemaHelper.js +39 -0
- package/dist/DBSQLOperation/SchemaHelper.js.map +1 -0
- package/dist/DBSQLOperation/getResult.d.ts +2 -0
- package/dist/DBSQLOperation/getResult.js +19 -0
- package/dist/DBSQLOperation/getResult.js.map +1 -0
- package/dist/DBSQLOperation/index.d.ts +34 -0
- package/dist/DBSQLOperation/index.js +100 -0
- package/dist/DBSQLOperation/index.js.map +1 -0
- package/dist/{HiveSession.d.ts → DBSQLSession.d.ts} +8 -9
- package/dist/DBSQLSession.js +185 -0
- package/dist/DBSQLSession.js.map +1 -0
- package/dist/connection/auth/NoSaslAuthentication.d.ts +2 -2
- package/dist/connection/auth/NoSaslAuthentication.js +9 -9
- package/dist/connection/auth/NoSaslAuthentication.js.map +1 -1
- package/dist/connection/auth/PlainHttpAuthentication.d.ts +2 -2
- package/dist/connection/auth/PlainHttpAuthentication.js +9 -21
- package/dist/connection/auth/PlainHttpAuthentication.js.map +1 -1
- package/dist/connection/auth/helpers/SaslPackageFactory.js +5 -9
- package/dist/connection/auth/helpers/SaslPackageFactory.js.map +1 -1
- package/dist/connection/connections/HttpConnection.d.ts +4 -4
- package/dist/connection/connections/HttpConnection.js +39 -47
- package/dist/connection/connections/HttpConnection.js.map +1 -1
- package/dist/connection/contracts/IAuthentication.d.ts +1 -1
- package/dist/connection/transports/HttpTransport.d.ts +1 -1
- package/dist/connection/transports/HttpTransport.js +16 -31
- package/dist/connection/transports/HttpTransport.js.map +1 -1
- package/dist/contracts/IDBSQLClient.d.ts +14 -0
- package/dist/contracts/{IHiveClient.js → IDBSQLClient.js} +1 -1
- package/dist/contracts/IDBSQLClient.js.map +1 -0
- package/dist/contracts/{IHiveSession.d.ts → IDBSQLSession.d.ts} +9 -7
- package/dist/contracts/{IHiveSession.js → IDBSQLSession.js} +1 -1
- package/dist/contracts/IDBSQLSession.js.map +1 -0
- package/dist/contracts/IOperation.d.ts +21 -21
- package/dist/contracts/IOperation.js +4 -0
- package/dist/contracts/IOperation.js.map +1 -1
- package/dist/dto/InfoValue.d.ts +5 -3
- package/dist/dto/InfoValue.js +11 -14
- package/dist/dto/InfoValue.js.map +1 -1
- package/dist/dto/Status.js +9 -10
- package/dist/dto/Status.js.map +1 -1
- package/dist/errors/AuthenticationError.d.ts +1 -1
- package/dist/errors/AuthenticationError.js +3 -23
- package/dist/errors/AuthenticationError.js.map +1 -1
- package/dist/errors/HiveDriverError.js +2 -22
- package/dist/errors/HiveDriverError.js.map +1 -1
- package/dist/errors/OperationStateError.d.ts +4 -4
- package/dist/errors/OperationStateError.js +6 -24
- package/dist/errors/OperationStateError.js.map +1 -1
- package/dist/errors/StatusError.d.ts +2 -2
- package/dist/errors/StatusError.js +3 -4
- package/dist/errors/StatusError.js.map +1 -1
- package/dist/factory/StatusFactory.d.ts +2 -4
- package/dist/factory/StatusFactory.js +16 -21
- package/dist/factory/StatusFactory.js.map +1 -1
- package/dist/hive/Commands/BaseCommand.d.ts +3 -4
- package/dist/hive/Commands/BaseCommand.js +10 -12
- package/dist/hive/Commands/BaseCommand.js.map +1 -1
- package/dist/hive/Commands/CancelDelegationTokenCommand.d.ts +3 -10
- package/dist/hive/Commands/CancelDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/CancelDelegationTokenCommand.js.map +1 -1
- package/dist/hive/Commands/CancelOperationCommand.d.ts +3 -9
- package/dist/hive/Commands/CancelOperationCommand.js +7 -26
- package/dist/hive/Commands/CancelOperationCommand.js.map +1 -1
- package/dist/hive/Commands/CloseOperationCommand.d.ts +3 -9
- package/dist/hive/Commands/CloseOperationCommand.js +7 -26
- package/dist/hive/Commands/CloseOperationCommand.js.map +1 -1
- package/dist/hive/Commands/CloseSessionCommand.d.ts +3 -9
- package/dist/hive/Commands/CloseSessionCommand.js +7 -26
- package/dist/hive/Commands/CloseSessionCommand.js.map +1 -1
- package/dist/hive/Commands/ExecuteStatementCommand.d.ts +3 -15
- package/dist/hive/Commands/ExecuteStatementCommand.js +7 -26
- package/dist/hive/Commands/ExecuteStatementCommand.js.map +1 -1
- package/dist/hive/Commands/FetchResultsCommand.d.ts +4 -16
- package/dist/hive/Commands/FetchResultsCommand.js +10 -26
- package/dist/hive/Commands/FetchResultsCommand.js.map +1 -1
- package/dist/hive/Commands/GetCatalogsCommand.d.ts +3 -10
- package/dist/hive/Commands/GetCatalogsCommand.js +7 -26
- package/dist/hive/Commands/GetCatalogsCommand.js.map +1 -1
- package/dist/hive/Commands/GetColumnsCommand.d.ts +3 -14
- package/dist/hive/Commands/GetColumnsCommand.js +7 -26
- package/dist/hive/Commands/GetColumnsCommand.js.map +1 -1
- package/dist/hive/Commands/GetCrossReferenceCommand.d.ts +3 -16
- package/dist/hive/Commands/GetCrossReferenceCommand.js +7 -26
- package/dist/hive/Commands/GetCrossReferenceCommand.js.map +1 -1
- package/dist/hive/Commands/GetDelegationTokenCommand.d.ts +3 -12
- package/dist/hive/Commands/GetDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/GetDelegationTokenCommand.js.map +1 -1
- package/dist/hive/Commands/GetFunctionsCommand.d.ts +3 -13
- package/dist/hive/Commands/GetFunctionsCommand.js +7 -26
- package/dist/hive/Commands/GetFunctionsCommand.js.map +1 -1
- package/dist/hive/Commands/GetInfoCommand.d.ts +3 -14
- package/dist/hive/Commands/GetInfoCommand.js +7 -26
- package/dist/hive/Commands/GetInfoCommand.js.map +1 -1
- package/dist/hive/Commands/GetOperationStatusCommand.d.ts +3 -21
- package/dist/hive/Commands/GetOperationStatusCommand.js +7 -26
- package/dist/hive/Commands/GetOperationStatusCommand.js.map +1 -1
- package/dist/hive/Commands/GetPrimaryKeysCommand.d.ts +3 -13
- package/dist/hive/Commands/GetPrimaryKeysCommand.js +7 -26
- package/dist/hive/Commands/GetPrimaryKeysCommand.js.map +1 -1
- package/dist/hive/Commands/GetResultSetMetadataCommand.d.ts +3 -10
- package/dist/hive/Commands/GetResultSetMetadataCommand.js +7 -26
- package/dist/hive/Commands/GetResultSetMetadataCommand.js.map +1 -1
- package/dist/hive/Commands/GetSchemasCommand.d.ts +3 -12
- package/dist/hive/Commands/GetSchemasCommand.js +7 -26
- package/dist/hive/Commands/GetSchemasCommand.js.map +1 -1
- package/dist/hive/Commands/GetTableTypesCommand.d.ts +3 -10
- package/dist/hive/Commands/GetTableTypesCommand.js +7 -26
- package/dist/hive/Commands/GetTableTypesCommand.js.map +1 -1
- package/dist/hive/Commands/GetTablesCommand.d.ts +3 -14
- package/dist/hive/Commands/GetTablesCommand.js +7 -26
- package/dist/hive/Commands/GetTablesCommand.js.map +1 -1
- package/dist/hive/Commands/GetTypeInfoCommand.d.ts +3 -10
- package/dist/hive/Commands/GetTypeInfoCommand.js +7 -26
- package/dist/hive/Commands/GetTypeInfoCommand.js.map +1 -1
- package/dist/hive/Commands/OpenSessionCommand.d.ts +9 -28
- package/dist/hive/Commands/OpenSessionCommand.js +16 -26
- package/dist/hive/Commands/OpenSessionCommand.js.map +1 -1
- package/dist/hive/Commands/RenewDelegationTokenCommand.d.ts +3 -10
- package/dist/hive/Commands/RenewDelegationTokenCommand.js +7 -26
- package/dist/hive/Commands/RenewDelegationTokenCommand.js.map +1 -1
- package/dist/hive/HiveDriver.d.ts +24 -49
- package/dist/hive/HiveDriver.js +87 -99
- package/dist/hive/HiveDriver.js.map +1 -1
- package/dist/hive/Types/index.d.ts +7 -218
- package/dist/hive/Types/index.js +11 -2
- package/dist/hive/Types/index.js.map +1 -1
- package/dist/index.d.ts +14 -16
- package/dist/index.js +15 -51
- package/dist/index.js.map +1 -1
- package/dist/result/IOperationResult.d.ts +0 -2
- package/dist/result/JsonResult.d.ts +5 -8
- package/dist/result/JsonResult.js +81 -99
- package/dist/result/JsonResult.js.map +1 -1
- package/dist/result/NullResult.d.ts +1 -3
- package/dist/result/NullResult.js +4 -8
- package/dist/result/NullResult.js.map +1 -1
- package/dist/utils/buildUserAgentString.d.ts +1 -0
- package/dist/utils/buildUserAgentString.js +25 -0
- package/dist/utils/buildUserAgentString.js.map +1 -0
- package/dist/utils/definedOrError.d.ts +1 -0
- package/dist/utils/definedOrError.js +10 -0
- package/dist/utils/definedOrError.js.map +1 -0
- package/dist/utils/formatProgress.d.ts +9 -0
- package/dist/utils/formatProgress.js +24 -0
- package/dist/utils/formatProgress.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +37 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +24 -6
- package/thrift/TCLIService.d.ts +196 -0
- package/thrift/{gen-nodejs/TCLIService.js → TCLIService.js} +1 -397
- package/thrift/TCLIService_types.d.ts +947 -0
- package/thrift/{gen-nodejs/TCLIService_types.js → TCLIService_types.js} +2830 -516
- package/.gitattributes +0 -32
- package/CONTRIBUTING.md +0 -55
- package/dist/HiveClient.d.ts +0 -35
- package/dist/HiveClient.js +0 -156
- package/dist/HiveClient.js.map +0 -1
- package/dist/HiveOperation.d.ts +0 -65
- package/dist/HiveOperation.js +0 -190
- package/dist/HiveOperation.js.map +0 -1
- package/dist/HiveSession.js +0 -197
- package/dist/HiveSession.js.map +0 -1
- package/dist/contracts/IHiveClient.d.ts +0 -10
- package/dist/contracts/IHiveClient.js.map +0 -1
- package/dist/contracts/IHiveSession.js.map +0 -1
- package/dist/hive/Commands/GetQueryIdCommand.d.ts +0 -11
- package/dist/hive/Commands/GetQueryIdCommand.js +0 -34
- package/dist/hive/Commands/GetQueryIdCommand.js.map +0 -1
- package/dist/hive/Commands/SetClientInfoCommand.d.ts +0 -12
- package/dist/hive/Commands/SetClientInfoCommand.js +0 -34
- package/dist/hive/Commands/SetClientInfoCommand.js.map +0 -1
- package/dist/utils/GetResult.d.ts +0 -16
- package/dist/utils/GetResult.js +0 -38
- package/dist/utils/GetResult.js.map +0 -1
- package/dist/utils/HiveUtils.d.ts +0 -11
- package/dist/utils/HiveUtils.js +0 -39
- package/dist/utils/HiveUtils.js.map +0 -1
- package/dist/utils/ProgressUpdateTransformer.d.ts +0 -8
- package/dist/utils/ProgressUpdateTransformer.js +0 -33
- package/dist/utils/ProgressUpdateTransformer.js.map +0 -1
- package/dist/utils/WaitUntilReady.d.ts +0 -16
- package/dist/utils/WaitUntilReady.js +0 -120
- package/dist/utils/WaitUntilReady.js.map +0 -1
- package/docs/readme.md +0 -227
- package/docs/troubleshooting.md +0 -84
- package/examples/data_types.js +0 -173
- package/examples/repl +0 -106
- package/examples/session.js +0 -55
- package/examples/usage.js +0 -18
- package/nyc.config.js +0 -8
- package/tests/e2e/data_types.test.js +0 -353
- package/tests/e2e/utils/config.js +0 -20
- package/tests/e2e/utils/logger.js +0 -22
- package/tests/unit/HiveClient.test.js +0 -153
- package/tests/unit/HiveOperation.test.js +0 -340
- package/tests/unit/HiveSession.test.js +0 -146
- package/tests/unit/connection/auth/PlainHttpAuthentication.test.js +0 -44
- package/tests/unit/connection/connections/HttpConnection.test.js +0 -141
- package/tests/unit/dto/InfoValue.test.js +0 -50
- package/tests/unit/factory/StatusFactory.test.js +0 -62
- package/tests/unit/hive/HiveDriver.test.js +0 -115
- package/tests/unit/hive/commands/CancelDelegationTokenCommand.test.js +0 -43
- package/tests/unit/hive/commands/CancelOperationCommand.test.js +0 -45
- package/tests/unit/hive/commands/CloseOperationCommand.test.js +0 -45
- package/tests/unit/hive/commands/CloseSessionCommand.test.js +0 -38
- package/tests/unit/hive/commands/ExecuteStatementCommand.test.js +0 -54
- package/tests/unit/hive/commands/FetchResultsCommand.test.js +0 -59
- package/tests/unit/hive/commands/GetCatalogsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetColumnsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetCrossReferenceCommand.test.js +0 -56
- package/tests/unit/hive/commands/GetDelegationTokenCommand.test.js +0 -45
- package/tests/unit/hive/commands/GetFunctionsCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetInfoCommand.test.js +0 -51
- package/tests/unit/hive/commands/GetOperationStatusCommand.test.js +0 -63
- package/tests/unit/hive/commands/GetPrimaryKeysCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetQueryIdCommand.test.js +0 -42
- package/tests/unit/hive/commands/GetResultSetMetadataCommand.test.js +0 -54
- package/tests/unit/hive/commands/GetSchemasCommand.test.js +0 -52
- package/tests/unit/hive/commands/GetTableTypesCommand.test.js +0 -50
- package/tests/unit/hive/commands/GetTablesCommand.test.js +0 -54
- package/tests/unit/hive/commands/GetTypeInfoCommand.test.js +0 -50
- package/tests/unit/hive/commands/OpenSessionCommand.test.js +0 -43
- package/tests/unit/hive/commands/RenewDelegationTokenCommand.test.js +0 -43
- package/tests/unit/hive/commands/SetClientInfoCommand.test.js +0 -45
- package/tests/unit/result/JsonResult.test.js +0 -295
- package/tests/unit/utils/GetResult.test.js +0 -30
- package/tests/unit/utils/HiveUtils.test.js +0 -60
- package/tests/unit/utils/ProgressUpdateTransformer.test.js +0 -28
- package/tests/unit/utils/WaitUntilReady.test.js +0 -105
- package/thrift/TCLIService.thrift +0 -1299
- package/tsconfig.json +0 -13
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
const { expect } = require('chai');
|
|
2
|
-
const HiveOperation = require('../../dist/HiveOperation').default;
|
|
3
|
-
const { TCLIService_types } = require('../../').thrift;
|
|
4
|
-
|
|
5
|
-
const getMock = (parent, prototype) => {
|
|
6
|
-
const mock = function(...args) {
|
|
7
|
-
parent.call(this, ...args);
|
|
8
|
-
};
|
|
9
|
-
mock.prototype = Object.create(parent.prototype);
|
|
10
|
-
mock.prototype.constructor = mock;
|
|
11
|
-
|
|
12
|
-
mock.prototype = Object.assign(mock.prototype, prototype);
|
|
13
|
-
|
|
14
|
-
return mock;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const driverMock = {};
|
|
18
|
-
const operationHandle = {};
|
|
19
|
-
|
|
20
|
-
describe('HiveOperation.fetch', () => {
|
|
21
|
-
it('should return success status if no results or it is not initialized', (cb) => {
|
|
22
|
-
const operation = new HiveOperation(
|
|
23
|
-
driverMock,
|
|
24
|
-
operationHandle,
|
|
25
|
-
TCLIService_types
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
operation.fetch().then((status) => {
|
|
29
|
-
expect(status.success()).to.be.eq(true);
|
|
30
|
-
cb();
|
|
31
|
-
}).catch((error) => {
|
|
32
|
-
cb(error);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('should return executing status if initialization still not finished', (cb) => {
|
|
37
|
-
const operation = new HiveOperation(
|
|
38
|
-
driverMock,
|
|
39
|
-
operationHandle,
|
|
40
|
-
TCLIService_types
|
|
41
|
-
);
|
|
42
|
-
operation.hasResultSet = true;
|
|
43
|
-
|
|
44
|
-
operation.fetch().then((status) => {
|
|
45
|
-
expect(status.executing()).to.be.eq(true);
|
|
46
|
-
cb();
|
|
47
|
-
}).catch((error) => {
|
|
48
|
-
cb(error);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('should initilize schema and make first result request', (cb) => {
|
|
53
|
-
const mockHiveOperation = getMock(HiveOperation, {
|
|
54
|
-
initializeSchema() { return Promise.resolve('schema'); },
|
|
55
|
-
|
|
56
|
-
firstFetch() { return Promise.resolve('data'); },
|
|
57
|
-
|
|
58
|
-
processFetchResponse(data) { this.data.push(data); }
|
|
59
|
-
});
|
|
60
|
-
const operation = new mockHiveOperation(
|
|
61
|
-
driverMock,
|
|
62
|
-
operationHandle,
|
|
63
|
-
TCLIService_types
|
|
64
|
-
);
|
|
65
|
-
operation.hasResultSet = true;
|
|
66
|
-
operation.state = TCLIService_types.TOperationState.FINISHED_STATE;
|
|
67
|
-
|
|
68
|
-
operation.fetch().then((status) => {
|
|
69
|
-
expect(operation.schema).to.be.eq('schema');
|
|
70
|
-
expect(operation.data).includes('data');
|
|
71
|
-
cb();
|
|
72
|
-
}).catch((error) => {
|
|
73
|
-
cb(error);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('should make next result request if schema has been set', (cb) => {
|
|
78
|
-
const mockHiveOperation = getMock(HiveOperation, {
|
|
79
|
-
nextFetch() { return Promise.resolve('data'); },
|
|
80
|
-
|
|
81
|
-
processFetchResponse(data) { this.data.push(data); }
|
|
82
|
-
});
|
|
83
|
-
const operation = new mockHiveOperation(
|
|
84
|
-
driverMock,
|
|
85
|
-
operationHandle,
|
|
86
|
-
TCLIService_types
|
|
87
|
-
);
|
|
88
|
-
operation.schema = 'schema';
|
|
89
|
-
operation.hasResultSet = true;
|
|
90
|
-
operation.state = TCLIService_types.TOperationState.FINISHED_STATE;
|
|
91
|
-
|
|
92
|
-
operation.fetch().then((status) => {
|
|
93
|
-
expect(operation.data).includes('data');
|
|
94
|
-
cb();
|
|
95
|
-
}).catch((error) => {
|
|
96
|
-
cb(error);
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
describe('HiveOperation.status', () => {
|
|
102
|
-
it('should set operation state and hasResultSet', (cb) => {
|
|
103
|
-
const operation = new HiveOperation(
|
|
104
|
-
{
|
|
105
|
-
getOperationStatus() {
|
|
106
|
-
return Promise.resolve({
|
|
107
|
-
status: {
|
|
108
|
-
statusCode: TCLIService_types.TStatusCode.SUCCESS_STATUS
|
|
109
|
-
},
|
|
110
|
-
operationState: 'state',
|
|
111
|
-
hasResultSet: true
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
operationHandle,
|
|
116
|
-
TCLIService_types
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
operation.status().then(() => {
|
|
120
|
-
expect(operation.state).to.be.eq('state');
|
|
121
|
-
expect(operation.hasResultSet).to.be.eq(true);
|
|
122
|
-
cb();
|
|
123
|
-
}).catch((error) => {
|
|
124
|
-
cb(error);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it('should throw error if status error', (cb) => {
|
|
129
|
-
const operation = new HiveOperation(
|
|
130
|
-
{
|
|
131
|
-
getOperationStatus() {
|
|
132
|
-
return Promise.resolve({
|
|
133
|
-
status: {
|
|
134
|
-
statusCode: TCLIService_types.TStatusCode.ERROR_STATUS,
|
|
135
|
-
errorMessage: 'error'
|
|
136
|
-
},
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
operationHandle,
|
|
141
|
-
TCLIService_types
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
operation.status().then(() => {
|
|
145
|
-
cb(new Error('must not be executed'));
|
|
146
|
-
}).catch((error) => {
|
|
147
|
-
expect(error.message).to.be.eq('error');
|
|
148
|
-
cb();
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
describe('HiveOperation.cancel', () => {
|
|
154
|
-
it('should run cancelOperation and return status', (cb) => {
|
|
155
|
-
const operation = new HiveOperation(
|
|
156
|
-
{
|
|
157
|
-
cancelOperation() {
|
|
158
|
-
return Promise.resolve({
|
|
159
|
-
status: {
|
|
160
|
-
statusCode: TCLIService_types.TStatusCode.SUCCESS_STATUS
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
operationHandle,
|
|
166
|
-
TCLIService_types
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
operation.cancel().then((status) => {
|
|
170
|
-
expect(status.success()).to.be.true;
|
|
171
|
-
cb();
|
|
172
|
-
}).catch((error) => {
|
|
173
|
-
cb(error);
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
describe('HiveOperation.close', () => {
|
|
179
|
-
it('should run closeOperation and return status', (cb) => {
|
|
180
|
-
const operation = new HiveOperation(
|
|
181
|
-
{
|
|
182
|
-
closeOperation() {
|
|
183
|
-
return Promise.resolve({
|
|
184
|
-
status: {
|
|
185
|
-
statusCode: TCLIService_types.TStatusCode.SUCCESS_STATUS
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
operationHandle,
|
|
191
|
-
TCLIService_types
|
|
192
|
-
);
|
|
193
|
-
|
|
194
|
-
operation.close().then((status) => {
|
|
195
|
-
expect(status.success()).to.be.true;
|
|
196
|
-
cb();
|
|
197
|
-
}).catch((error) => {
|
|
198
|
-
cb(error);
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
describe('HiveOperation.getQueryId', () => {
|
|
204
|
-
it('should return queryId', (cb) => {
|
|
205
|
-
const operation = new HiveOperation(
|
|
206
|
-
{
|
|
207
|
-
getQueryId() {
|
|
208
|
-
return Promise.resolve({ queryId: 'id' });
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
operationHandle,
|
|
212
|
-
TCLIService_types
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
operation.getQueryId().then((queryId) => {
|
|
216
|
-
expect(queryId).to.be.eq('id');
|
|
217
|
-
cb();
|
|
218
|
-
}).catch((error) => {
|
|
219
|
-
cb(error);
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
describe('HiveOperation.checkIfOperationHasMoreRows', () => {
|
|
225
|
-
it('should return true if response has hasMoreRows', () => {
|
|
226
|
-
const operation = new HiveOperation(
|
|
227
|
-
driverMock,
|
|
228
|
-
operationHandle,
|
|
229
|
-
TCLIService_types
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
const result = operation.checkIfOperationHasMoreRows({
|
|
233
|
-
hasMoreRows: true
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
expect(result).to.be.true;
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
it('should return false if response does not have columns', () => {
|
|
240
|
-
const operation = new HiveOperation(
|
|
241
|
-
driverMock,
|
|
242
|
-
operationHandle,
|
|
243
|
-
TCLIService_types
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
const result = operation.checkIfOperationHasMoreRows({});
|
|
247
|
-
|
|
248
|
-
expect(result).to.be.false;
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
it('should return true if at least one of the columns not empty', () => {
|
|
252
|
-
const operation = new HiveOperation(
|
|
253
|
-
driverMock,
|
|
254
|
-
operationHandle,
|
|
255
|
-
TCLIService_types
|
|
256
|
-
);
|
|
257
|
-
|
|
258
|
-
const result = (columnType) => operation.checkIfOperationHasMoreRows({
|
|
259
|
-
results: { columns: [{ [columnType]: { values: ['a'] } }] }
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
expect(result('binaryVal')).to.be.true;
|
|
263
|
-
expect(result('boolVal')).to.be.true;
|
|
264
|
-
expect(result('byteVal')).to.be.true;
|
|
265
|
-
expect(result('doubleVal')).to.be.true;
|
|
266
|
-
expect(result('i16Val')).to.be.true;
|
|
267
|
-
expect(result('i32Val')).to.be.true;
|
|
268
|
-
expect(result('i64Val')).to.be.true;
|
|
269
|
-
expect(result('stringVal')).to.be.true;
|
|
270
|
-
expect(result('not_existed_type')).to.be.false;
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
it('should return false if all columns are empty', () => {
|
|
274
|
-
const operation = new HiveOperation(
|
|
275
|
-
driverMock,
|
|
276
|
-
operationHandle,
|
|
277
|
-
TCLIService_types
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
const result = operation.checkIfOperationHasMoreRows({
|
|
281
|
-
results: { columns: [{ boolVal: { values: [] } }] }
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
expect(result).to.be.false;
|
|
285
|
-
});
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
describe('HiveOperation.processFetchResponse', () => {
|
|
289
|
-
it('should throw error if status an error', () => {
|
|
290
|
-
const operation = new HiveOperation(
|
|
291
|
-
driverMock,
|
|
292
|
-
operationHandle,
|
|
293
|
-
TCLIService_types
|
|
294
|
-
);
|
|
295
|
-
|
|
296
|
-
expect(() => operation.processFetchResponse({
|
|
297
|
-
status: {
|
|
298
|
-
statusCode: TCLIService_types.TStatusCode.ERROR_STATUS,
|
|
299
|
-
errorMessage: 'error'
|
|
300
|
-
},
|
|
301
|
-
})).throws;
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
it('should set hasMoreRows and push data', () => {
|
|
305
|
-
const mockHiveOperation = getMock(HiveOperation, {
|
|
306
|
-
checkIfOperationHasMoreRows() {
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
const operation = new mockHiveOperation(
|
|
311
|
-
driverMock,
|
|
312
|
-
operationHandle,
|
|
313
|
-
TCLIService_types
|
|
314
|
-
);
|
|
315
|
-
const result = operation.processFetchResponse({
|
|
316
|
-
status: {
|
|
317
|
-
statusCode: TCLIService_types.TStatusCode.SUCCESS_STATUS,
|
|
318
|
-
},
|
|
319
|
-
results: 'data'
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
expect(result.success()).to.be.true;
|
|
323
|
-
expect(operation.hasMoreRows()).to.be.true;
|
|
324
|
-
expect(operation.data).includes('data');
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
describe('HiveOperation.flush', () => {
|
|
329
|
-
it('should flush data', () => {
|
|
330
|
-
const operation = new HiveOperation(
|
|
331
|
-
driverMock,
|
|
332
|
-
operationHandle,
|
|
333
|
-
TCLIService_types
|
|
334
|
-
);
|
|
335
|
-
operation.data = [1, 2, 3];
|
|
336
|
-
operation.flush();
|
|
337
|
-
|
|
338
|
-
expect(operation.data).empty;
|
|
339
|
-
});
|
|
340
|
-
});
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
const { expect } = require('chai');
|
|
2
|
-
const { TCLIService_types } = require('../..').thrift;
|
|
3
|
-
const HiveSession = require('../../dist/HiveSession').default;
|
|
4
|
-
const InfoValue = require('../../dist/dto/InfoValue').default;
|
|
5
|
-
const Status = require('../../dist/dto/Status').default;
|
|
6
|
-
const HiveOperation = require('../../dist/HiveOperation').default;
|
|
7
|
-
|
|
8
|
-
const testMethod = (methodName, parameters, delegationToken) => {
|
|
9
|
-
const driver = {
|
|
10
|
-
[methodName]: () => Promise.resolve({
|
|
11
|
-
status: {
|
|
12
|
-
statusCode: 0
|
|
13
|
-
},
|
|
14
|
-
operationHandle: 'operationHandle',
|
|
15
|
-
infoValue: {},
|
|
16
|
-
delegationToken
|
|
17
|
-
})
|
|
18
|
-
};
|
|
19
|
-
const session = new HiveSession(driver, { sessionId: 'id' }, TCLIService_types);
|
|
20
|
-
|
|
21
|
-
return session[methodName].apply(session, parameters);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
describe('HiveSession', () => {
|
|
25
|
-
it('getInfo', () => {
|
|
26
|
-
return testMethod('getInfo', [ 1 ]).then(result => {
|
|
27
|
-
expect(result).instanceOf(InfoValue);
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
it('executeStatement', () => {
|
|
31
|
-
return testMethod('executeStatement', [ 'select * from table', { runAsync: true } ]).then(result => {
|
|
32
|
-
expect(result).instanceOf(HiveOperation);
|
|
33
|
-
}).then(() => {
|
|
34
|
-
return testMethod('executeStatement', [ 'select * from table' ]);
|
|
35
|
-
}).then(result => {
|
|
36
|
-
expect(result).instanceOf(HiveOperation);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
it('getTypeInfo', () => {
|
|
40
|
-
return testMethod('getTypeInfo', []).then(result => {
|
|
41
|
-
expect(result).instanceOf(HiveOperation);
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
it('getCatalogs', () => {
|
|
45
|
-
return testMethod('getCatalogs', []).then(result => {
|
|
46
|
-
expect(result).instanceOf(HiveOperation);
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
it('getSchemas', () => {
|
|
50
|
-
return testMethod('getSchemas', [{
|
|
51
|
-
catalogName: 'catalog',
|
|
52
|
-
schemaName: 'schema'
|
|
53
|
-
}]).then(result => {
|
|
54
|
-
expect(result).instanceOf(HiveOperation);
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
it('getTables', () => {
|
|
58
|
-
return testMethod('getTables', [{
|
|
59
|
-
catalogName: 'catalog',
|
|
60
|
-
schemaName: 'default',
|
|
61
|
-
tableName: 't1',
|
|
62
|
-
tableTypes: ['external']
|
|
63
|
-
}]).then(result => {
|
|
64
|
-
expect(result).instanceOf(HiveOperation);
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
it('getTableTypes', () => {
|
|
68
|
-
return testMethod('getTableTypes', []).then(result => {
|
|
69
|
-
expect(result).instanceOf(HiveOperation);
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
it('getColumns', () => {
|
|
73
|
-
return testMethod('getColumns', [{
|
|
74
|
-
catalogName: 'catalog',
|
|
75
|
-
schemaName: 'schema',
|
|
76
|
-
tableName: 'table',
|
|
77
|
-
columnName: 'column'
|
|
78
|
-
}]).then(result => {
|
|
79
|
-
expect(result).instanceOf(HiveOperation);
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
it('getFunctions', () => {
|
|
83
|
-
return testMethod('getFunctions', [{
|
|
84
|
-
catalogName: 'catalog',
|
|
85
|
-
schemaName: 'schema',
|
|
86
|
-
functionName: 'avg'
|
|
87
|
-
}]).then(result => {
|
|
88
|
-
expect(result).instanceOf(HiveOperation);
|
|
89
|
-
})
|
|
90
|
-
});
|
|
91
|
-
it('getPrimaryKeys', () => {
|
|
92
|
-
return testMethod('getPrimaryKeys', [{
|
|
93
|
-
catalogName: 'catalog',
|
|
94
|
-
schemaName: 'schema',
|
|
95
|
-
tableName: 't1'
|
|
96
|
-
}]).then(result => {
|
|
97
|
-
expect(result).instanceOf(HiveOperation);
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
it('getCrossReference', () => {
|
|
101
|
-
return testMethod('getCrossReference', [{
|
|
102
|
-
parentCatalogName: 'parentCatalogName',
|
|
103
|
-
parentSchemaName: 'parentSchemaName',
|
|
104
|
-
parentTableName: 'parentTableName',
|
|
105
|
-
foreignCatalogName: 'foreignCatalogName',
|
|
106
|
-
foreignSchemaName: 'foreignSchemaName',
|
|
107
|
-
foreignTableName: 'foreignTableName',
|
|
108
|
-
}]).then(result => {
|
|
109
|
-
expect(result).instanceOf(HiveOperation);
|
|
110
|
-
})
|
|
111
|
-
});
|
|
112
|
-
it('getDelegationToken', () => {
|
|
113
|
-
return testMethod('getDelegationToken', ['owner', 'renewer'], 'token').then(result => {
|
|
114
|
-
expect(result).to.be.eq('token');
|
|
115
|
-
}).then(() => {
|
|
116
|
-
return testMethod('getDelegationToken', ['owner', 'renewer'])
|
|
117
|
-
}).then(result => {
|
|
118
|
-
expect(result).to.be.eq('');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
it('renewDelegationToken', () => {
|
|
122
|
-
return testMethod('renewDelegationToken', ['token']).then(result => {
|
|
123
|
-
expect(result).instanceOf(Status);
|
|
124
|
-
})
|
|
125
|
-
});
|
|
126
|
-
it('cancelDelegationToken', () => {
|
|
127
|
-
return testMethod('cancelDelegationToken', ['token']).then(result => {
|
|
128
|
-
expect(result).instanceOf(Status);
|
|
129
|
-
})
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
it('close', () => {
|
|
133
|
-
const driver = {
|
|
134
|
-
closeSession: () => Promise.resolve({
|
|
135
|
-
status: {
|
|
136
|
-
statusCode: 0
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
};
|
|
140
|
-
const session = new HiveSession(driver, { sessionId: 'id' }, TCLIService_types);
|
|
141
|
-
|
|
142
|
-
return session.close().then(result => {
|
|
143
|
-
expect(result).instanceOf(Status);
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
const { expect } = require('chai');
|
|
2
|
-
const PlainHttpAuthentication = require('../../../../dist/connection/auth/PlainHttpAuthentication').default;
|
|
3
|
-
|
|
4
|
-
describe('PlainHttpAuthentication', () => {
|
|
5
|
-
it('username and password must be anonymous if nothing passed', () => {
|
|
6
|
-
const auth = new PlainHttpAuthentication();
|
|
7
|
-
|
|
8
|
-
expect(auth.username).to.be.eq('anonymous');
|
|
9
|
-
expect(auth.password).to.be.eq('anonymous');
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it('username and password must be defined correctly', () => {
|
|
13
|
-
const auth = new PlainHttpAuthentication({
|
|
14
|
-
username: 'user',
|
|
15
|
-
password: 'pass'
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
expect(auth.username).to.be.eq('user');
|
|
19
|
-
expect(auth.password).to.be.eq('pass');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('empty password must be set', () => {
|
|
23
|
-
const auth = new PlainHttpAuthentication({
|
|
24
|
-
username: 'user',
|
|
25
|
-
password: ''
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
expect(auth.username).to.be.eq('user');
|
|
29
|
-
expect(auth.password).to.be.eq('');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('auth token must be set to header', () => {
|
|
33
|
-
const auth = new PlainHttpAuthentication();
|
|
34
|
-
const transportMock = {
|
|
35
|
-
setOptions(name, value) {
|
|
36
|
-
expect(name).to.be.eq('headers');
|
|
37
|
-
expect(value.Authorization).to.be.eq('Basic YW5vbnltb3VzOmFub255bW91cw==');
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return auth.authenticate(transportMock).then((transport) => {
|
|
41
|
-
expect(transport).to.be.eq(transportMock);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
});
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
const { expect } = require('chai');
|
|
2
|
-
const HttpConnection = require('../../../../').connections.HttpConnection;
|
|
3
|
-
|
|
4
|
-
const thriftMock = (connection) => ({
|
|
5
|
-
createHttpConnection(host, port, options) {
|
|
6
|
-
this.host = host;
|
|
7
|
-
this.port = port;
|
|
8
|
-
this.options = options;
|
|
9
|
-
this.executed = true;
|
|
10
|
-
return connection;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const authProviderMock = () => ({
|
|
14
|
-
authenticate() {
|
|
15
|
-
this.executed = true;
|
|
16
|
-
return Promise.resolve();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
describe('HttpConnection.connect', () => {
|
|
21
|
-
it('should successfully connect', () => {
|
|
22
|
-
const connection = new HttpConnection();
|
|
23
|
-
const authenticator = authProviderMock();
|
|
24
|
-
const resultConnection = {
|
|
25
|
-
responseCallback() {}
|
|
26
|
-
};
|
|
27
|
-
connection.thrift = thriftMock(resultConnection);
|
|
28
|
-
|
|
29
|
-
return connection.connect({
|
|
30
|
-
host: 'localhost',
|
|
31
|
-
port: 10001,
|
|
32
|
-
options: {
|
|
33
|
-
path: '/hive'
|
|
34
|
-
}
|
|
35
|
-
}, authenticator).then(() => {
|
|
36
|
-
expect(authenticator.executed).to.be.true;
|
|
37
|
-
expect(connection.thrift.executed).to.be.true;
|
|
38
|
-
expect(connection.thrift.host).to.be.eq('localhost');
|
|
39
|
-
expect(connection.thrift.port).to.be.eq(10001);
|
|
40
|
-
expect(connection.thrift.options.path).to.be.eq('/hive');
|
|
41
|
-
expect(connection.getConnection()).to.be.eq(resultConnection);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should set SSL certificates and disable reject unautorized', () => {
|
|
46
|
-
const connection = new HttpConnection();
|
|
47
|
-
const authenticator = authProviderMock();
|
|
48
|
-
const resultConnection = {
|
|
49
|
-
responseCallback() {}
|
|
50
|
-
};
|
|
51
|
-
connection.thrift = thriftMock(resultConnection);
|
|
52
|
-
|
|
53
|
-
return connection.connect({
|
|
54
|
-
host: 'localhost',
|
|
55
|
-
port: 10001,
|
|
56
|
-
options: {
|
|
57
|
-
path: '/hive',
|
|
58
|
-
https: true,
|
|
59
|
-
ca: 'ca',
|
|
60
|
-
cert: 'cert',
|
|
61
|
-
key: 'key'
|
|
62
|
-
}
|
|
63
|
-
}, authenticator).then(() => {
|
|
64
|
-
expect(connection.thrift.options.nodeOptions.rejectUnauthorized).to.be.false;
|
|
65
|
-
expect(connection.thrift.options.nodeOptions.ca).to.be.eq('ca');
|
|
66
|
-
expect(connection.thrift.options.nodeOptions.cert).to.be.eq('cert');
|
|
67
|
-
expect(connection.thrift.options.nodeOptions.key).to.be.eq('key');
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('should set cookie', () => {
|
|
72
|
-
const connection = new HttpConnection();
|
|
73
|
-
const authenticator = authProviderMock();
|
|
74
|
-
const resultConnection = {
|
|
75
|
-
nodeOptions: { headers: { cookie: '' } },
|
|
76
|
-
responseCallback() {
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
connection.thrift = thriftMock(resultConnection);
|
|
80
|
-
|
|
81
|
-
return connection.connect({
|
|
82
|
-
host: 'localhost',
|
|
83
|
-
port: 10001,
|
|
84
|
-
options: {
|
|
85
|
-
path: '/hive'
|
|
86
|
-
}
|
|
87
|
-
}, authenticator).then(() => {
|
|
88
|
-
resultConnection.responseCallback({
|
|
89
|
-
headers: {
|
|
90
|
-
'set-cookie': ['token=token']
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
expect(resultConnection.nodeOptions.headers.cookie).to.be.eq('token=token');
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('should overlay rejectUnauthorized', () => {
|
|
99
|
-
const connection = new HttpConnection();
|
|
100
|
-
const authenticator = authProviderMock();
|
|
101
|
-
const resultConnection = {
|
|
102
|
-
responseCallback() {
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
connection.thrift = thriftMock(resultConnection);
|
|
106
|
-
|
|
107
|
-
return connection.connect({
|
|
108
|
-
host: 'localhost',
|
|
109
|
-
port: 10001,
|
|
110
|
-
options: {
|
|
111
|
-
path: '/hive',
|
|
112
|
-
https: true,
|
|
113
|
-
nodeOptions: {
|
|
114
|
-
rejectUnauthorized: true
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, authenticator).then(() => {
|
|
118
|
-
expect(connection.thrift.options.nodeOptions.rejectUnauthorized).to.be.true;
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
it('should call response callback if cookie is not set', () => {
|
|
123
|
-
const connection = new HttpConnection();
|
|
124
|
-
const authenticator = authProviderMock();
|
|
125
|
-
const resultConnection = {
|
|
126
|
-
responseCallback() {
|
|
127
|
-
this.executed = true;
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
connection.thrift = thriftMock(resultConnection);
|
|
131
|
-
|
|
132
|
-
return connection.connect({
|
|
133
|
-
host: 'localhost',
|
|
134
|
-
port: 10001
|
|
135
|
-
}, authenticator).then(() => {
|
|
136
|
-
resultConnection.responseCallback({ headers: {} });
|
|
137
|
-
expect(resultConnection.executed).to.be.true;
|
|
138
|
-
expect(connection.thrift.options.nodeOptions).to.be.deep.eq({});
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
});
|