Socket
Socket
Sign inDemoInstall

@clickhouse/client

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clickhouse/client - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

3

dist/config.js

@@ -70,3 +70,3 @@ "use strict";

values_encoder: new utils_1.NodeValuesEncoder(),
make_result_set: ((stream, format, query_id, log_error) => result_set_1.ResultSet.instance({
make_result_set: ((stream, format, query_id, log_error, response_headers) => result_set_1.ResultSet.instance({
stream,

@@ -76,4 +76,5 @@ format,

log_error,
response_headers,
})),
};
//# sourceMappingURL=config.js.map

@@ -115,3 +115,3 @@ "use strict";

try {
const { stream } = await this.request({
const { stream, response_headers } = await this.request({
method: 'POST',

@@ -127,2 +127,3 @@ url: (0, client_common_1.transformUrl)({ url: this.params.url, searchParams }),

query_id,
response_headers,
};

@@ -161,3 +162,3 @@ }

try {
const { stream, summary } = await this.request({
const { stream, summary, response_headers } = await this.request({
method: 'POST',

@@ -172,3 +173,3 @@ url: (0, client_common_1.transformUrl)({ url: this.params.url, searchParams }),

await (0, stream_2.drainStream)(stream);
return { query_id, summary };
return { query_id, summary, response_headers };
}

@@ -200,3 +201,3 @@ catch (err) {

async command(params) {
const { stream, query_id, summary } = await this.runExec({
const { stream, query_id, summary, response_headers } = await this.runExec({
...params,

@@ -207,3 +208,3 @@ op: 'Command',

await (0, stream_2.drainStream)(stream);
return { query_id, summary };
return { query_id, summary, response_headers };
}

@@ -310,3 +311,3 @@ async close() {

try {
const { stream, summary } = await this.request({
const { stream, summary, response_headers } = await this.request({
method: 'POST',

@@ -323,2 +324,3 @@ url: (0, client_common_1.transformUrl)({ url: this.params.url, searchParams }),

summary,
response_headers,
};

@@ -364,2 +366,3 @@ }

: undefined,
response_headers: { ..._response.headers },
});

@@ -366,0 +369,0 @@ }

@@ -6,2 +6,2 @@ export type { NodeClickHouseClient as ClickHouseClient, QueryResult, } from './client';

/** Re-export @clickhouse/client-common types */
export { type BaseClickHouseClientConfigOptions, type BaseQueryParams, type QueryParams, type ExecParams, type InsertParams, type InsertValues, type CommandParams, type CommandResult, type ExecResult, type InsertResult, type DataFormat, type RawDataFormat, type JSONDataFormat, type StreamableDataFormat, type StreamableJSONDataFormat, type SingleDocumentJSONFormat, type Logger, type LogParams, type ErrorLogParams, type WarnLogParams, type ClickHouseSettings, type MergeTreeSettings, type Row, type ResponseJSON, type InputJSON, type InputJSONObjectEachRow, type BaseResultSet, type PingResult, ClickHouseError, ClickHouseLogLevel, SettingsMap, } from '@clickhouse/client-common';
export { type BaseClickHouseClientConfigOptions, type BaseQueryParams, type QueryParams, type ExecParams, type InsertParams, type InsertValues, type CommandParams, type CommandResult, type ExecResult, type InsertResult, type DataFormat, type RawDataFormat, type JSONDataFormat, type StreamableDataFormat, type StreamableJSONDataFormat, type SingleDocumentJSONFormat, type Logger, type LogParams, type ErrorLogParams, type WarnLogParams, type ClickHouseSettings, type MergeTreeSettings, type Row, type ResponseJSON, type InputJSON, type InputJSONObjectEachRow, type BaseResultSet, type PingResult, ClickHouseError, ClickHouseLogLevel, SettingsMap, SupportedJSONFormats, SupportedRawFormats, StreamableFormats, StreamableJSONFormats, SingleDocumentJSONFormats, RecordsJSONFormats, } from '@clickhouse/client-common';
/// <reference types="node" />
import type { BaseResultSet, DataFormat, ResultJSONType, ResultStream, Row } from '@clickhouse/client-common';
import type { BaseResultSet, DataFormat, ResponseHeaders, ResultJSONType, ResultStream, Row } from '@clickhouse/client-common';
import type { Readable } from 'stream';

@@ -27,2 +27,3 @@ import Stream from 'stream';

log_error: (error: Error) => void;
response_headers: ResponseHeaders;
}

@@ -33,4 +34,5 @@ export declare class ResultSet<Format extends DataFormat | unknown> implements BaseResultSet<Stream.Readable, Format> {

readonly query_id: string;
readonly response_headers: ResponseHeaders;
private readonly log_error;
constructor(_stream: Stream.Readable, format: Format, query_id: string, log_error?: (error: Error) => void);
constructor(_stream: Stream.Readable, format: Format, query_id: string, log_error?: (error: Error) => void, _response_headers?: ResponseHeaders);
/** See {@link BaseResultSet.text}. */

@@ -42,4 +44,5 @@ text(): Promise<string>;

stream<T>(): ResultStream<Format, StreamReadable<Row<T, Format>[]>>;
/** See {@link BaseResultSet.close}. */
close(): void;
static instance<Format extends DataFormat>({ stream, format, query_id, log_error, }: ResultSetOptions<Format>): ResultSet<Format>;
static instance<Format extends DataFormat>({ stream, format, query_id, log_error, response_headers, }: ResultSetOptions<Format>): ResultSet<Format>;
}

@@ -33,3 +33,3 @@ "use strict";

class ResultSet {
constructor(_stream, format, query_id, log_error) {
constructor(_stream, format, query_id, log_error, _response_headers) {
Object.defineProperty(this, "_stream", {

@@ -53,2 +53,8 @@ enumerable: true,

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

@@ -62,2 +68,4 @@ enumerable: true,

this.log_error = log_error ?? ((err) => console.error(err));
this.response_headers =
_response_headers !== undefined ? Object.freeze(_response_headers) : {};
}

@@ -171,7 +179,8 @@ /** See {@link BaseResultSet.text}. */

}
/** See {@link BaseResultSet.close}. */
close() {
this._stream.destroy(new Error(resultSetClosedMessage));
}
static instance({ stream, format, query_id, log_error, }) {
return new ResultSet(stream, format, query_id, log_error);
static instance({ stream, format, query_id, log_error, response_headers, }) {
return new ResultSet(stream, format, query_id, log_error, response_headers);
}

@@ -178,0 +187,0 @@ }

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

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

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

"homepage": "https://clickhouse.com",
"version": "1.2.0",
"version": "1.3.0",
"license": "Apache-2.0",

@@ -27,4 +27,4 @@ "keywords": [

"dependencies": {
"@clickhouse/client-common": "1.2.0"
"@clickhouse/client-common": "1.3.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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