@clickhouse/client-common 1.4.1 → 1.6.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/clickhouse_types.d.ts +2 -0
- package/dist/client.d.ts +27 -12
- package/dist/client.js +20 -10
- package/dist/client.js.map +1 -1
- package/dist/connection.d.ts +1 -0
- package/dist/utils/connection.d.ts +3 -3
- package/dist/utils/connection.js +3 -3
- package/dist/utils/connection.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -32,6 +32,8 @@ export interface ClickHouseSummary {
|
|
|
32
32
|
result_rows: string;
|
|
33
33
|
result_bytes: string;
|
|
34
34
|
elapsed_ns: string;
|
|
35
|
+
/** Available only after ClickHouse 24.9 */
|
|
36
|
+
real_time_microseconds?: string;
|
|
35
37
|
}
|
|
36
38
|
export type ResponseHeaders = Record<string, string | string[] | undefined>;
|
|
37
39
|
export interface WithClickHouseSummary {
|
package/dist/client.d.ts
CHANGED
|
@@ -45,10 +45,17 @@ export type ExecParams = BaseQueryParams & {
|
|
|
45
45
|
* If {@link ExecParamsWithValues.values} are defined, the query is sent as a request parameter,
|
|
46
46
|
* and the values are sent in the request body instead. */
|
|
47
47
|
query: string;
|
|
48
|
+
/** If set to `false`, the client _will not_ decompress the response stream, even if the response compression
|
|
49
|
+
* was requested by the client via the {@link BaseClickHouseClientConfigOptions.compression.response } setting.
|
|
50
|
+
* This could be useful if the response stream is passed to another application as-is,
|
|
51
|
+
* and the decompression is handled there.
|
|
52
|
+
* @note 1) Node.js only. This setting will have no effect on the Web version.
|
|
53
|
+
* @note 2) In case of an error, the stream will be decompressed anyway, regardless of this setting.
|
|
54
|
+
* @default true */
|
|
55
|
+
decompress_response_stream?: boolean;
|
|
48
56
|
};
|
|
49
57
|
export type ExecParamsWithValues<Stream> = ExecParams & {
|
|
50
|
-
/** If you have a custom INSERT statement to run with `exec`,
|
|
51
|
-
* the data from this stream will be inserted.
|
|
58
|
+
/** If you have a custom INSERT statement to run with `exec`, the data from this stream will be inserted.
|
|
52
59
|
*
|
|
53
60
|
* NB: the data in the stream is expected to be serialized accordingly to the FORMAT clause
|
|
54
61
|
* used in {@link ExecParams.query} in this case.
|
|
@@ -113,11 +120,12 @@ export declare class ClickHouseClient<Stream = unknown> {
|
|
|
113
120
|
private readonly logWriter;
|
|
114
121
|
constructor(config: BaseClickHouseClientConfigOptions & ImplementationDetails<Stream>);
|
|
115
122
|
/**
|
|
116
|
-
* Used for most statements that can have a response, such as SELECT
|
|
117
|
-
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is JSON)
|
|
118
|
-
* Consider using {@link ClickHouseClient.insert} for data insertion,
|
|
119
|
-
* or {@link ClickHouseClient.command} for DDLs.
|
|
123
|
+
* Used for most statements that can have a response, such as `SELECT`.
|
|
124
|
+
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is `JSON`).
|
|
125
|
+
* Consider using {@link ClickHouseClient.insert} for data insertion, or {@link ClickHouseClient.command} for DDLs.
|
|
120
126
|
* Returns an implementation of {@link BaseResultSet}.
|
|
127
|
+
*
|
|
128
|
+
* See {@link DataFormat} for the formats supported by the client.
|
|
121
129
|
*/
|
|
122
130
|
query<Format extends DataFormat = 'JSON'>(params: QueryParamsWithFormat<Format>): Promise<QueryResult<Stream, Format>>;
|
|
123
131
|
/**
|
|
@@ -125,21 +133,28 @@ export declare class ClickHouseClient<Stream = unknown> {
|
|
|
125
133
|
* when the format clause is not applicable, or when you are not interested in the response at all.
|
|
126
134
|
* Response stream is destroyed immediately as we do not expect useful information there.
|
|
127
135
|
* Examples of such statements are DDLs or custom inserts.
|
|
128
|
-
*
|
|
136
|
+
*
|
|
137
|
+
* @note if you have a custom query that does not work with {@link ClickHouseClient.query},
|
|
138
|
+
* and you are interested in the response data, consider using {@link ClickHouseClient.exec}.
|
|
129
139
|
*/
|
|
130
140
|
command(params: CommandParams): Promise<CommandResult>;
|
|
131
141
|
/**
|
|
132
|
-
* Similar to {@link ClickHouseClient.command}, but for the cases where the output
|
|
133
|
-
* but format clause is not applicable. The caller of this method
|
|
134
|
-
*
|
|
142
|
+
* Similar to {@link ClickHouseClient.command}, but for the cases where the output _is expected_,
|
|
143
|
+
* but format clause is not applicable. The caller of this method _must_ consume the stream,
|
|
144
|
+
* as the underlying socket will not be released until then, and the request will eventually be timed out.
|
|
145
|
+
*
|
|
146
|
+
* @note it is not intended to use this method to execute the DDLs, such as `CREATE TABLE` or similar;
|
|
147
|
+
* use {@link ClickHouseClient.command} instead.
|
|
135
148
|
*/
|
|
136
149
|
exec(params: ExecParams | ExecParamsWithValues<Stream>): Promise<ExecResult<Stream>>;
|
|
137
150
|
/**
|
|
138
151
|
* The primary method for data insertion. It is recommended to avoid arrays in case of large inserts
|
|
139
152
|
* to reduce application memory consumption and consider streaming for most of such use cases.
|
|
140
153
|
* As the insert operation does not provide any output, the response stream is immediately destroyed.
|
|
141
|
-
*
|
|
142
|
-
*
|
|
154
|
+
*
|
|
155
|
+
* @note in case of a custom insert operation (e.g., `INSERT FROM SELECT`),
|
|
156
|
+
* consider using {@link ClickHouseClient.command}, passing the entire raw query there
|
|
157
|
+
* (including the `FORMAT` clause).
|
|
143
158
|
*/
|
|
144
159
|
insert<T>(params: InsertParams<Stream, T>): Promise<InsertResult>;
|
|
145
160
|
/**
|
package/dist/client.js
CHANGED
|
@@ -60,11 +60,12 @@ class ClickHouseClient {
|
|
|
60
60
|
this.valuesEncoder = config.impl.values_encoder;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Used for most statements that can have a response, such as SELECT
|
|
64
|
-
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is JSON)
|
|
65
|
-
* Consider using {@link ClickHouseClient.insert} for data insertion,
|
|
66
|
-
* or {@link ClickHouseClient.command} for DDLs.
|
|
63
|
+
* Used for most statements that can have a response, such as `SELECT`.
|
|
64
|
+
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is `JSON`).
|
|
65
|
+
* Consider using {@link ClickHouseClient.insert} for data insertion, or {@link ClickHouseClient.command} for DDLs.
|
|
67
66
|
* Returns an implementation of {@link BaseResultSet}.
|
|
67
|
+
*
|
|
68
|
+
* See {@link DataFormat} for the formats supported by the client.
|
|
68
69
|
*/
|
|
69
70
|
async query(params) {
|
|
70
71
|
const format = params.format ?? 'JSON';
|
|
@@ -92,7 +93,9 @@ class ClickHouseClient {
|
|
|
92
93
|
* when the format clause is not applicable, or when you are not interested in the response at all.
|
|
93
94
|
* Response stream is destroyed immediately as we do not expect useful information there.
|
|
94
95
|
* Examples of such statements are DDLs or custom inserts.
|
|
95
|
-
*
|
|
96
|
+
*
|
|
97
|
+
* @note if you have a custom query that does not work with {@link ClickHouseClient.query},
|
|
98
|
+
* and you are interested in the response data, consider using {@link ClickHouseClient.exec}.
|
|
96
99
|
*/
|
|
97
100
|
async command(params) {
|
|
98
101
|
const query = removeTrailingSemi(params.query.trim());
|
|
@@ -102,16 +105,21 @@ class ClickHouseClient {
|
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
107
|
/**
|
|
105
|
-
* Similar to {@link ClickHouseClient.command}, but for the cases where the output
|
|
106
|
-
* but format clause is not applicable. The caller of this method
|
|
107
|
-
*
|
|
108
|
+
* Similar to {@link ClickHouseClient.command}, but for the cases where the output _is expected_,
|
|
109
|
+
* but format clause is not applicable. The caller of this method _must_ consume the stream,
|
|
110
|
+
* as the underlying socket will not be released until then, and the request will eventually be timed out.
|
|
111
|
+
*
|
|
112
|
+
* @note it is not intended to use this method to execute the DDLs, such as `CREATE TABLE` or similar;
|
|
113
|
+
* use {@link ClickHouseClient.command} instead.
|
|
108
114
|
*/
|
|
109
115
|
async exec(params) {
|
|
110
116
|
const query = removeTrailingSemi(params.query.trim());
|
|
111
117
|
const values = 'values' in params ? params.values : undefined;
|
|
118
|
+
const decompress_response_stream = params.decompress_response_stream ?? true;
|
|
112
119
|
return await this.connection.exec({
|
|
113
120
|
query,
|
|
114
121
|
values,
|
|
122
|
+
decompress_response_stream,
|
|
115
123
|
...this.withClientQueryParams(params),
|
|
116
124
|
});
|
|
117
125
|
}
|
|
@@ -119,8 +127,10 @@ class ClickHouseClient {
|
|
|
119
127
|
* The primary method for data insertion. It is recommended to avoid arrays in case of large inserts
|
|
120
128
|
* to reduce application memory consumption and consider streaming for most of such use cases.
|
|
121
129
|
* As the insert operation does not provide any output, the response stream is immediately destroyed.
|
|
122
|
-
*
|
|
123
|
-
*
|
|
130
|
+
*
|
|
131
|
+
* @note in case of a custom insert operation (e.g., `INSERT FROM SELECT`),
|
|
132
|
+
* consider using {@link ClickHouseClient.command}, passing the entire raw query there
|
|
133
|
+
* (including the `FORMAT` clause).
|
|
124
134
|
*/
|
|
125
135
|
async insert(params) {
|
|
126
136
|
if (Array.isArray(params.values) && params.values.length === 0) {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../packages/client-common/src/client.ts"],"names":[],"mappings":";;;AAYA,6DAA0E;AAG1E,qCAAoE;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../packages/client-common/src/client.ts"],"names":[],"mappings":";;;AAYA,6DAA0E;AAG1E,qCAAoE;AAmIpE,MAAa,gBAAgB;IAS3B,YACE,MAAyE;QAT1D;;;;;WAA4C;QAC5C;;;;;WAAkC;QAClC;;;;;WAA8B;QAC9B;;;;;WAAoC;QACpC;;;;;WAAoC;QACpC;;;;;WAAkB;QAClB;;;;;WAAoB;QAKnC,MAAM,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,WAAW;YACrC,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC9B,CAAC,CAAC,IAAI,6BAAa,EAAE,CAAA;QACvB,MAAM,aAAa,GAAG,IAAA,6BAAoB,EACxC,MAAM,EACN,MAAM,EACN,MAAM,CAAC,IAAI,CAAC,0BAA0B,IAAI,IAAI,CAC/C,CAAA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,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;QACnE,CAAC;IACH,CAAC;IACD,OAAO,eAAe,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,WAAW,WAAW,MAAM,EAAE,CAAA;AAC5E,CAAC"}
|
package/dist/connection.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface ConnInsertParams<Stream> extends ConnBaseQueryParams {
|
|
|
38
38
|
}
|
|
39
39
|
export interface ConnExecParams<Stream> extends ConnBaseQueryParams {
|
|
40
40
|
values?: Stream;
|
|
41
|
+
decompress_response_stream?: boolean;
|
|
41
42
|
}
|
|
42
43
|
export interface ConnBaseResult extends WithResponseHeaders {
|
|
43
44
|
query_id: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ClickHouseSettings } from '../settings';
|
|
2
2
|
export type HttpHeader = number | string | string[];
|
|
3
3
|
export type HttpHeaders = Record<string, HttpHeader | undefined>;
|
|
4
|
-
export declare function withCompressionHeaders({ headers,
|
|
4
|
+
export declare function withCompressionHeaders({ headers, enable_request_compression, enable_response_compression, }: {
|
|
5
5
|
headers: HttpHeaders;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
enable_request_compression: boolean | undefined;
|
|
7
|
+
enable_response_compression: boolean | undefined;
|
|
8
8
|
}): Record<string, string>;
|
|
9
9
|
export declare function withHttpSettings(clickhouse_settings?: ClickHouseSettings, compression?: boolean): ClickHouseSettings;
|
|
10
10
|
export declare function isSuccessfulResponse(statusCode?: number): boolean;
|
package/dist/utils/connection.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isSuccessfulResponse = exports.withHttpSettings = exports.withCompressionHeaders = void 0;
|
|
4
|
-
function withCompressionHeaders({ headers,
|
|
4
|
+
function withCompressionHeaders({ headers, enable_request_compression, enable_response_compression, }) {
|
|
5
5
|
return {
|
|
6
6
|
...headers,
|
|
7
|
-
...(
|
|
8
|
-
...(
|
|
7
|
+
...(enable_response_compression ? { 'Accept-Encoding': 'gzip' } : {}),
|
|
8
|
+
...(enable_request_compression ? { 'Content-Encoding': 'gzip' } : {}),
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
exports.withCompressionHeaders = withCompressionHeaders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../../packages/client-common/src/utils/connection.ts"],"names":[],"mappings":";;;AAKA,SAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../../packages/client-common/src/utils/connection.ts"],"names":[],"mappings":";;;AAKA,SAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,0BAA0B,EAC1B,2BAA2B,GAK5B;IACC,OAAO;QACL,GAAG,OAAO;QACV,GAAG,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtE,CAAA;AACH,CAAC;AAdD,wDAcC;AAED,SAAgB,gBAAgB,CAC9B,mBAAwC,EACxC,WAAqB;IAErB,OAAO;QACL,GAAG,CAAC,WAAW;YACb,CAAC,CAAC;gBACE,uBAAuB,EAAE,CAAC;aAC3B;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,mBAAmB;KACvB,CAAA;AACH,CAAC;AAZD,4CAYC;AAED,SAAgB,oBAAoB,CAAC,UAAmB;IACtD,OAAO,OAAO,CAAC,UAAU,IAAI,GAAG,IAAI,UAAU,IAAI,UAAU,GAAG,GAAG,CAAC,CAAA;AACrE,CAAC;AAFD,oDAEC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.6.0";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/package.json
CHANGED