@clickhouse/client-web 1.12.1 → 1.14.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/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/result_set.d.ts +4 -2
- package/dist/result_set.js +48 -23
- package/dist/result_set.js.map +1 -1
- package/dist/utils/encoder.d.ts +3 -0
- package/dist/utils/encoder.js +16 -2
- package/dist/utils/encoder.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/config.js
CHANGED
|
@@ -10,6 +10,6 @@ exports.WebImpl = {
|
|
|
10
10
|
fetch: config.fetch,
|
|
11
11
|
}),
|
|
12
12
|
make_result_set: ((stream, format, query_id, _log_error, response_headers) => new result_set_1.ResultSet(stream, format, query_id, response_headers)),
|
|
13
|
-
values_encoder: new utils_1.WebValuesEncoder(),
|
|
13
|
+
values_encoder: (jsonHandling) => new utils_1.WebValuesEncoder(jsonHandling),
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../packages/client-web/src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../packages/client-web/src/config.ts"],"names":[],"mappings":";;;AAQA,6CAA4C;AAC5C,6CAAwC;AACxC,mCAA0C;AAS7B,QAAA,OAAO,GAAkD;IACpE,eAAe,EAAE,CACf,MAAwC,EACxC,MAAwB,EACxB,EAAE,CACF,IAAI,0BAAa,CAAC;QAChB,GAAG,MAAM;QACT,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;IACJ,eAAe,EAAE,CAAC,CAChB,MAAsB,EACtB,MAAkB,EAClB,QAAgB,EAChB,UAAgC,EAChC,gBAAiC,EACjC,EAAE,CAAC,IAAI,sBAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAQ;IACtE,cAAc,EAAE,CAAC,YAA0B,EAAE,EAAE,CAC7C,IAAI,wBAAgB,CAAC,YAAY,CAAC;CACrC,CAAA"}
|
package/dist/result_set.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { BaseResultSet, DataFormat, ResponseHeaders, ResultJSONType, ResultStream, Row } from '@clickhouse/client-common';
|
|
1
|
+
import type { BaseResultSet, DataFormat, JSONHandling, ResponseHeaders, ResultJSONType, ResultStream, Row } from '@clickhouse/client-common';
|
|
2
2
|
export declare class ResultSet<Format extends DataFormat | unknown> implements BaseResultSet<ReadableStream<Row[]>, Format> {
|
|
3
3
|
private _stream;
|
|
4
4
|
private readonly format;
|
|
5
5
|
readonly query_id: string;
|
|
6
6
|
readonly response_headers: ResponseHeaders;
|
|
7
|
+
private readonly exceptionTag;
|
|
7
8
|
private isAlreadyConsumed;
|
|
8
|
-
|
|
9
|
+
private readonly jsonHandling;
|
|
10
|
+
constructor(_stream: ReadableStream, format: Format, query_id: string, _response_headers?: ResponseHeaders, jsonHandling?: JSONHandling);
|
|
9
11
|
/** See {@link BaseResultSet.text} */
|
|
10
12
|
text(): Promise<string>;
|
|
11
13
|
/** See {@link BaseResultSet.json} */
|
package/dist/result_set.js
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ResultSet = void 0;
|
|
4
4
|
const client_common_1 = require("@clickhouse/client-common");
|
|
5
|
+
const client_common_2 = require("@clickhouse/client-common");
|
|
5
6
|
const utils_1 = require("./utils");
|
|
6
7
|
const NEWLINE = 0x0a;
|
|
7
8
|
class ResultSet {
|
|
8
|
-
constructor(_stream, format, query_id, _response_headers
|
|
9
|
+
constructor(_stream, format, query_id, _response_headers, jsonHandling = {
|
|
10
|
+
parse: JSON.parse,
|
|
11
|
+
stringify: JSON.stringify,
|
|
12
|
+
}) {
|
|
9
13
|
Object.defineProperty(this, "_stream", {
|
|
10
14
|
enumerable: true,
|
|
11
15
|
configurable: true,
|
|
@@ -30,14 +34,28 @@ class ResultSet {
|
|
|
30
34
|
writable: true,
|
|
31
35
|
value: void 0
|
|
32
36
|
});
|
|
37
|
+
Object.defineProperty(this, "exceptionTag", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: undefined
|
|
42
|
+
});
|
|
33
43
|
Object.defineProperty(this, "isAlreadyConsumed", {
|
|
34
44
|
enumerable: true,
|
|
35
45
|
configurable: true,
|
|
36
46
|
writable: true,
|
|
37
47
|
value: false
|
|
38
48
|
});
|
|
49
|
+
Object.defineProperty(this, "jsonHandling", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: void 0
|
|
54
|
+
});
|
|
39
55
|
this.response_headers =
|
|
40
56
|
_response_headers !== undefined ? Object.freeze(_response_headers) : {};
|
|
57
|
+
this.exceptionTag = this.response_headers['x-clickhouse-exception-tag'];
|
|
58
|
+
this.jsonHandling = jsonHandling;
|
|
41
59
|
}
|
|
42
60
|
/** See {@link BaseResultSet.text} */
|
|
43
61
|
async text() {
|
|
@@ -47,10 +65,9 @@ class ResultSet {
|
|
|
47
65
|
/** See {@link BaseResultSet.json} */
|
|
48
66
|
async json() {
|
|
49
67
|
// JSONEachRow, etc.
|
|
50
|
-
if ((0,
|
|
68
|
+
if ((0, client_common_2.isStreamableJSONFamily)(this.format)) {
|
|
51
69
|
const result = [];
|
|
52
70
|
const reader = this.stream().getReader();
|
|
53
|
-
// eslint-disable-next-line no-constant-condition
|
|
54
71
|
while (true) {
|
|
55
72
|
const { done, value } = await reader.read();
|
|
56
73
|
if (done) {
|
|
@@ -63,9 +80,9 @@ class ResultSet {
|
|
|
63
80
|
return result;
|
|
64
81
|
}
|
|
65
82
|
// JSON, JSONObjectEachRow, etc.
|
|
66
|
-
if ((0,
|
|
83
|
+
if ((0, client_common_2.isNotStreamableJSONFamily)(this.format)) {
|
|
67
84
|
const text = await (0, utils_1.getAsText)(this._stream);
|
|
68
|
-
return
|
|
85
|
+
return this.jsonHandling.parse(text);
|
|
69
86
|
}
|
|
70
87
|
// should not be called for CSV, etc.
|
|
71
88
|
throw new Error(`Cannot decode ${this.format} as JSON`);
|
|
@@ -73,9 +90,11 @@ class ResultSet {
|
|
|
73
90
|
/** See {@link BaseResultSet.stream} */
|
|
74
91
|
stream() {
|
|
75
92
|
this.markAsConsumed();
|
|
76
|
-
(0,
|
|
93
|
+
(0, client_common_2.validateStreamFormat)(this.format);
|
|
77
94
|
let incompleteChunks = [];
|
|
78
95
|
let totalIncompleteLength = 0;
|
|
96
|
+
const exceptionTag = this.exceptionTag;
|
|
97
|
+
const jsonHandling = this.jsonHandling;
|
|
79
98
|
const decoder = new TextDecoder('utf-8');
|
|
80
99
|
const transform = new TransformStream({
|
|
81
100
|
start() {
|
|
@@ -89,24 +108,18 @@ class ResultSet {
|
|
|
89
108
|
let idx;
|
|
90
109
|
let lastIdx = 0;
|
|
91
110
|
do {
|
|
92
|
-
// an unescaped newline character denotes the end of a row
|
|
111
|
+
// an unescaped newline character denotes the end of a row,
|
|
112
|
+
// or at least the beginning of the exception marker
|
|
93
113
|
idx = chunk.indexOf(NEWLINE, lastIdx);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
totalIncompleteLength += incompleteChunk.length;
|
|
100
|
-
// send the extracted rows to the consumer, if any
|
|
101
|
-
if (rows.length > 0) {
|
|
102
|
-
controller.enqueue(rows);
|
|
114
|
+
if (idx !== -1) {
|
|
115
|
+
let bytesToDecode;
|
|
116
|
+
const maybeErr = (0, client_common_1.checkErrorInChunkAtIndex)(chunk, idx, exceptionTag);
|
|
117
|
+
if (maybeErr) {
|
|
118
|
+
controller.error(maybeErr);
|
|
103
119
|
}
|
|
104
|
-
|
|
105
|
-
else {
|
|
106
|
-
let text;
|
|
120
|
+
// using the incomplete chunks from the previous iterations
|
|
107
121
|
if (incompleteChunks.length > 0) {
|
|
108
122
|
const completeRowBytes = new Uint8Array(totalIncompleteLength + idx);
|
|
109
|
-
// using the incomplete chunks from the previous iterations
|
|
110
123
|
let offset = 0;
|
|
111
124
|
incompleteChunks.forEach((incompleteChunk) => {
|
|
112
125
|
completeRowBytes.set(incompleteChunk, offset);
|
|
@@ -118,19 +131,31 @@ class ResultSet {
|
|
|
118
131
|
// reset the incomplete chunks
|
|
119
132
|
incompleteChunks = [];
|
|
120
133
|
totalIncompleteLength = 0;
|
|
121
|
-
|
|
134
|
+
bytesToDecode = completeRowBytes;
|
|
122
135
|
}
|
|
123
136
|
else {
|
|
124
|
-
|
|
137
|
+
bytesToDecode = chunk.slice(lastIdx, idx);
|
|
125
138
|
}
|
|
139
|
+
const text = decoder.decode(bytesToDecode);
|
|
126
140
|
rows.push({
|
|
127
141
|
text,
|
|
128
142
|
json() {
|
|
129
|
-
return
|
|
143
|
+
return jsonHandling.parse(text);
|
|
130
144
|
},
|
|
131
145
|
});
|
|
132
146
|
lastIdx = idx + 1; // skipping newline character
|
|
133
147
|
}
|
|
148
|
+
else {
|
|
149
|
+
// there is no complete row in the rest of the current chunk
|
|
150
|
+
// to be processed during the next transform iteration
|
|
151
|
+
const incompleteChunk = chunk.slice(lastIdx);
|
|
152
|
+
incompleteChunks.push(incompleteChunk);
|
|
153
|
+
totalIncompleteLength += incompleteChunk.length;
|
|
154
|
+
// send the extracted rows to the consumer, if any
|
|
155
|
+
if (rows.length > 0) {
|
|
156
|
+
controller.enqueue(rows);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
134
159
|
} while (idx !== -1);
|
|
135
160
|
},
|
|
136
161
|
});
|
package/dist/result_set.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result_set.js","sourceRoot":"","sources":["../../../packages/client-web/src/result_set.ts"],"names":[],"mappings":";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CACF;AAvKD,8BAuKC;AAED,MAAM,4BAA4B,GAAG,kCAAkC,CAAA"}
|
package/dist/utils/encoder.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { DataFormat, InsertValues, ValuesEncoder } from '@clickhouse/client-common';
|
|
2
|
+
import { type JSONHandling } from '@clickhouse/client-common';
|
|
2
3
|
export declare class WebValuesEncoder implements ValuesEncoder<ReadableStream> {
|
|
4
|
+
private readonly json;
|
|
5
|
+
constructor(jsonHandling?: JSONHandling);
|
|
3
6
|
encodeValues<T = unknown>(values: InsertValues<T>, format: DataFormat): string | ReadableStream;
|
|
4
7
|
validateInsertValues<T = unknown>(values: InsertValues<T>): void;
|
|
5
8
|
}
|
package/dist/utils/encoder.js
CHANGED
|
@@ -4,15 +4,29 @@ exports.WebValuesEncoder = void 0;
|
|
|
4
4
|
const client_common_1 = require("@clickhouse/client-common");
|
|
5
5
|
const stream_1 = require("./stream");
|
|
6
6
|
class WebValuesEncoder {
|
|
7
|
+
constructor(jsonHandling = {
|
|
8
|
+
parse: JSON.parse,
|
|
9
|
+
stringify: JSON.stringify,
|
|
10
|
+
}) {
|
|
11
|
+
Object.defineProperty(this, "json", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
this.json = jsonHandling;
|
|
18
|
+
}
|
|
7
19
|
encodeValues(values, format) {
|
|
8
20
|
throwIfStream(values);
|
|
9
21
|
// JSON* arrays
|
|
10
22
|
if (Array.isArray(values)) {
|
|
11
|
-
return values
|
|
23
|
+
return values
|
|
24
|
+
.map((value) => (0, client_common_1.encodeJSON)(value, format, this.json.stringify))
|
|
25
|
+
.join('');
|
|
12
26
|
}
|
|
13
27
|
// JSON & JSONObjectEachRow format input
|
|
14
28
|
if (typeof values === 'object') {
|
|
15
|
-
return (0, client_common_1.encodeJSON)(values, format);
|
|
29
|
+
return (0, client_common_1.encodeJSON)(values, format, this.json.stringify);
|
|
16
30
|
}
|
|
17
31
|
throw new Error(`Cannot encode values of type ${typeof values} with ${format} format`);
|
|
18
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../../packages/client-web/src/utils/encoder.ts"],"names":[],"mappings":";;;AAKA,
|
|
1
|
+
{"version":3,"file":"encoder.js","sourceRoot":"","sources":["../../../../packages/client-web/src/utils/encoder.ts"],"names":[],"mappings":";;;AAKA,6DAAyE;AACzE,qCAAmC;AAEnC,MAAa,gBAAgB;IAG3B,YACE,eAA6B;QAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B;QANc;;;;;WAAkB;QAQjC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAA;IAC1B,CAAC;IAED,YAAY,CACV,MAAuB,EACvB,MAAkB;QAElB,aAAa,CAAC,MAAM,CAAC,CAAA;QACrB,eAAe;QACf,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,OAAO,MAAM;iBACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,0BAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBAC9D,IAAI,CAAC,EAAE,CAAC,CAAA;QACb,CAAC;QACD,wCAAwC;QACxC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO,IAAA,0BAAU,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACxD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,gCAAgC,OAAO,MAAM,SAAS,MAAM,SAAS,CACtE,CAAA;IACH,CAAC;IAED,oBAAoB,CAAc,MAAuB;QACvD,aAAa,CAAC,MAAM,CAAC,CAAA;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzD,MAAM,IAAI,KAAK,CACb,4DAA4D;gBAC1D,QAAQ,OAAO,MAAM,EAAE,CAC1B,CAAA;QACH,CAAC;IACH,CAAC;CACF;AAzCD,4CAyCC;AAED,SAAS,aAAa,CAAC,MAAe;IACpC,IAAI,IAAA,iBAAQ,EAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.14.0";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@clickhouse/client-web",
|
|
3
3
|
"description": "Official JS client for ClickHouse DB - Web API implementation",
|
|
4
4
|
"homepage": "https://clickhouse.com",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.14.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"clickhouse",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@clickhouse/client-common": "1.
|
|
23
|
+
"@clickhouse/client-common": "1.14.0"
|
|
24
24
|
}
|
|
25
25
|
}
|