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 0.2.9 to 0.2.10

17

dist/client.d.ts

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

import type { ClickHouseLogLevel, ClickHouseSettings, Connection, ConnectionParams, ConnExecResult, ConnInsertResult, Logger, WithClickHouseSummary } from '@clickhouse/client-common';
import type { ClickHouseLogLevel, ClickHouseSettings, Connection, ConnectionParams, ConnExecResult, Logger, WithClickHouseSummary } from '@clickhouse/client-common';
import { type DataFormat } from '@clickhouse/client-common';

@@ -92,3 +92,16 @@ import type { InputJSON, InputJSONObjectEachRow } from './clickhouse_types';

} & WithClickHouseSummary;
export type InsertResult = ConnInsertResult;
export type InsertResult = {
/**
* Indicates whether the INSERT statement was executed on the server.
* Will be `false` if there was no data to insert.
* For example: if {@link InsertParams.values} was an empty array,
* the client does not any requests to the server, and {@link executed} is false.
*/
executed: boolean;
/**
* Empty string if {@link executed} is false.
* Otherwise, either {@link InsertParams.query_id} if it was set, or the id that was generated by the client.
*/
query_id: string;
} & WithClickHouseSummary;
export type ExecResult<Stream> = ConnExecResult<Stream>;

@@ -95,0 +108,0 @@ export type PingResult = ConnPingResult;

@@ -110,6 +110,9 @@ "use strict";

async insert(params) {
if (Array.isArray(params.values) && params.values.length === 0) {
return { executed: false, query_id: '' };
}
const format = params.format || 'JSONCompactEachRow';
this.valuesEncoder.validateInsertValues(params.values, format);
const query = getInsertQuery(params, format);
return await this.connection.insert({
const result = await this.connection.insert({
query,

@@ -119,2 +122,3 @@ values: this.valuesEncoder.encodeValues(params.values, format),

});
return { ...result, executed: true };
}

@@ -121,0 +125,0 @@ /**

2

dist/version.d.ts

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

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

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

"homepage": "https://clickhouse.com",
"version": "0.2.9",
"version": "0.2.10",
"license": "Apache-2.0",

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

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