Socket
Socket
Sign inDemoInstall

@clickhouse/client-common

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clickhouse/client-common - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

dist/clickhouse_types.d.ts
export interface ResponseJSON<T = unknown> {
data: Array<T>;
query_id?: string;
totals?: Record<string, number>;
totals?: T;
extremes?: Record<string, any>;

@@ -6,0 +6,0 @@ meta?: Array<{

@@ -15,5 +15,15 @@ import type { BaseClickHouseClientConfigOptions, ClickHouseSettings, ConnExecResult, IsSame, WithClickHouseSummary } from '@clickhouse/client-common';

/** A specific `query_id` that will be sent with this request.
* If it is not set, a random identifier will be generated automatically by the client. */
* If it is not set, a random identifier will be generated automatically by the client. */
query_id?: string;
/** A specific ClickHouse Session id for this query.
* If it is not set, {@link BaseClickHouseClientConfigOptions.session_id} will be used.
* @default undefined (no override) */
session_id?: string;
/** When defined, overrides the credentials from the {@link BaseClickHouseClientConfigOptions.username}
* and {@link BaseClickHouseClientConfigOptions.password} settings for this particular request.
* @default undefined (no override) */
auth?: {
username: string;
password: string;
};
}

@@ -47,3 +57,3 @@ export interface QueryParams extends BaseQueryParams {

* For example: if {@link InsertParams.values} was an empty array,
* the client does not any requests to the server, and {@link executed} is false.
* the client does not send any requests to the server, and {@link executed} is false.
*/

@@ -88,2 +98,3 @@ executed: boolean;

private readonly clientClickHouseSettings;
private readonly connectionParams;
private readonly connection;

@@ -90,0 +101,0 @@ private readonly makeResultSet;

@@ -14,2 +14,8 @@ "use strict";

});
Object.defineProperty(this, "connectionParams", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "connection", {

@@ -49,7 +55,7 @@ enumerable: true,

const configWithURL = (0, config_1.prepareConfigWithURL)(config, logger, config.impl.handle_specific_url_params ?? null);
const connectionParams = (0, config_1.getConnectionParams)(configWithURL, logger);
this.logWriter = connectionParams.log_writer;
this.clientClickHouseSettings = connectionParams.clickhouse_settings;
this.connectionParams = (0, config_1.getConnectionParams)(configWithURL, logger);
this.logWriter = this.connectionParams.log_writer;
this.clientClickHouseSettings = this.connectionParams.clickhouse_settings;
this.sessionId = config.session_id;
this.connection = config.impl.make_connection(configWithURL, connectionParams);
this.connection = config.impl.make_connection(configWithURL, this.connectionParams);
this.makeResultSet = config.impl.make_result_set;

@@ -68,5 +74,6 @@ this.valuesEncoder = config.impl.values_encoder;

const query = formatQuery(params.query, format);
const queryParams = this.withClientQueryParams(params);
const { stream, query_id } = await this.connection.query({
query,
...this.withClientQueryParams(params),
...queryParams,
});

@@ -79,3 +86,3 @@ return this.makeResultSet(stream, format, query_id, (err) => {

args: {
session_id: this.sessionId,
session_id: queryParams.session_id,
query,

@@ -158,3 +165,4 @@ query_id,

query_id: params.query_id,
session_id: this.sessionId,
session_id: params.session_id ?? this.sessionId,
auth: params.auth,
};

@@ -161,0 +169,0 @@ }

@@ -63,3 +63,3 @@ import type { InsertValues } from './client';

/** ClickHouse Session id to attach to the outgoing requests.
* @default empty string */
* @default empty string (no session) */
session_id?: string;

@@ -66,0 +66,0 @@ /** @deprecated since version 1.0.0. Use {@link http_headers} instead. <br/>

@@ -31,2 +31,6 @@ import type { WithClickHouseSummary } from './clickhouse_types';

query_id?: string;
auth?: {
username: string;
password: string;
};
}

@@ -33,0 +37,0 @@ export interface ConnInsertParams<Stream> extends ConnBaseQueryParams {

@@ -1,2 +0,2 @@

declare const _default: "1.0.2";
declare const _default: "1.1.0";
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = '1.0.2';
exports.default = '1.1.0';
//# sourceMappingURL=version.js.map

@@ -5,3 +5,3 @@ {

"homepage": "https://clickhouse.com",
"version": "1.0.2",
"version": "1.1.0",
"license": "Apache-2.0",

@@ -8,0 +8,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc