Socket
Socket
Sign inDemoInstall

@clickhouse/client

Package Overview
Dependencies
Maintainers
3
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 0.0.6 to 0.0.7

18

dist/client.js

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

exec(params) {
const query = removeSemi(params.query.trim());
const query = removeTrailingSemi(params.query.trim());
return this.connection.exec({

@@ -125,10 +125,16 @@ query,

query = query.trim();
query = removeSemi(query);
query = removeTrailingSemi(query);
return query + ' \nFORMAT ' + format;
}
function removeSemi(query) {
const idx = query.indexOf(';');
if (idx !== -1) {
return query.slice(0, idx);
function removeTrailingSemi(query) {
let lastNonSemiIdx = query.length;
for (let i = lastNonSemiIdx; i > 0; i--) {
if (query[i - 1] !== ';') {
lastNonSemiIdx = i;
break;
}
}
if (lastNonSemiIdx !== query.length) {
return query.slice(0, lastNonSemiIdx);
}
return query;

@@ -135,0 +141,0 @@ }

{
"name": "@clickhouse/client",
"version": "0.0.6",
"version": "0.0.7",
"description": "Official JS client for ClickHouse DB",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

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