@clickhouse/client-common 1.19.0 → 1.20.0-head.97f135e.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/README.md +8 -2
- package/dist/client.d.ts +11 -2
- package/dist/client.js +16 -6
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +43 -7
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
<img alt="NPM Downloads" src="https://img.shields.io/npm/dw/%40clickhouse%2Fclient?color=%233178C6&logo=npm">
|
|
13
13
|
</a>
|
|
14
14
|
|
|
15
|
-
<a href="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests.yml">
|
|
16
|
-
<img src="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests.yml/badge.svg?branch=main">
|
|
15
|
+
<a href="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-node.yml">
|
|
16
|
+
<img src="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-node.yml/badge.svg?branch=main">
|
|
17
|
+
</a>
|
|
18
|
+
|
|
19
|
+
<a href="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-web.yml">
|
|
20
|
+
<img src="https://github.com/ClickHouse/clickhouse-js/actions/workflows/tests-web.yml/badge.svg?branch=main">
|
|
17
21
|
</a>
|
|
18
22
|
|
|
19
23
|
<a href="https://codecov.io/gh/ClickHouse/clickhouse-js">
|
|
@@ -135,3 +139,5 @@ If you have any questions or need help, feel free to reach out to us in the [Com
|
|
|
135
139
|
## Contributing
|
|
136
140
|
|
|
137
141
|
Check out our [contributing guide](./CONTRIBUTING.md).
|
|
142
|
+
|
|
143
|
+
If you'd like to build a client for an alternative runtime (such as Bun or Cloudflare Workers) or an alternative protocol (such as the native ClickHouse protocol or gRPC over a proxy), see [Building specialized clients for alternative runtimes and protocols](./ALTERNATIVE_CLIENTS.md).
|
package/dist/client.d.ts
CHANGED
|
@@ -150,10 +150,19 @@ export declare class ClickHouseClient<Stream = unknown> {
|
|
|
150
150
|
constructor(config: BaseClickHouseClientConfigOptions & ImplementationDetails<Stream>);
|
|
151
151
|
/**
|
|
152
152
|
* Used for most statements that can have a response, such as `SELECT`.
|
|
153
|
-
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is `JSON`).
|
|
154
|
-
* Consider using {@link ClickHouseClient.insert} for data insertion, or {@link ClickHouseClient.command} for DDLs.
|
|
155
153
|
* Returns an implementation of {@link BaseResultSet}.
|
|
156
154
|
*
|
|
155
|
+
* The `FORMAT` clause should be specified separately via {@link QueryParams.format} (default is `JSON`);
|
|
156
|
+
* this method will always append `FORMAT <format>` to the end of {@link QueryParams.query}.
|
|
157
|
+
* If the query already contains a `FORMAT` clause, ClickHouse will return a syntax error due to a duplicate `FORMAT`.
|
|
158
|
+
* This is intended behavior.
|
|
159
|
+
* Use {@link ClickHouseClient.insert} for data insertion, {@link ClickHouseClient.command} for DDLs,
|
|
160
|
+
* or {@link ClickHouseClient.exec} for queries where you need to provide the full SQL (including `FORMAT`) yourself or where the `FORMAT` suffix is not supported.
|
|
161
|
+
*
|
|
162
|
+
* @note For `SHOW [ROW] POLICIES`, use the full syntax `SHOW POLICIES ON *`,
|
|
163
|
+
* as the short version does not support appending `FORMAT` at the server SQL parser level.
|
|
164
|
+
* See https://github.com/ClickHouse/ClickHouse/issues/105899
|
|
165
|
+
*
|
|
157
166
|
* See {@link DataFormat} for the formats supported by the client.
|
|
158
167
|
*/
|
|
159
168
|
query<Format extends DataFormat = 'JSON'>(params: QueryParamsWithFormat<Format>): Promise<QueryResult<Stream, Format>>;
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ClickHouseClient = void 0;
|
|
4
|
-
const
|
|
4
|
+
const parse_1 = require("./parse");
|
|
5
|
+
const logger_1 = require("./logger");
|
|
5
6
|
const config_1 = require("./config");
|
|
6
7
|
class ClickHouseClient {
|
|
7
8
|
clientClickHouseSettings;
|
|
@@ -15,7 +16,7 @@ class ClickHouseClient {
|
|
|
15
16
|
constructor(config) {
|
|
16
17
|
const logger = config?.log?.LoggerClass
|
|
17
18
|
? new config.log.LoggerClass()
|
|
18
|
-
: new
|
|
19
|
+
: new logger_1.DefaultLogger();
|
|
19
20
|
const configWithURL = (0, config_1.prepareConfigWithURL)(config, logger, config.impl.handle_specific_url_params ?? null);
|
|
20
21
|
this.connectionParams = (0, config_1.getConnectionParams)(configWithURL, logger);
|
|
21
22
|
this.clientClickHouseSettings = this.connectionParams.clickhouse_settings;
|
|
@@ -26,17 +27,26 @@ class ClickHouseClient {
|
|
|
26
27
|
// TODO: it would be better to parse the log level in the client itself.
|
|
27
28
|
this.makeResultSet = config.impl.make_result_set;
|
|
28
29
|
this.jsonHandling = {
|
|
29
|
-
...
|
|
30
|
+
...parse_1.defaultJSONHandling,
|
|
30
31
|
...config.json,
|
|
31
32
|
};
|
|
32
33
|
this.valuesEncoder = config.impl.values_encoder(this.jsonHandling);
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Used for most statements that can have a response, such as `SELECT`.
|
|
36
|
-
* FORMAT clause should be specified separately via {@link QueryParams.format} (default is `JSON`).
|
|
37
|
-
* Consider using {@link ClickHouseClient.insert} for data insertion, or {@link ClickHouseClient.command} for DDLs.
|
|
38
37
|
* Returns an implementation of {@link BaseResultSet}.
|
|
39
38
|
*
|
|
39
|
+
* The `FORMAT` clause should be specified separately via {@link QueryParams.format} (default is `JSON`);
|
|
40
|
+
* this method will always append `FORMAT <format>` to the end of {@link QueryParams.query}.
|
|
41
|
+
* If the query already contains a `FORMAT` clause, ClickHouse will return a syntax error due to a duplicate `FORMAT`.
|
|
42
|
+
* This is intended behavior.
|
|
43
|
+
* Use {@link ClickHouseClient.insert} for data insertion, {@link ClickHouseClient.command} for DDLs,
|
|
44
|
+
* or {@link ClickHouseClient.exec} for queries where you need to provide the full SQL (including `FORMAT`) yourself or where the `FORMAT` suffix is not supported.
|
|
45
|
+
*
|
|
46
|
+
* @note For `SHOW [ROW] POLICIES`, use the full syntax `SHOW POLICIES ON *`,
|
|
47
|
+
* as the short version does not support appending `FORMAT` at the server SQL parser level.
|
|
48
|
+
* See https://github.com/ClickHouse/ClickHouse/issues/105899
|
|
49
|
+
*
|
|
40
50
|
* See {@link DataFormat} for the formats supported by the client.
|
|
41
51
|
*/
|
|
42
52
|
async query(params) {
|
|
@@ -49,7 +59,7 @@ class ClickHouseClient {
|
|
|
49
59
|
});
|
|
50
60
|
const { log_writer, log_level } = this.connectionParams;
|
|
51
61
|
return this.makeResultSet(stream, format, query_id, (err) => {
|
|
52
|
-
if (log_level <=
|
|
62
|
+
if (log_level <= logger_1.ClickHouseLogLevel.ERROR) {
|
|
53
63
|
log_writer.error({
|
|
54
64
|
err,
|
|
55
65
|
module: 'Client',
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAYA,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAYA,mCAA6C;AAC7C,qCAA4D;AAO5D,qCAAoE;AAkKpE,MAAa,gBAAgB;IACV,wBAAwB,CAAoB;IAC5C,gBAAgB,CAAkB;IAClC,UAAU,CAAoB;IAC9B,aAAa,CAAuB;IACpC,aAAa,CAAuB;IACpC,SAAS,CAAS;IAClB,IAAI,CAAyB;IAC7B,YAAY,CAAc;IAE3C,YACE,MAAyE;QAEzE,MAAM,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,WAAW;YACrC,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE;YAC9B,CAAC,CAAC,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-1,16 +1,52 @@
|
|
|
1
1
|
/** Should be re-exported by the implementation */
|
|
2
|
-
export { type BaseQueryParams, type QueryParams, type QueryResult, type ExecParams, type InsertParams,
|
|
2
|
+
export { type BaseQueryParams, type QueryParams, type QueryResult, type ExecParams, type InsertParams,
|
|
3
|
+
/** @deprecated Import `ClickHouseClient` from `@clickhouse/client` instead. In Web projects, use `import type { ClickHouseClient } from '@clickhouse/client-web'`. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
4
|
+
ClickHouseClient, type CommandParams, type CommandResult, type ExecResult, type InsertResult, type PingResult, type PingParams, type PingParamsWithSelectQuery, type PingParamsWithEndpoint, } from './client';
|
|
3
5
|
export { type BaseClickHouseClientConfigOptions } from './config';
|
|
4
6
|
export type { Row, RowOrProgress, BaseResultSet, ResultJSONType, RowJSONType, ResultStream, } from './result';
|
|
5
7
|
export type { DataFormat, RawDataFormat, JSONDataFormat, StreamableDataFormat, StreamableJSONDataFormat, SingleDocumentJSONFormat, } from './data_formatter';
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
export {
|
|
9
|
+
/** @deprecated Import `SupportedJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
10
|
+
SupportedJSONFormats,
|
|
11
|
+
/** @deprecated Import `SupportedRawFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
12
|
+
SupportedRawFormats,
|
|
13
|
+
/** @deprecated Import `StreamableFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
14
|
+
StreamableFormats,
|
|
15
|
+
/** @deprecated Import `StreamableJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
16
|
+
StreamableJSONFormats,
|
|
17
|
+
/** @deprecated Import `SingleDocumentJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
18
|
+
SingleDocumentJSONFormats,
|
|
19
|
+
/** @deprecated Import `RecordsJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
20
|
+
RecordsJSONFormats,
|
|
21
|
+
/** @deprecated Import `TupleParam` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
22
|
+
TupleParam, } from './data_formatter';
|
|
23
|
+
export {
|
|
24
|
+
/** @deprecated Import `ClickHouseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
25
|
+
ClickHouseError,
|
|
26
|
+
/** @deprecated Import `parseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
27
|
+
parseError, } from './error';
|
|
28
|
+
export {
|
|
29
|
+
/** @deprecated Import `ClickHouseLogLevel` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
30
|
+
ClickHouseLogLevel, type ErrorLogParams, type WarnLogParams, type Logger, type LogParams, } from './logger';
|
|
9
31
|
export type { ClickHouseSummary, InputJSON, InputJSONObjectEachRow, ResponseJSON, ResponseHeaders, WithClickHouseSummary, WithResponseHeaders, ProgressRow, InsertValues, ClickHouseAuth, ClickHouseJWTAuth, ClickHouseCredentialsAuth, } from './clickhouse_types';
|
|
10
|
-
export {
|
|
11
|
-
|
|
32
|
+
export {
|
|
33
|
+
/** @deprecated Import `isProgressRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
34
|
+
isProgressRow,
|
|
35
|
+
/** @deprecated Import `isRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
36
|
+
isRow,
|
|
37
|
+
/** @deprecated Import `isException` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
38
|
+
isException, } from './clickhouse_types';
|
|
39
|
+
export { type ClickHouseSettings, type MergeTreeSettings,
|
|
40
|
+
/** @deprecated Import `SettingsMap` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
41
|
+
SettingsMap, } from './settings';
|
|
12
42
|
export type { SimpleColumnType, ParsedColumnSimple, ParsedColumnEnum, ParsedColumnFixedString, ParsedColumnNullable, ParsedColumnDecimal, ParsedColumnDateTime, ParsedColumnDateTime64, ParsedColumnArray, ParsedColumnTuple, ParsedColumnMap, ParsedColumnType, JSONHandling, } from './parse';
|
|
13
|
-
export {
|
|
43
|
+
export {
|
|
44
|
+
/** @deprecated Import `SimpleColumnTypes` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
45
|
+
SimpleColumnTypes,
|
|
46
|
+
/** @deprecated Import `parseColumnType` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
47
|
+
parseColumnType,
|
|
48
|
+
/** @deprecated Import `defaultJSONHandling` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
49
|
+
defaultJSONHandling, } from './parse';
|
|
14
50
|
/** For implementation usage only - should not be re-exported */
|
|
15
51
|
export { formatQuerySettings, formatQueryParams, encodeJSON, isSupportedRawFormat, isStreamableJSONFamily, isNotStreamableJSONFamily, validateStreamFormat, } from './data_formatter';
|
|
16
52
|
export { type ValuesEncoder, type MakeResultSet, type MakeConnection, type HandleImplSpecificURLParams, type ImplementationDetails, booleanConfigURLValue, enumConfigURLValue, getConnectionParams, numberConfigURLValue, } from './config';
|
package/dist/index.js
CHANGED
|
@@ -3,29 +3,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.enhanceStackTrace = exports.getCurrentStackTrace = exports.DefaultLogger = exports.LogWriter = exports.CARET_RETURN = exports.extractErrorAtTheEndOfChunk = exports.isJWTAuth = exports.isCredentialsAuth = exports.withHttpSettings = exports.withCompressionHeaders = exports.transformUrl = exports.toSearchParams = exports.sleep = exports.isSuccessfulResponse = exports.EXCEPTION_TAG_HEADER_NAME = exports.numberConfigURLValue = exports.getConnectionParams = exports.enumConfigURLValue = exports.booleanConfigURLValue = exports.validateStreamFormat = exports.isNotStreamableJSONFamily = exports.isStreamableJSONFamily = exports.isSupportedRawFormat = exports.encodeJSON = exports.formatQueryParams = exports.formatQuerySettings = exports.defaultJSONHandling = exports.parseColumnType = exports.SimpleColumnTypes = exports.SettingsMap = exports.isException = exports.isRow = exports.isProgressRow = exports.ClickHouseLogLevel = exports.parseError = exports.ClickHouseError = exports.TupleParam = exports.RecordsJSONFormats = exports.SingleDocumentJSONFormats = exports.StreamableJSONFormats = exports.StreamableFormats = exports.SupportedRawFormats = exports.SupportedJSONFormats = exports.ClickHouseClient = void 0;
|
|
4
4
|
/** Should be re-exported by the implementation */
|
|
5
5
|
var client_1 = require("./client");
|
|
6
|
+
/** @deprecated Import `ClickHouseClient` from `@clickhouse/client` instead. In Web projects, use `import type { ClickHouseClient } from '@clickhouse/client-web'`. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
6
7
|
Object.defineProperty(exports, "ClickHouseClient", { enumerable: true, get: function () { return client_1.ClickHouseClient; } });
|
|
7
8
|
var data_formatter_1 = require("./data_formatter");
|
|
9
|
+
/** @deprecated Import `SupportedJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
8
10
|
Object.defineProperty(exports, "SupportedJSONFormats", { enumerable: true, get: function () { return data_formatter_1.SupportedJSONFormats; } });
|
|
11
|
+
/** @deprecated Import `SupportedRawFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
9
12
|
Object.defineProperty(exports, "SupportedRawFormats", { enumerable: true, get: function () { return data_formatter_1.SupportedRawFormats; } });
|
|
13
|
+
/** @deprecated Import `StreamableFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
10
14
|
Object.defineProperty(exports, "StreamableFormats", { enumerable: true, get: function () { return data_formatter_1.StreamableFormats; } });
|
|
15
|
+
/** @deprecated Import `StreamableJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
11
16
|
Object.defineProperty(exports, "StreamableJSONFormats", { enumerable: true, get: function () { return data_formatter_1.StreamableJSONFormats; } });
|
|
17
|
+
/** @deprecated Import `SingleDocumentJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
12
18
|
Object.defineProperty(exports, "SingleDocumentJSONFormats", { enumerable: true, get: function () { return data_formatter_1.SingleDocumentJSONFormats; } });
|
|
19
|
+
/** @deprecated Import `RecordsJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
13
20
|
Object.defineProperty(exports, "RecordsJSONFormats", { enumerable: true, get: function () { return data_formatter_1.RecordsJSONFormats; } });
|
|
21
|
+
/** @deprecated Import `TupleParam` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
14
22
|
Object.defineProperty(exports, "TupleParam", { enumerable: true, get: function () { return data_formatter_1.TupleParam; } });
|
|
15
23
|
var error_1 = require("./error");
|
|
24
|
+
/** @deprecated Import `ClickHouseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
16
25
|
Object.defineProperty(exports, "ClickHouseError", { enumerable: true, get: function () { return error_1.ClickHouseError; } });
|
|
26
|
+
/** @deprecated Import `parseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
17
27
|
Object.defineProperty(exports, "parseError", { enumerable: true, get: function () { return error_1.parseError; } });
|
|
18
28
|
var logger_1 = require("./logger");
|
|
29
|
+
/** @deprecated Import `ClickHouseLogLevel` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
19
30
|
Object.defineProperty(exports, "ClickHouseLogLevel", { enumerable: true, get: function () { return logger_1.ClickHouseLogLevel; } });
|
|
20
31
|
var clickhouse_types_1 = require("./clickhouse_types");
|
|
32
|
+
/** @deprecated Import `isProgressRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
21
33
|
Object.defineProperty(exports, "isProgressRow", { enumerable: true, get: function () { return clickhouse_types_1.isProgressRow; } });
|
|
34
|
+
/** @deprecated Import `isRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
22
35
|
Object.defineProperty(exports, "isRow", { enumerable: true, get: function () { return clickhouse_types_1.isRow; } });
|
|
36
|
+
/** @deprecated Import `isException` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
23
37
|
Object.defineProperty(exports, "isException", { enumerable: true, get: function () { return clickhouse_types_1.isException; } });
|
|
24
38
|
var settings_1 = require("./settings");
|
|
39
|
+
/** @deprecated Import `SettingsMap` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
25
40
|
Object.defineProperty(exports, "SettingsMap", { enumerable: true, get: function () { return settings_1.SettingsMap; } });
|
|
26
41
|
var parse_1 = require("./parse");
|
|
42
|
+
/** @deprecated Import `SimpleColumnTypes` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
27
43
|
Object.defineProperty(exports, "SimpleColumnTypes", { enumerable: true, get: function () { return parse_1.SimpleColumnTypes; } });
|
|
44
|
+
/** @deprecated Import `parseColumnType` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
28
45
|
Object.defineProperty(exports, "parseColumnType", { enumerable: true, get: function () { return parse_1.parseColumnType; } });
|
|
46
|
+
/** @deprecated Import `defaultJSONHandling` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
|
|
29
47
|
Object.defineProperty(exports, "defaultJSONHandling", { enumerable: true, get: function () { return parse_1.defaultJSONHandling; } });
|
|
30
48
|
/** For implementation usage only - should not be re-exported */
|
|
31
49
|
var data_formatter_2 = require("./data_formatter");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,mCAgBiB;AAVf,mOAAmO;AACnO,0GAAA,gBAAgB,OAAA;AA2BlB,mDAeyB;AAdvB,4LAA4L;AAC5L,sHAAA,oBAAoB,OAAA;AACpB,2LAA2L;AAC3L,qHAAA,mBAAmB,OAAA;AACnB,yLAAyL;AACzL,mHA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iB,OAAA;AACjB,kGAAA,SAAS,OAAA;AACT,oHAAA,2BAA2B,OAAA;AAC3B,qGAAA,YAAY,OAAA;AAEd,mCAAyE;AAAhE,mGAAA,SAAS,OAAA;AAAE,uGAAA,aAAa,OAAA;AACjC,iCAAiE;AAAxD,6GAAA,oBAAoB,OAAA;AAAE,0GAAA,iBAAiB,OAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.20.0-head.97f135e.1";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;AAAA,kBAAe,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;AAAA,kBAAe,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@clickhouse/client-common",
|
|
3
3
|
"description": "Official JS client for ClickHouse DB - common types",
|
|
4
4
|
"homepage": "https://clickhouse.com",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.20.0-head.97f135e.1",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"clickhouse",
|