@clickhouse/client-common 1.3.0 → 1.4.1
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/client.d.ts +16 -4
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/connection.d.ts +4 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/sleep.js +10 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -40,10 +40,22 @@ export type QueryParamsWithFormat<Format extends DataFormat> = Omit<QueryParams,
|
|
|
40
40
|
* allowing to call all methods with all data shapes variants,
|
|
41
41
|
* and avoiding generated types that include all possible DataFormat literal values. */
|
|
42
42
|
export type QueryResult<Stream, Format extends DataFormat> = IsSame<Format, DataFormat> extends true ? BaseResultSet<Stream, unknown> : BaseResultSet<Stream, Format>;
|
|
43
|
-
export
|
|
44
|
-
/** Statement to execute.
|
|
43
|
+
export type ExecParams = BaseQueryParams & {
|
|
44
|
+
/** Statement to execute (including the FORMAT clause). By default, the query will be sent in the request body;
|
|
45
|
+
* If {@link ExecParamsWithValues.values} are defined, the query is sent as a request parameter,
|
|
46
|
+
* and the values are sent in the request body instead. */
|
|
45
47
|
query: string;
|
|
46
|
-
}
|
|
48
|
+
};
|
|
49
|
+
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.
|
|
52
|
+
*
|
|
53
|
+
* NB: the data in the stream is expected to be serialized accordingly to the FORMAT clause
|
|
54
|
+
* used in {@link ExecParams.query} in this case.
|
|
55
|
+
*
|
|
56
|
+
* @see https://clickhouse.com/docs/en/interfaces/formats */
|
|
57
|
+
values: Stream;
|
|
58
|
+
};
|
|
47
59
|
export type CommandParams = ExecParams;
|
|
48
60
|
export type CommandResult = {
|
|
49
61
|
query_id: string;
|
|
@@ -121,7 +133,7 @@ export declare class ClickHouseClient<Stream = unknown> {
|
|
|
121
133
|
* but format clause is not applicable. The caller of this method is expected to consume the stream,
|
|
122
134
|
* otherwise, the request will eventually be timed out.
|
|
123
135
|
*/
|
|
124
|
-
exec(params: ExecParams): Promise<ExecResult<Stream>>;
|
|
136
|
+
exec(params: ExecParams | ExecParamsWithValues<Stream>): Promise<ExecResult<Stream>>;
|
|
125
137
|
/**
|
|
126
138
|
* The primary method for data insertion. It is recommended to avoid arrays in case of large inserts
|
|
127
139
|
* to reduce application memory consumption and consider streaming for most of such use cases.
|
package/dist/client.js
CHANGED
|
@@ -108,8 +108,10 @@ class ClickHouseClient {
|
|
|
108
108
|
*/
|
|
109
109
|
async exec(params) {
|
|
110
110
|
const query = removeTrailingSemi(params.query.trim());
|
|
111
|
+
const values = 'values' in params ? params.values : undefined;
|
|
111
112
|
return await this.connection.exec({
|
|
112
113
|
query,
|
|
114
|
+
values,
|
|
113
115
|
...this.withClientQueryParams(params),
|
|
114
116
|
});
|
|
115
117
|
}
|
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;AA4HpE,MAAa,gBAAgB;IAS3B,YACE,MAAyE;QAT1D;;;;;WAA4C;QAC5C;;;;;WAAkC;QAClC;;;;;WAA8B;QAC9B;;;;;WAAoC;QACpC;;;;;WAAoC;QACpC;;;;;WAAkB;QAClB;;;;;WAAoB;QAKn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G,CAAA;QACjD,CAAC;aAAM,IACL,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC;YACrC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAChC,CAAC;YACD,WAAW,GAAG,eAAe,MAAM,CAAC,OAAO,CAAC,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
|
@@ -36,6 +36,9 @@ export interface ConnBaseQueryParams {
|
|
|
36
36
|
export interface ConnInsertParams<Stream> extends ConnBaseQueryParams {
|
|
37
37
|
values: string | Stream;
|
|
38
38
|
}
|
|
39
|
+
export interface ConnExecParams<Stream> extends ConnBaseQueryParams {
|
|
40
|
+
values?: Stream;
|
|
41
|
+
}
|
|
39
42
|
export interface ConnBaseResult extends WithResponseHeaders {
|
|
40
43
|
query_id: string;
|
|
41
44
|
}
|
|
@@ -58,6 +61,6 @@ export interface Connection<Stream> {
|
|
|
58
61
|
close(): Promise<void>;
|
|
59
62
|
query(params: ConnBaseQueryParams): Promise<ConnQueryResult<Stream>>;
|
|
60
63
|
insert(params: ConnInsertParams<Stream>): Promise<ConnInsertResult>;
|
|
61
|
-
exec(params:
|
|
64
|
+
exec(params: ConnExecParams<Stream>): Promise<ConnExecResult<Stream>>;
|
|
62
65
|
command(params: ConnBaseQueryParams): Promise<ConnCommandResult>;
|
|
63
66
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export { type ClickHouseSettings, type MergeTreeSettings, SettingsMap, } from '.
|
|
|
10
10
|
/** For implementations usage only - should not be re-exported */
|
|
11
11
|
export { formatQuerySettings, formatQueryParams, encodeJSON, isSupportedRawFormat, isStreamableJSONFamily, isNotStreamableJSONFamily, validateStreamFormat, } from './data_formatter';
|
|
12
12
|
export { type ValuesEncoder, type MakeResultSet, type MakeConnection, type HandleImplSpecificURLParams, type ImplementationDetails, booleanConfigURLValue, enumConfigURLValue, getConnectionParams, numberConfigURLValue, } from './config';
|
|
13
|
-
export {
|
|
13
|
+
export { isSuccessfulResponse, sleep, toSearchParams, transformUrl, withCompressionHeaders, withHttpSettings, } from './utils';
|
|
14
14
|
export { LogWriter, DefaultLogger, type LogWriterParams } from './logger';
|
|
15
15
|
export { parseError } from './error';
|
|
16
|
-
export type { CompressionSettings, Connection, ConnectionParams, ConnInsertResult, ConnExecResult, ConnQueryResult, ConnBaseQueryParams, ConnBaseResult, ConnInsertParams, ConnPingResult, ConnCommandResult, ConnOperation, } from './connection';
|
|
16
|
+
export type { CompressionSettings, Connection, ConnectionParams, ConnInsertResult, ConnExecParams, ConnExecResult, ConnQueryResult, ConnBaseQueryParams, ConnBaseResult, ConnInsertParams, ConnPingResult, ConnCommandResult, ConnOperation, } from './connection';
|
|
17
17
|
export type { QueryParamsWithFormat } from './client';
|
|
18
18
|
export type { IsSame } from './ts_utils';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseError = exports.DefaultLogger = exports.LogWriter = exports.withHttpSettings = exports.transformUrl = exports.toSearchParams = exports.
|
|
3
|
+
exports.parseError = exports.DefaultLogger = exports.LogWriter = exports.withHttpSettings = exports.withCompressionHeaders = exports.transformUrl = exports.toSearchParams = exports.sleep = exports.isSuccessfulResponse = exports.numberConfigURLValue = exports.getConnectionParams = exports.enumConfigURLValue = exports.booleanConfigURLValue = exports.validateStreamFormat = exports.isNotStreamableJSONFamily = exports.isStreamableJSONFamily = exports.isSupportedRawFormat = exports.encodeJSON = exports.formatQueryParams = exports.formatQuerySettings = exports.SettingsMap = exports.ClickHouseLogLevel = exports.ClickHouseError = exports.ClickHouseClient = void 0;
|
|
4
4
|
/** Should be re-exported by the implementation */
|
|
5
5
|
var client_1 = require("./client");
|
|
6
6
|
Object.defineProperty(exports, "ClickHouseClient", { enumerable: true, get: function () { return client_1.ClickHouseClient; } });
|
|
@@ -25,10 +25,11 @@ Object.defineProperty(exports, "enumConfigURLValue", { enumerable: true, get: fu
|
|
|
25
25
|
Object.defineProperty(exports, "getConnectionParams", { enumerable: true, get: function () { return config_1.getConnectionParams; } });
|
|
26
26
|
Object.defineProperty(exports, "numberConfigURLValue", { enumerable: true, get: function () { return config_1.numberConfigURLValue; } });
|
|
27
27
|
var utils_1 = require("./utils");
|
|
28
|
-
Object.defineProperty(exports, "withCompressionHeaders", { enumerable: true, get: function () { return utils_1.withCompressionHeaders; } });
|
|
29
28
|
Object.defineProperty(exports, "isSuccessfulResponse", { enumerable: true, get: function () { return utils_1.isSuccessfulResponse; } });
|
|
29
|
+
Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return utils_1.sleep; } });
|
|
30
30
|
Object.defineProperty(exports, "toSearchParams", { enumerable: true, get: function () { return utils_1.toSearchParams; } });
|
|
31
31
|
Object.defineProperty(exports, "transformUrl", { enumerable: true, get: function () { return utils_1.transformUrl; } });
|
|
32
|
+
Object.defineProperty(exports, "withCompressionHeaders", { enumerable: true, get: function () { return utils_1.withCompressionHeaders; } });
|
|
32
33
|
Object.defineProperty(exports, "withHttpSettings", { enumerable: true, get: function () { return utils_1.withHttpSettings; } });
|
|
33
34
|
var logger_2 = require("./logger");
|
|
34
35
|
Object.defineProperty(exports, "LogWriter", { enumerable: true, get: function () { return logger_2.LogWriter; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/client-common/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,mCAaiB;AANf,0GAAA,gBAAgB,OAAA;AA6BlB,iCAAyC;AAAhC,wGAAA,eAAe,OAAA;AACxB,mCAMiB;AALf,4GAAA,kBAAkB,OAAA;AAepB,uCAImB;AADjB,uGAAA,WAAW,OAAA;AAGb,iEAAiE;AACjE,mDAQyB;AAPvB,qHAAA,mBAAmB,OAAA;AACnB,mHAAA,iBAAiB,OAAA;AACjB,4GAAA,UAAU,OAAA;AACV,sHAAA,oBAAoB,OAAA;AACpB,wHAAA,sBAAsB,OAAA;AACtB,2HAAA,yBAAyB,OAAA;AACzB,sHAAA,oBAAoB,OAAA;AAEtB,mCAUiB;AAJf,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA;AAClB,6GAAA,mBAAmB,OAAA;AACnB,8GAAA,oBAAoB,OAAA;AAEtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/client-common/src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,mCAaiB;AANf,0GAAA,gBAAgB,OAAA;AA6BlB,iCAAyC;AAAhC,wGAAA,eAAe,OAAA;AACxB,mCAMiB;AALf,4GAAA,kBAAkB,OAAA;AAepB,uCAImB;AADjB,uGAAA,WAAW,OAAA;AAGb,iEAAiE;AACjE,mDAQyB;AAPvB,qHAAA,mBAAmB,OAAA;AACnB,mHAAA,iBAAiB,OAAA;AACjB,4GAAA,UAAU,OAAA;AACV,sHAAA,oBAAoB,OAAA;AACpB,wHAAA,sBAAsB,OAAA;AACtB,2HAAA,yBAAyB,OAAA;AACzB,sHAAA,oBAAoB,OAAA;AAEtB,mCAUiB;AAJf,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA;AAClB,6GAAA,mBAAmB,OAAA;AACnB,8GAAA,oBAAoB,OAAA;AAEtB,iCAOgB;AANd,6GAAA,oBAAoB,OAAA;AACpB,8FAAA,KAAK,OAAA;AACL,uGAAA,cAAc,OAAA;AACd,qGAAA,YAAY,OAAA;AACZ,+GAAA,sBAAsB,OAAA;AACtB,yGAAA,gBAAgB,OAAA;AAElB,mCAAyE;AAAhE,mGAAA,SAAS,OAAA;AAAE,uGAAA,aAAa,OAAA;AACjC,iCAAoC;AAA3B,mGAAA,UAAU,OAAA"}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./connection"), exports);
|
|
18
|
+
__exportStar(require("./sleep"), exports);
|
|
18
19
|
__exportStar(require("./url"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client-common/src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,wCAAqB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client-common/src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,0CAAuB;AACvB,wCAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sleep = void 0;
|
|
4
|
+
async function sleep(ms) {
|
|
5
|
+
await new Promise((resolve) => setTimeout(() => {
|
|
6
|
+
resolve(void 0);
|
|
7
|
+
}, ms));
|
|
8
|
+
}
|
|
9
|
+
exports.sleep = sleep;
|
|
10
|
+
//# sourceMappingURL=sleep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.js","sourceRoot":"","sources":["../../../../packages/client-common/src/utils/sleep.ts"],"names":[],"mappings":";;;AAAO,KAAK,UAAU,KAAK,CAAC,EAAU;IACpC,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAC5B,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;IACjB,CAAC,EAAE,EAAE,CAAC,CACP,CAAA;AACH,CAAC;AAND,sBAMC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.4.1";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/package.json
CHANGED