@tdengine/websocket 3.1.8 → 3.2.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/lib/index.d.ts +8 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -1
- package/lib/src/client/wsClient.d.ts +4 -0
- package/lib/src/client/wsClient.d.ts.map +1 -1
- package/lib/src/client/wsClient.js +35 -8
- package/lib/src/client/wsConnector.d.ts.map +1 -1
- package/lib/src/client/wsResponse.d.ts +2 -0
- package/lib/src/client/wsResponse.d.ts.map +1 -1
- package/lib/src/client/wsResponse.js +2 -0
- package/lib/src/common/config.d.ts +6 -1
- package/lib/src/common/config.d.ts.map +1 -1
- package/lib/src/common/config.js +17 -1
- package/lib/src/common/constant.d.ts +20 -2
- package/lib/src/common/constant.d.ts.map +1 -1
- package/lib/src/common/constant.js +30 -13
- package/lib/src/common/taosResult.d.ts +5 -2
- package/lib/src/common/taosResult.d.ts.map +1 -1
- package/lib/src/common/taosResult.js +59 -5
- package/lib/src/common/utils.d.ts +1 -0
- package/lib/src/common/utils.d.ts.map +1 -1
- package/lib/src/common/utils.js +31 -0
- package/lib/src/sql/wsSql.d.ts.map +1 -1
- package/lib/src/sql/wsSql.js +18 -2
- package/lib/src/stmt/FieldBindParams.d.ts +9 -0
- package/lib/src/stmt/FieldBindParams.d.ts.map +1 -0
- package/lib/src/stmt/FieldBindParams.js +13 -0
- package/lib/src/stmt/wsColumnInfo.d.ts +12 -0
- package/lib/src/stmt/wsColumnInfo.d.ts.map +1 -0
- package/lib/src/stmt/wsColumnInfo.js +17 -0
- package/lib/src/stmt/wsParams1.d.ts +14 -0
- package/lib/src/stmt/wsParams1.d.ts.map +1 -0
- package/lib/src/stmt/wsParams1.js +274 -0
- package/lib/src/stmt/wsParams2.d.ts +14 -0
- package/lib/src/stmt/wsParams2.d.ts.map +1 -0
- package/lib/src/stmt/wsParams2.js +188 -0
- package/lib/src/stmt/wsParamsBase.d.ts +45 -0
- package/lib/src/stmt/wsParamsBase.d.ts.map +1 -0
- package/lib/src/stmt/wsParamsBase.js +218 -0
- package/lib/src/stmt/wsProto.d.ts +16 -4
- package/lib/src/stmt/wsProto.d.ts.map +1 -1
- package/lib/src/stmt/wsProto.js +197 -4
- package/lib/src/stmt/wsStmt.d.ts +6 -16
- package/lib/src/stmt/wsStmt.d.ts.map +1 -1
- package/lib/src/stmt/wsStmt.js +0 -200
- package/lib/src/stmt/wsStmt1.d.ts +30 -0
- package/lib/src/stmt/wsStmt1.d.ts.map +1 -0
- package/lib/src/stmt/wsStmt1.js +206 -0
- package/lib/src/stmt/wsStmt2.d.ts +37 -0
- package/lib/src/stmt/wsStmt2.d.ts.map +1 -0
- package/lib/src/stmt/wsStmt2.js +280 -0
- package/lib/src/stmt/wsTableInfo.d.ts +17 -0
- package/lib/src/stmt/wsTableInfo.d.ts.map +1 -0
- package/lib/src/stmt/wsTableInfo.js +54 -0
- package/lib/src/tmq/constant.d.ts +2 -0
- package/lib/src/tmq/constant.d.ts.map +1 -1
- package/lib/src/tmq/constant.js +2 -0
- package/lib/src/tmq/tmqResponse.d.ts +5 -5
- package/lib/src/tmq/tmqResponse.js +8 -8
- package/lib/src/tmq/wsTmq.d.ts +1 -0
- package/lib/src/tmq/wsTmq.d.ts.map +1 -1
- package/lib/src/tmq/wsTmq.js +9 -5
- package/lib/test/bulkPulling/cloud.tmq.test.js +0 -1
- package/lib/test/bulkPulling/decimal.test.d.ts +2 -0
- package/lib/test/bulkPulling/decimal.test.d.ts.map +1 -0
- package/lib/test/bulkPulling/decimal.test.js +129 -0
- package/lib/test/bulkPulling/sql.test.js +36 -9
- package/lib/test/bulkPulling/stmt.func.test.js +99 -11
- package/lib/test/bulkPulling/stmt.type.test.js +49 -6
- package/lib/test/bulkPulling/stmt1.func.test.d.ts +2 -0
- package/lib/test/bulkPulling/stmt1.func.test.d.ts.map +1 -0
- package/lib/test/bulkPulling/stmt1.func.test.js +417 -0
- package/lib/test/bulkPulling/stmt1.type.test.d.ts +2 -0
- package/lib/test/bulkPulling/stmt1.type.test.d.ts.map +1 -0
- package/lib/test/bulkPulling/stmt1.type.test.js +323 -0
- package/lib/test/bulkPulling/stmt2.func.test.d.ts +2 -0
- package/lib/test/bulkPulling/stmt2.func.test.d.ts.map +1 -0
- package/lib/test/bulkPulling/stmt2.func.test.js +539 -0
- package/lib/test/bulkPulling/stmt2.type.test.d.ts +2 -0
- package/lib/test/bulkPulling/stmt2.type.test.d.ts.map +1 -0
- package/lib/test/bulkPulling/stmt2.type.test.js +325 -0
- package/lib/test/bulkPulling/tmq.test.js +2 -0
- package/lib/test/bulkPulling/wsConnectPool.test.js +2 -2
- package/lib/test/utils.d.ts.map +1 -1
- package/lib/test/utils.js +1 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -16,9 +16,16 @@ export * from "./src/index";
|
|
|
16
16
|
export * from "./src/sql/wsProto";
|
|
17
17
|
export * from "./src/sql/wsRows";
|
|
18
18
|
export * from "./src/sql/wsSql";
|
|
19
|
-
export * from "./src/stmt/
|
|
19
|
+
export * from "./src/stmt/FieldBindParams";
|
|
20
|
+
export * from "./src/stmt/wsColumnInfo";
|
|
21
|
+
export * from "./src/stmt/wsParams1";
|
|
22
|
+
export * from "./src/stmt/wsParams2";
|
|
23
|
+
export * from "./src/stmt/wsParamsBase";
|
|
20
24
|
export * from "./src/stmt/wsProto";
|
|
21
25
|
export * from "./src/stmt/wsStmt";
|
|
26
|
+
export * from "./src/stmt/wsStmt1";
|
|
27
|
+
export * from "./src/stmt/wsStmt2";
|
|
28
|
+
export * from "./src/stmt/wsTableInfo";
|
|
22
29
|
export * from "./src/tmq/config";
|
|
23
30
|
export * from "./src/tmq/constant";
|
|
24
31
|
export * from "./src/tmq/tmqResponse";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc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AoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -32,9 +32,16 @@ __exportStar(require("./src/index"), exports);
|
|
|
32
32
|
__exportStar(require("./src/sql/wsProto"), exports);
|
|
33
33
|
__exportStar(require("./src/sql/wsRows"), exports);
|
|
34
34
|
__exportStar(require("./src/sql/wsSql"), exports);
|
|
35
|
-
__exportStar(require("./src/stmt/
|
|
35
|
+
__exportStar(require("./src/stmt/FieldBindParams"), exports);
|
|
36
|
+
__exportStar(require("./src/stmt/wsColumnInfo"), exports);
|
|
37
|
+
__exportStar(require("./src/stmt/wsParams1"), exports);
|
|
38
|
+
__exportStar(require("./src/stmt/wsParams2"), exports);
|
|
39
|
+
__exportStar(require("./src/stmt/wsParamsBase"), exports);
|
|
36
40
|
__exportStar(require("./src/stmt/wsProto"), exports);
|
|
37
41
|
__exportStar(require("./src/stmt/wsStmt"), exports);
|
|
42
|
+
__exportStar(require("./src/stmt/wsStmt1"), exports);
|
|
43
|
+
__exportStar(require("./src/stmt/wsStmt2"), exports);
|
|
44
|
+
__exportStar(require("./src/stmt/wsTableInfo"), exports);
|
|
38
45
|
__exportStar(require("./src/tmq/config"), exports);
|
|
39
46
|
__exportStar(require("./src/tmq/constant"), exports);
|
|
40
47
|
__exportStar(require("./src/tmq/tmqResponse"), exports);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { WSQueryResponse } from './wsResponse';
|
|
2
|
+
import { TSDB_OPTION_CONNECTION } from '../common/constant';
|
|
2
3
|
export declare class WsClient {
|
|
3
4
|
private _wsConnector?;
|
|
4
5
|
private _timeout?;
|
|
6
|
+
private _timezone?;
|
|
5
7
|
private readonly _url;
|
|
6
8
|
private static readonly _minVersion;
|
|
9
|
+
private _version?;
|
|
7
10
|
constructor(url: URL, timeout?: number | undefined | null);
|
|
8
11
|
connect(database?: string | undefined | null): Promise<void>;
|
|
12
|
+
setOptionConnection(option: TSDB_OPTION_CONNECTION, value: string | null): Promise<void>;
|
|
9
13
|
execNoResp(queryMsg: string): Promise<void>;
|
|
10
14
|
exec(queryMsg: string, bSqlQuery?: boolean): Promise<any>;
|
|
11
15
|
sendBinaryMsg(reqId: bigint, action: string, message: ArrayBuffer, bSqlQuery?: boolean, bResultBinary?: boolean): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wsClient.d.ts","sourceRoot":"","sources":["../../../src/client/wsClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,eAAe,EAClB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"wsClient.d.ts","sourceRoot":"","sources":["../../../src/client/wsClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAEH,eAAe,EAClB,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,QAAQ;IACjB,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,CAA2B;IAC5C,OAAO,CAAC,SAAS,CAAC,CAA2B;IAC7C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAK;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAa;IAChD,OAAO,CAAC,QAAQ,CAAC,CAA4B;gBAEjC,GAAG,EAAE,GAAG,EAAE,OAAQ,CAAC,EAAC,MAAM,GAAG,SAAS,GAAG,IAAI;IAWnD,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAiC5D,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBxF,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3C,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAC,OAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAuB9D,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,GAAC,OAAc,EAAE,aAAa,GAAE,OAAe,GAAG,OAAO,CAAC,GAAG,CAAC;IA0B/I,QAAQ;IAQF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,OAAO,CAAC,GAAG,EAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAajC,UAAU,CAAC,GAAG,EAAE,eAAe;IAqB/B,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IA8B1B,KAAK,IAAG,OAAO,CAAC,IAAI,CAAC;IAQ3B,QAAQ,CAAC,GAAG,EAAE,GAAG;IASX,YAAY;CAQrB"}
|
|
@@ -17,21 +17,23 @@ class WsClient {
|
|
|
17
17
|
this.checkURL(url);
|
|
18
18
|
this._url = url;
|
|
19
19
|
this._timeout = timeout;
|
|
20
|
+
if (this._url.searchParams.has("timezone")) {
|
|
21
|
+
this._timezone = this._url.searchParams.get("timezone") || undefined;
|
|
22
|
+
this._url.searchParams.delete("timezone");
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
async connect(database) {
|
|
22
|
-
let _db = this._url.pathname.split('/')[3];
|
|
23
|
-
if (database) {
|
|
24
|
-
_db = database;
|
|
25
|
-
}
|
|
26
26
|
let connMsg = {
|
|
27
27
|
action: 'conn',
|
|
28
28
|
args: {
|
|
29
29
|
req_id: reqid_1.ReqId.getReqID(),
|
|
30
30
|
user: (0, utils_1.safeDecodeURIComponent)(this._url.username),
|
|
31
31
|
password: (0, utils_1.safeDecodeURIComponent)(this._url.password),
|
|
32
|
-
db:
|
|
32
|
+
db: database,
|
|
33
|
+
...(this._timezone && { tz: this._timezone }),
|
|
33
34
|
},
|
|
34
35
|
};
|
|
36
|
+
log_1.default.debug("[wsClient.connect.connMsg]===>" + json_bigint_1.default.stringify(connMsg));
|
|
35
37
|
this._wsConnector = await wsConnectorPool_1.WebSocketConnectionPool.instance().getConnection(this._url, this._timeout);
|
|
36
38
|
if (this._wsConnector.readyState() === websocket_1.w3cwebsocket.OPEN) {
|
|
37
39
|
return;
|
|
@@ -51,6 +53,28 @@ class WsClient {
|
|
|
51
53
|
throw (new wsError_1.TDWebSocketClientError(wsError_1.ErrorCode.ERR_WEBSOCKET_CONNECTION_FAIL, `connection creation failed, url: ${this._url}, code:${e.code}, msg:${e.message}`));
|
|
52
54
|
}
|
|
53
55
|
}
|
|
56
|
+
async setOptionConnection(option, value) {
|
|
57
|
+
log_1.default.debug("[wsClient.setOptionConnection]===>" + option + ", " + value);
|
|
58
|
+
let connMsg = {
|
|
59
|
+
action: 'options_connection',
|
|
60
|
+
args: {
|
|
61
|
+
req_id: reqid_1.ReqId.getReqID(),
|
|
62
|
+
options: [
|
|
63
|
+
{
|
|
64
|
+
option: option,
|
|
65
|
+
value: value
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
try {
|
|
71
|
+
await this.exec(json_bigint_1.default.stringify(connMsg), false);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
log_1.default.error("[wsClient.setOptionConnection] failed: " + e.message);
|
|
75
|
+
throw e;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
54
78
|
async execNoResp(queryMsg) {
|
|
55
79
|
log_1.default.debug('[wsQueryInterface.query.queryMsg]===>' + queryMsg);
|
|
56
80
|
if (this._wsConnector && this._wsConnector.readyState() === websocket_1.w3cwebsocket.OPEN) {
|
|
@@ -164,6 +188,9 @@ class WsClient {
|
|
|
164
188
|
});
|
|
165
189
|
}
|
|
166
190
|
async version() {
|
|
191
|
+
if (this._version) {
|
|
192
|
+
return this._version;
|
|
193
|
+
}
|
|
167
194
|
let versionMsg = {
|
|
168
195
|
action: 'version',
|
|
169
196
|
args: {
|
|
@@ -204,10 +231,10 @@ class WsClient {
|
|
|
204
231
|
}
|
|
205
232
|
}
|
|
206
233
|
async checkVersion() {
|
|
207
|
-
|
|
208
|
-
let result = (0, utils_1.compareVersions)(
|
|
234
|
+
this._version = await this.version();
|
|
235
|
+
let result = (0, utils_1.compareVersions)(this._version, WsClient._minVersion);
|
|
209
236
|
if (result < 0) {
|
|
210
|
-
log_1.default.error(`TDengine version is too low, current version: ${
|
|
237
|
+
log_1.default.error(`TDengine version is too low, current version: ${this._version}, minimum required version: ${WsClient._minVersion}`);
|
|
211
238
|
throw (new wsError_1.WebSocketQueryError(wsError_1.ErrorCode.ERR_TDENIGNE_VERSION_IS_TOO_LOW, `Version mismatch. The minimum required TDengine version is ${WsClient._minVersion}`));
|
|
212
239
|
}
|
|
213
240
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wsConnector.d.ts","sourceRoot":"","sources":["../../../src/client/wsConnector.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAM;IACpB,QAAQ,SAAQ;gBAGJ,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAsBlD,KAAK;YAcG,QAAQ;IAKtB,OAAO,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"wsConnector.d.ts","sourceRoot":"","sources":["../../../src/client/wsConnector.ts"],"names":[],"mappings":"AAMA,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAM;IACpB,QAAQ,SAAQ;gBAGJ,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAsBlD,KAAK;YAcG,QAAQ;IAKtB,OAAO,CAAC,UAAU;IAkBlB,KAAK;IASL,UAAU,IAAI,MAAM;IAId,aAAa,CAAC,OAAO,EAAE,MAAM,GAAE,OAAO,CAAC,IAAI,CAAC;IAmB5C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc;IAuBjD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,GAAE,OAAc;IAgBzF,QAAQ,IAAI,GAAG;CAGzB"}
|
|
@@ -24,6 +24,8 @@ export declare class WSQueryResponse {
|
|
|
24
24
|
fields_names?: Array<string> | null;
|
|
25
25
|
fields_types?: Array<number> | null;
|
|
26
26
|
fields_lengths?: Array<number> | null;
|
|
27
|
+
fields_precisions?: Array<bigint> | null;
|
|
28
|
+
fields_scales?: Array<bigint> | null;
|
|
27
29
|
precision?: number;
|
|
28
30
|
constructor(resp: MessageResp);
|
|
29
31
|
private initMsg;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wsResponse.d.ts","sourceRoot":"","sources":["../../../src/client/wsResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAe,MAAM,sBAAsB,CAAC;AAEhE,qBAAa,iBAAiB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;gBACN,IAAI,EAAC,WAAW;CAO/B;AAED,qBAAa,eAAe;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,M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MAAM,CAAC,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAC,WAAW;IAI5B,OAAO,CAAC,OAAO;CAsBlB;AAED,qBAAa,oBAAoB;IAC7B,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,WAAW,EAAE,WAAW,CAAA;gBACZ,GAAG,EAAE,WAAW;CAgC/B"}
|
|
@@ -39,6 +39,8 @@ class WSQueryResponse {
|
|
|
39
39
|
this.fields_types = msg.fields_types;
|
|
40
40
|
this.fields_lengths = msg.fields_lengths;
|
|
41
41
|
this.precision = msg.precision;
|
|
42
|
+
this.fields_precisions = msg.fields_precisions ? msg.fields_precisions.map((p) => BigInt(p)) : [];
|
|
43
|
+
this.fields_scales = msg.fields_scales ? msg.fields_scales.map((s) => BigInt(s)) : [];
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
exports.WSQueryResponse = WSQueryResponse;
|
|
@@ -5,7 +5,9 @@ export declare class WSConfig {
|
|
|
5
5
|
private _url;
|
|
6
6
|
private _timeout;
|
|
7
7
|
private _token;
|
|
8
|
-
|
|
8
|
+
private _timezone;
|
|
9
|
+
private _minStmt2Version;
|
|
10
|
+
constructor(url: string, minStmt2Version?: string);
|
|
9
11
|
getToken(): string | undefined | null;
|
|
10
12
|
setToken(token: string): void;
|
|
11
13
|
getUser(): string | undefined | null;
|
|
@@ -18,5 +20,8 @@ export declare class WSConfig {
|
|
|
18
20
|
setUrl(url: string): void;
|
|
19
21
|
setTimeOut(ms: number): void;
|
|
20
22
|
getTimeOut(): number | undefined | null;
|
|
23
|
+
setTimezone(timezone: string): void;
|
|
24
|
+
getTimezone(): string | undefined | null;
|
|
25
|
+
getMinStmt2Version(): string;
|
|
21
26
|
}
|
|
22
27
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/common/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/common/config.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;IACjB,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,GAAG,CAA4B;IACvC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,gBAAgB,CAAQ;gBAEpB,GAAG,EAAC,MAAM,EAAE,eAAe,CAAC,EAAC,MAAM;IASxC,QAAQ,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGrC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,OAAO,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGpC,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,MAAM,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGnC,MAAM,CAAC,GAAG,EAAC,MAAM;IAIjB,KAAK,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGlC,KAAK,CAAC,EAAE,EAAE,MAAM;IAIhB,MAAM,IAAI,MAAM;IAIhB,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,UAAU,CAAC,EAAE,EAAG,MAAM;IAGtB,UAAU,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGvC,WAAW,CAAC,QAAQ,EAAE,MAAM;IAG5B,WAAW,IAAI,MAAM,GAAG,SAAS,GAAG,IAAI;IAGxC,kBAAkB;CAG5B"}
|
package/lib/src/common/config.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WSConfig = void 0;
|
|
4
|
+
const constant_1 = require("./constant");
|
|
4
5
|
class WSConfig {
|
|
5
|
-
constructor(url) {
|
|
6
|
+
constructor(url, minStmt2Version) {
|
|
6
7
|
this._url = url;
|
|
8
|
+
if (!minStmt2Version) {
|
|
9
|
+
this._minStmt2Version = constant_1.MinStmt2Version;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
this._minStmt2Version = minStmt2Version;
|
|
13
|
+
}
|
|
7
14
|
}
|
|
8
15
|
getToken() {
|
|
9
16
|
return this._token;
|
|
@@ -41,5 +48,14 @@ class WSConfig {
|
|
|
41
48
|
getTimeOut() {
|
|
42
49
|
return this._timeout;
|
|
43
50
|
}
|
|
51
|
+
setTimezone(timezone) {
|
|
52
|
+
this._timezone = timezone;
|
|
53
|
+
}
|
|
54
|
+
getTimezone() {
|
|
55
|
+
return this._timezone;
|
|
56
|
+
}
|
|
57
|
+
getMinStmt2Version() {
|
|
58
|
+
return this._minStmt2Version;
|
|
59
|
+
}
|
|
44
60
|
}
|
|
45
61
|
exports.WSConfig = WSConfig;
|
|
@@ -4,8 +4,12 @@ export interface IndexableString {
|
|
|
4
4
|
export interface StringIndexable {
|
|
5
5
|
[index: string]: number;
|
|
6
6
|
}
|
|
7
|
+
export interface NumberIndexable {
|
|
8
|
+
[index: number]: number;
|
|
9
|
+
}
|
|
7
10
|
export declare const BinaryQueryMessage: bigint;
|
|
8
11
|
export declare const FetchRawBlockMessage: bigint;
|
|
12
|
+
export declare const MinStmt2Version: string;
|
|
9
13
|
export declare const TDengineTypeName: IndexableString;
|
|
10
14
|
export declare const ColumnsBlockType: StringIndexable;
|
|
11
15
|
export declare enum TDengineTypeCode {
|
|
@@ -27,9 +31,23 @@ export declare enum TDengineTypeCode {
|
|
|
27
31
|
BIGINT_UNSIGNED = 14,
|
|
28
32
|
JSON = 15,
|
|
29
33
|
VARBINARY = 16,
|
|
30
|
-
|
|
34
|
+
DECIMAL = 17,
|
|
35
|
+
GEOMETRY = 20,
|
|
36
|
+
DECIMAL64 = 21
|
|
37
|
+
}
|
|
38
|
+
export declare enum TSDB_OPTION_CONNECTION {
|
|
39
|
+
TSDB_OPTION_CONNECTION_CHARSET = 0,// charset, Same as the scope supported by the system
|
|
40
|
+
TSDB_OPTION_CONNECTION_TIMEZONE = 1,// timezone, Same as the scope supported by the system
|
|
41
|
+
TSDB_OPTION_CONNECTION_USER_IP = 2,// user ip
|
|
42
|
+
TSDB_OPTION_CONNECTION_USER_APP = 3
|
|
43
|
+
}
|
|
44
|
+
export declare enum FieldBindType {
|
|
45
|
+
TAOS_FIELD_COL = 1,
|
|
46
|
+
TAOS_FIELD_TAG = 2,
|
|
47
|
+
TAOS_FIELD_QUERY = 3,
|
|
48
|
+
TAOS_FIELD_TBNAME = 4
|
|
31
49
|
}
|
|
32
50
|
export declare const TDenginePrecision: IndexableString;
|
|
33
|
-
export declare const TDengineTypeLength:
|
|
51
|
+
export declare const TDengineTypeLength: NumberIndexable;
|
|
34
52
|
export declare const PrecisionLength: StringIndexable;
|
|
35
53
|
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../../src/common/constant.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAkB,CAAC;AACpD,eAAO,MAAM,oBAAoB,EAAE,MAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../../src/common/constant.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAkB,CAAC;AACpD,eAAO,MAAM,oBAAoB,EAAE,MAAkB,CAAC;AACtD,eAAO,MAAM,eAAe,EAAC,MAAkB,CAAC;AAChD,eAAO,MAAM,gBAAgB,EAAE,eAmB9B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,eAM9B,CAAA;AAGD,oBAAY,gBAAgB;IACxB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,GAAG,IAAI;IACP,MAAM,IAAI;IACV,KAAK,IAAI;IACT,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IACX,SAAS,IAAI;IACb,KAAK,KAAK;IACV,gBAAgB,KAAK;IACrB,iBAAiB,KAAK;IACtB,YAAY,KAAK;IACjB,eAAe,KAAK;IACpB,IAAI,KAAK;IACT,SAAS,KAAK;IACd,OAAO,KAAK;IACZ,QAAQ,KAAK;IACb,SAAS,KAAK;CACjB;AAED,oBAAY,sBAAsB;IAChC,8BAA8B,IAAA,CAAS,qDAAqD;IAC5F,+BAA+B,IAAA,CAAQ,sDAAsD;IAC7F,8BAA8B,IAAA,CAAS,UAAU;IACjD,+BAA+B,IAAA;CAChC;AAED,oBAAY,aAAa;IACrB,cAAc,IAAI;IAClB,cAAc,IAAI;IAClB,gBAAgB,IAAI;IACpB,iBAAiB,IAAI;CACxB;AAED,eAAO,MAAM,iBAAiB,EAAE,eAI/B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,eAahC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAI7B,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PrecisionLength = exports.TDengineTypeLength = exports.TDenginePrecision = exports.TDengineTypeCode = exports.ColumnsBlockType = exports.TDengineTypeName = exports.FetchRawBlockMessage = exports.BinaryQueryMessage = void 0;
|
|
3
|
+
exports.PrecisionLength = exports.TDengineTypeLength = exports.TDenginePrecision = exports.FieldBindType = exports.TSDB_OPTION_CONNECTION = exports.TDengineTypeCode = exports.ColumnsBlockType = exports.TDengineTypeName = exports.MinStmt2Version = exports.FetchRawBlockMessage = exports.BinaryQueryMessage = void 0;
|
|
4
4
|
exports.BinaryQueryMessage = BigInt(6);
|
|
5
5
|
exports.FetchRawBlockMessage = BigInt(7);
|
|
6
|
+
exports.MinStmt2Version = "3.3.6.0";
|
|
6
7
|
exports.TDengineTypeName = {
|
|
7
8
|
0: 'NULL',
|
|
8
9
|
1: 'BOOL',
|
|
@@ -50,26 +51,42 @@ var TDengineTypeCode;
|
|
|
50
51
|
TDengineTypeCode[TDengineTypeCode["BIGINT_UNSIGNED"] = 14] = "BIGINT_UNSIGNED";
|
|
51
52
|
TDengineTypeCode[TDengineTypeCode["JSON"] = 15] = "JSON";
|
|
52
53
|
TDengineTypeCode[TDengineTypeCode["VARBINARY"] = 16] = "VARBINARY";
|
|
54
|
+
TDengineTypeCode[TDengineTypeCode["DECIMAL"] = 17] = "DECIMAL";
|
|
53
55
|
TDengineTypeCode[TDengineTypeCode["GEOMETRY"] = 20] = "GEOMETRY";
|
|
56
|
+
TDengineTypeCode[TDengineTypeCode["DECIMAL64"] = 21] = "DECIMAL64";
|
|
54
57
|
})(TDengineTypeCode || (exports.TDengineTypeCode = TDengineTypeCode = {}));
|
|
58
|
+
var TSDB_OPTION_CONNECTION;
|
|
59
|
+
(function (TSDB_OPTION_CONNECTION) {
|
|
60
|
+
TSDB_OPTION_CONNECTION[TSDB_OPTION_CONNECTION["TSDB_OPTION_CONNECTION_CHARSET"] = 0] = "TSDB_OPTION_CONNECTION_CHARSET";
|
|
61
|
+
TSDB_OPTION_CONNECTION[TSDB_OPTION_CONNECTION["TSDB_OPTION_CONNECTION_TIMEZONE"] = 1] = "TSDB_OPTION_CONNECTION_TIMEZONE";
|
|
62
|
+
TSDB_OPTION_CONNECTION[TSDB_OPTION_CONNECTION["TSDB_OPTION_CONNECTION_USER_IP"] = 2] = "TSDB_OPTION_CONNECTION_USER_IP";
|
|
63
|
+
TSDB_OPTION_CONNECTION[TSDB_OPTION_CONNECTION["TSDB_OPTION_CONNECTION_USER_APP"] = 3] = "TSDB_OPTION_CONNECTION_USER_APP";
|
|
64
|
+
})(TSDB_OPTION_CONNECTION || (exports.TSDB_OPTION_CONNECTION = TSDB_OPTION_CONNECTION = {}));
|
|
65
|
+
var FieldBindType;
|
|
66
|
+
(function (FieldBindType) {
|
|
67
|
+
FieldBindType[FieldBindType["TAOS_FIELD_COL"] = 1] = "TAOS_FIELD_COL";
|
|
68
|
+
FieldBindType[FieldBindType["TAOS_FIELD_TAG"] = 2] = "TAOS_FIELD_TAG";
|
|
69
|
+
FieldBindType[FieldBindType["TAOS_FIELD_QUERY"] = 3] = "TAOS_FIELD_QUERY";
|
|
70
|
+
FieldBindType[FieldBindType["TAOS_FIELD_TBNAME"] = 4] = "TAOS_FIELD_TBNAME";
|
|
71
|
+
})(FieldBindType || (exports.FieldBindType = FieldBindType = {}));
|
|
55
72
|
exports.TDenginePrecision = {
|
|
56
73
|
0: 'MILLISECOND',
|
|
57
74
|
1: "MICROSECOND",
|
|
58
75
|
2: "NANOSECOND",
|
|
59
76
|
};
|
|
60
77
|
exports.TDengineTypeLength = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
[TDengineTypeCode.BOOL]: 1,
|
|
79
|
+
[TDengineTypeCode.TINYINT]: 1,
|
|
80
|
+
[TDengineTypeCode.SMALLINT]: 2,
|
|
81
|
+
[TDengineTypeCode.INT]: 4,
|
|
82
|
+
[TDengineTypeCode.BIGINT]: 8,
|
|
83
|
+
[TDengineTypeCode.FLOAT]: 4,
|
|
84
|
+
[TDengineTypeCode.DOUBLE]: 8,
|
|
85
|
+
[TDengineTypeCode.TIMESTAMP]: 8,
|
|
86
|
+
[TDengineTypeCode.TINYINT_UNSIGNED]: 1,
|
|
87
|
+
[TDengineTypeCode.SMALLINT_UNSIGNED]: 2,
|
|
88
|
+
[TDengineTypeCode.INT_UNSIGNED]: 4,
|
|
89
|
+
[TDengineTypeCode.BIGINT_UNSIGNED]: 8,
|
|
73
90
|
};
|
|
74
91
|
exports.PrecisionLength = {
|
|
75
92
|
'ms': 13,
|
|
@@ -20,6 +20,8 @@ export declare class TaosResult {
|
|
|
20
20
|
private _precision;
|
|
21
21
|
protected _affectRows: number | null | undefined;
|
|
22
22
|
private _totalTime;
|
|
23
|
+
private fields_precisions?;
|
|
24
|
+
private fields_scales?;
|
|
23
25
|
/** unit nano seconds */
|
|
24
26
|
private _timing;
|
|
25
27
|
constructor(queryResponse?: WSQueryResponse);
|
|
@@ -37,6 +39,7 @@ export declare class TaosResult {
|
|
|
37
39
|
getTotalTime(): number;
|
|
38
40
|
addTotalTime(totalTime: number): void;
|
|
39
41
|
setTiming(timing?: bigint): void;
|
|
42
|
+
getFieldsScales(index: number): bigint | null;
|
|
40
43
|
/**
|
|
41
44
|
* Mapping the WebSocket response type code to TDengine's type name.
|
|
42
45
|
*/
|
|
@@ -44,8 +47,8 @@ export declare class TaosResult {
|
|
|
44
47
|
}
|
|
45
48
|
export declare function parseBlock(blocks: WSFetchBlockResponse, taosResult: TaosResult): TaosResult;
|
|
46
49
|
export declare function _isVarType(metaType: number): Number;
|
|
47
|
-
export declare function readSolidDataToArray(dataBuffer: DataView, colBlockHead: number, rows: number, metaType: number, bitMapArr: Uint8Array): any[];
|
|
48
|
-
export declare function readSolidData(dataBuffer: DataView, colDataHead: number, meta: ResponseMeta): Number | Boolean | BigInt;
|
|
50
|
+
export declare function readSolidDataToArray(dataBuffer: DataView, colBlockHead: number, rows: number, metaType: number, bitMapArr: Uint8Array, startOffset: number, colIndex: number): any[];
|
|
51
|
+
export declare function readSolidData(dataBuffer: DataView, colDataHead: number, meta: ResponseMeta, fields_scale: bigint | null): Number | Boolean | BigInt | string;
|
|
49
52
|
export declare function readBinary(dataBuffer: ArrayBuffer, colDataHead: number, length: number): ArrayBuffer;
|
|
50
53
|
export declare function readVarchar(dataBuffer: ArrayBuffer, colDataHead: number, length: number, textDecoder: TextDecoder): string;
|
|
51
54
|
export declare function readNchar(dataBuffer: ArrayBuffer, colDataHead: number, length: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taosResult.d.ts","sourceRoot":"","sources":["../../../src/common/taosResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"taosResult.d.ts","sourceRoot":"","sources":["../../../src/common/taosResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQ7E,MA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EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAIrH;AAkBD,wBAAgB,aAAa,CAAC,CAAC,EAAC,MAAM,GAAE,MAAM,CAE7C;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,MAAM,GAAE,MAAM,CAEvD;AAMD,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C"}
|
|
@@ -19,6 +19,7 @@ const constant_1 = require("./constant");
|
|
|
19
19
|
const wsError_1 = require("./wsError");
|
|
20
20
|
const ut8Helper_1 = require("./ut8Helper");
|
|
21
21
|
const log_1 = __importDefault(require("./log"));
|
|
22
|
+
const utils_1 = require("./utils");
|
|
22
23
|
class TaosResult {
|
|
23
24
|
constructor(queryResponse) {
|
|
24
25
|
this._totalTime = 0;
|
|
@@ -53,6 +54,8 @@ class TaosResult {
|
|
|
53
54
|
this._timing = queryResponse.timing;
|
|
54
55
|
this._precision = queryResponse.precision;
|
|
55
56
|
this._totalTime = queryResponse.totalTime;
|
|
57
|
+
this.fields_precisions = queryResponse.fields_precisions;
|
|
58
|
+
this.fields_scales = queryResponse.fields_scales;
|
|
56
59
|
}
|
|
57
60
|
setPrecision(precision) {
|
|
58
61
|
this._precision = precision;
|
|
@@ -114,6 +117,12 @@ class TaosResult {
|
|
|
114
117
|
this._timing = this._timing + timing;
|
|
115
118
|
}
|
|
116
119
|
}
|
|
120
|
+
getFieldsScales(index) {
|
|
121
|
+
if (this.fields_scales) {
|
|
122
|
+
return this.fields_scales[index];
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
117
126
|
/**
|
|
118
127
|
* Mapping the WebSocket response type code to TDengine's type name.
|
|
119
128
|
*/
|
|
@@ -175,7 +184,7 @@ function parseBlock(blocks, taosResult) {
|
|
|
175
184
|
row.push("NULL");
|
|
176
185
|
}
|
|
177
186
|
else {
|
|
178
|
-
row.push(readSolidData(dataView, colDataHead, metaList[j]));
|
|
187
|
+
row.push(readSolidData(dataView, colDataHead, metaList[j], taosResult.getFieldsScales(j)));
|
|
179
188
|
}
|
|
180
189
|
colBlockHead = colBlockHead + bitMapSize + dataView.getInt32(INT_32_SIZE * j, true);
|
|
181
190
|
}
|
|
@@ -235,7 +244,7 @@ function _isVarType(metaType) {
|
|
|
235
244
|
}
|
|
236
245
|
}
|
|
237
246
|
}
|
|
238
|
-
function readSolidDataToArray(dataBuffer, colBlockHead, rows, metaType, bitMapArr) {
|
|
247
|
+
function readSolidDataToArray(dataBuffer, colBlockHead, rows, metaType, bitMapArr, startOffset, colIndex) {
|
|
239
248
|
let result = [];
|
|
240
249
|
switch (metaType) {
|
|
241
250
|
case constant_1.TDengineTypeCode.BOOL:
|
|
@@ -350,13 +359,41 @@ function readSolidDataToArray(dataBuffer, colBlockHead, rows, metaType, bitMapAr
|
|
|
350
359
|
}
|
|
351
360
|
break;
|
|
352
361
|
}
|
|
362
|
+
case constant_1.TDengineTypeCode.DECIMAL64: {
|
|
363
|
+
let scale = getScaleFromRowBlock(dataBuffer, colIndex, startOffset);
|
|
364
|
+
for (let i = 0; i < rows; i++, colBlockHead += 8) {
|
|
365
|
+
if (isNull(bitMapArr, i)) {
|
|
366
|
+
result.push(null);
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
let decimalVal = dataBuffer.getBigInt64(colBlockHead, true);
|
|
370
|
+
result.push((0, utils_1.decimalToString)(decimalVal.toString(), BigInt(scale)));
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
case constant_1.TDengineTypeCode.DECIMAL: {
|
|
376
|
+
let scale = getScaleFromRowBlock(dataBuffer, colIndex, startOffset);
|
|
377
|
+
for (let i = 0; i < rows; i++, colBlockHead += 16) {
|
|
378
|
+
if (isNull(bitMapArr, i)) {
|
|
379
|
+
result.push(null);
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
let decimalHighPart = dataBuffer.getBigInt64(colBlockHead + 8, true);
|
|
383
|
+
const decimalLowPart = dataBuffer.getBigUint64(colBlockHead, true);
|
|
384
|
+
const decimalCombined = (decimalHighPart << 64n) | decimalLowPart;
|
|
385
|
+
result.push((0, utils_1.decimalToString)(decimalCombined.toString(), BigInt(scale)));
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
353
390
|
default: {
|
|
354
|
-
throw new wsError_1.WebSocketQueryInterFaceError(wsError_1.ErrorCode.ERR_UNSUPPORTED_TDENGINE_TYPE, `
|
|
391
|
+
throw new wsError_1.WebSocketQueryInterFaceError(wsError_1.ErrorCode.ERR_UNSUPPORTED_TDENGINE_TYPE, `unsupported type ${metaType}`);
|
|
355
392
|
}
|
|
356
393
|
}
|
|
357
394
|
return result;
|
|
358
395
|
}
|
|
359
|
-
function readSolidData(dataBuffer, colDataHead, meta) {
|
|
396
|
+
function readSolidData(dataBuffer, colDataHead, meta, fields_scale) {
|
|
360
397
|
switch (meta.type) {
|
|
361
398
|
case constant_1.TDengineTypeCode.BOOL: {
|
|
362
399
|
return (Boolean)(dataBuffer.getInt8(colDataHead));
|
|
@@ -395,8 +432,18 @@ function readSolidData(dataBuffer, colDataHead, meta) {
|
|
|
395
432
|
return dataBuffer.getBigInt64(colDataHead, true);
|
|
396
433
|
// could change
|
|
397
434
|
}
|
|
435
|
+
case constant_1.TDengineTypeCode.DECIMAL: {
|
|
436
|
+
let decimalHighPart = dataBuffer.getBigInt64(colDataHead + 8, true);
|
|
437
|
+
const decimalLowPart = dataBuffer.getBigUint64(colDataHead, true);
|
|
438
|
+
const decimalCombined = (decimalHighPart << 64n) | decimalLowPart;
|
|
439
|
+
return (0, utils_1.decimalToString)(decimalCombined.toString(), fields_scale);
|
|
440
|
+
}
|
|
441
|
+
case constant_1.TDengineTypeCode.DECIMAL64: {
|
|
442
|
+
let decimalVal = dataBuffer.getBigInt64(colDataHead, true);
|
|
443
|
+
return (0, utils_1.decimalToString)(decimalVal.toString(), fields_scale);
|
|
444
|
+
}
|
|
398
445
|
default: {
|
|
399
|
-
throw new wsError_1.WebSocketQueryInterFaceError(wsError_1.ErrorCode.ERR_UNSUPPORTED_TDENGINE_TYPE, `
|
|
446
|
+
throw new wsError_1.WebSocketQueryInterFaceError(wsError_1.ErrorCode.ERR_UNSUPPORTED_TDENGINE_TYPE, `unsupported type ${meta.type} for column ${meta.name}`);
|
|
400
447
|
}
|
|
401
448
|
}
|
|
402
449
|
}
|
|
@@ -447,3 +494,10 @@ function bitPos(n) {
|
|
|
447
494
|
function bitmapLen(n) {
|
|
448
495
|
return ((n) + ((1 << 3) - 1)) >> 3;
|
|
449
496
|
}
|
|
497
|
+
function getScaleFromRowBlock(buffer, colIndex, startOffset) {
|
|
498
|
+
// for decimal: |___bytes___|__empty__|___prec___|__scale___|
|
|
499
|
+
let backupPos = buffer.byteOffset + startOffset + 28 + colIndex * 5 + 1;
|
|
500
|
+
let scaleBuffer = new DataView(buffer.buffer, backupPos);
|
|
501
|
+
let scale = scaleBuffer.getInt32(0, true);
|
|
502
|
+
return scale & 0xFF;
|
|
503
|
+
}
|
|
@@ -14,4 +14,5 @@ export declare function safeDecodeURIComponent(str: string): string;
|
|
|
14
14
|
* 0 -> v1 === v2
|
|
15
15
|
*/
|
|
16
16
|
export declare function compareVersions(v1: string, v2: string): number;
|
|
17
|
+
export declare function decimalToString(valueStr: string, fields_scale: bigint | null): string;
|
|
17
18
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,wBAAgB,MAAM,CAAC,QAAQ,EAAC,QAAQ,GAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,wBAAgB,MAAM,CAAC,QAAQ,EAAC,QAAQ,GAAE,GAAG,CA6B5C;AAGD,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAM3C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,EAAE,GAAG,CAAC,EAAC,MAAM,GAAG,WAAW,CA6BnG;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,UAQjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAW9D;AAkDD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAmBrF"}
|
package/lib/src/common/utils.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.getBinarySql = getBinarySql;
|
|
|
6
6
|
exports.zigzagDecode = zigzagDecode;
|
|
7
7
|
exports.safeDecodeURIComponent = safeDecodeURIComponent;
|
|
8
8
|
exports.compareVersions = compareVersions;
|
|
9
|
+
exports.decimalToString = decimalToString;
|
|
9
10
|
const wsError_1 = require("./wsError");
|
|
10
11
|
function getUrl(wsConfig) {
|
|
11
12
|
let url = new URL(wsConfig.getUrl());
|
|
@@ -19,6 +20,16 @@ function getUrl(wsConfig) {
|
|
|
19
20
|
if (token) {
|
|
20
21
|
url.searchParams.set("token", token);
|
|
21
22
|
}
|
|
23
|
+
let timezone = wsConfig.getTimezone();
|
|
24
|
+
if (timezone) {
|
|
25
|
+
url.searchParams.set("timezone", timezone);
|
|
26
|
+
}
|
|
27
|
+
if (url.pathname && url.pathname !== '/') {
|
|
28
|
+
wsConfig.setDb(url.pathname.slice(1));
|
|
29
|
+
}
|
|
30
|
+
if (url.searchParams.has("timezone")) {
|
|
31
|
+
wsConfig.setTimezone(url.searchParams.get("timezone") || '');
|
|
32
|
+
}
|
|
22
33
|
url.pathname = '/ws';
|
|
23
34
|
return url;
|
|
24
35
|
}
|
|
@@ -135,3 +146,23 @@ function comparePreReleases(pre1, pre2) {
|
|
|
135
146
|
// compare pre release tag strings
|
|
136
147
|
return pre1.localeCompare(pre2);
|
|
137
148
|
}
|
|
149
|
+
function decimalToString(valueStr, fields_scale) {
|
|
150
|
+
let decimalStr = valueStr;
|
|
151
|
+
if (fields_scale && fields_scale > 0) {
|
|
152
|
+
const scale = Number(fields_scale);
|
|
153
|
+
const isNegative = decimalStr.startsWith('-');
|
|
154
|
+
const absStr = isNegative ? decimalStr.slice(1) : decimalStr;
|
|
155
|
+
if (absStr.length <= scale) {
|
|
156
|
+
// If the length of the number is less than or equal to the precision, add 0 before it.
|
|
157
|
+
const paddedStr = absStr.padStart(scale + 1, '0');
|
|
158
|
+
decimalStr = (isNegative ? '-' : '') + '0.' + paddedStr.slice(1);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// 在指定位置插入小数点
|
|
162
|
+
const integerPart = absStr.slice(0, absStr.length - scale);
|
|
163
|
+
const decimalPart = absStr.slice(absStr.length - scale);
|
|
164
|
+
decimalStr = (isNegative ? '-' : '') + integerPart + '.' + decimalPart;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return decimalStr;
|
|
168
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wsSql.d.ts","sourceRoot":"","sources":["../../../src/sql/wsSql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAc,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAG3C,OAAO,EAAE,SAAS,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-10,10 +10,11 @@ const wsClient_1 = require("../client/wsClient");
|
|
|
10
10
|
const wsError_1 = require("../common/wsError");
|
|
11
11
|
const utils_1 = require("../common/utils");
|
|
12
12
|
const wsResponse_1 = require("../client/wsResponse");
|
|
13
|
-
const wsStmt_1 = require("../stmt/wsStmt");
|
|
14
13
|
const reqid_1 = require("../common/reqid");
|
|
15
14
|
const constant_1 = require("../common/constant");
|
|
16
15
|
const log_1 = __importDefault(require("../common/log"));
|
|
16
|
+
const wsStmt1_1 = require("../stmt/wsStmt1");
|
|
17
|
+
const wsStmt2_1 = require("../stmt/wsStmt2");
|
|
17
18
|
class WsSql {
|
|
18
19
|
constructor(wsConfig) {
|
|
19
20
|
let url = (0, utils_1.getUrl)(wsConfig);
|
|
@@ -32,6 +33,16 @@ class WsSql {
|
|
|
32
33
|
if (database && database.length > 0) {
|
|
33
34
|
await wsSql.exec(`use ${database}`);
|
|
34
35
|
}
|
|
36
|
+
else {
|
|
37
|
+
await wsSql.exec('use information_schema');
|
|
38
|
+
}
|
|
39
|
+
let timezone = wsConfig.getTimezone();
|
|
40
|
+
if (timezone && timezone.length > 0) {
|
|
41
|
+
await wsSql._wsClient.setOptionConnection(constant_1.TSDB_OPTION_CONNECTION.TSDB_OPTION_CONNECTION_TIMEZONE, timezone);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
await wsSql._wsClient.setOptionConnection(constant_1.TSDB_OPTION_CONNECTION.TSDB_OPTION_CONNECTION_TIMEZONE, null);
|
|
45
|
+
}
|
|
35
46
|
return wsSql;
|
|
36
47
|
}
|
|
37
48
|
catch (e) {
|
|
@@ -89,7 +100,12 @@ class WsSql {
|
|
|
89
100
|
precision = constant_1.PrecisionLength[data[0][0]];
|
|
90
101
|
}
|
|
91
102
|
}
|
|
92
|
-
|
|
103
|
+
let version = await this.version();
|
|
104
|
+
let result = (0, utils_1.compareVersions)(version, this.wsConfig.getMinStmt2Version());
|
|
105
|
+
if (result < 0) {
|
|
106
|
+
return await wsStmt1_1.WsStmt1.newStmt(this._wsClient, precision, reqId);
|
|
107
|
+
}
|
|
108
|
+
return await wsStmt2_1.WsStmt2.newStmt(this._wsClient, precision, reqId);
|
|
93
109
|
}
|
|
94
110
|
catch (e) {
|
|
95
111
|
log_1.default.error(`stmtInit failed, code: ${e.code}, message: ${e.message}`);
|